skip to main content
research-article

Bridging the GUI gap with reactive values and relations

Published:30 August 2015Publication History
Skip Abstract Section

Abstract

There are at present two ways to write GUIs for functional code. One is to use standard GUI toolkits, with all the benefits they bring in terms of feature completeness, choice of platform, conformance to platform-specific look-and-feel, long-term viability, etc. How- ever, such GUI APIs mandate an imperative programming style for the GUI and related parts of the application. Alternatively, we can use a functional GUI toolkit. The GUI can then be written in a func- tional style, but at the cost of foregoing many advantages of stan- dard toolkits that often will be of critical importance. This paper introduces a light-weight framework structured around the notions of reactive values and reactive relations. It allows standard toolk- its to be used from functional code written in a functional style. We thus bridge the gap between the two worlds, bringing the ad- vantages of both to the developer. Our framework is available on Hackage and has been been validated through the development of non-trivial applications in a commercial context, and with different standard GUI toolkits.

References

  1. Peter Achten and Rinus Plasmeijer. Interactive functional objects in Clean. In Implementation of Functional Languages, pages 304–321. Springer, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Peter Achten, Marko Van Eekelen, and Rinus Plasmeijer. Generic Graphical User Interfaces. In Implementation of Functional Languages, pages 152–167. Springer, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. C. P. R. Baaij, J. Kuper, and L. Schubert. Soosim: Operating system and programming language exploration. In G. Lipari and T. Cucinotta, editors, Proceedings of the 3rd International Workshop on Analysis Tools and Methodologies for Embedded and Real-time System (WATERS 2012), Pisa, Italy, pages 63–68, Italy, 2012. Giuseppe Lipari.Google ScholarGoogle Scholar
  4. John Backus. Can programming be liberated from the von neumann style? Commun. ACM, 21(8):613–641, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Magnus Carlsson and Thomas Hallgren. FUDGETS: A graphical user interface in a lazy functional language. (Section 6):321–330, 1993.Google ScholarGoogle Scholar
  6. Antony Courtney and Conal Elliott. Genuinely Functional User Interfaces. In Proceedings of the 2001 Haskell Workshop, pages 41–69, 2001.Google ScholarGoogle Scholar
  7. Evan Czaplicki. Elm: Concurrent FRP for Functional GUIs. PhD thesis, 2012.Google ScholarGoogle Scholar
  8. Lászl´o Domoszlai, Bas Lijnse, and Rinus Plasmeijer. Parametric lenses: change notification for bidirectional lenses. In Proceedings of the Symposium on Trends in Functional Programming, Soesterberg, The Netherlands, May 2014. Accepted for publication.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Jonathan Edwards. Coherent reaction. In Proceedings of the 24th ACM SIGPLAN conference companion on Object oriented programming systems languages and applications, pages 925–932. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Conal Elliott and Paul Hudak. Functional reactive animation. In International Conference on Functional Programming, pages 163– 173, June 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Conal M Elliott. Tangible functional programming. ACM SIGPLAN Notices, 42(9):59–70, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Mohamed Fayad and Douglas C. Schmidt. Object-oriented application frameworks. Commun. ACM, 40(10):32–38, October 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J Nathan Foster, Michael B Greenwald, Jonathan T Moore, Benjamin C Pierce, and Alan Schmitt. Combinators for bi-directional tree transformations: a linguistic approach to the view update problem. ACM SIGPLAN Notices, 40(1):233–246, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-oriented Software. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Jeremy Gibbons and Ralf Hinze. Just do it: Simple monadic equational reasoning. In ICFP, September 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Seth Gilbert and Nancy Lynch. Brewer’s conjecture and the feasibility of consistent, available, partition-tolerant web services. SIGACT News, 33(2):51–59, June 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. S. Goderis. On the separation of user interface concerns: A Programmer’s Perspective on the Modularisation of User Interface Code. Asp / Vubpress / Upa, 2007.Google ScholarGoogle Scholar
  18. Tim Harris, Simon Marlow, Simon Peyton-Jones, and Maurice Herlihy. Composable memory transactions. In Proceedings of the Tenth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP ’05, pages 48–60, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. R. Heard. Beautiful code, compelling evidence. Technical report, 2008.Google ScholarGoogle Scholar
  20. George T Heineman. An instance-oriented approach to constructing product lines from layers. Technical Report, WPI CS Tech Report 05- 06, 2005.Google ScholarGoogle Scholar
  21. Kenneth Hoste. An Introduction to Gtk2Hs, a Haskell GUI Library. In Shae Erisson, editor, The Monad.Reader Issue 1. 2005.Google ScholarGoogle Scholar
  22. Graham Hutton and Diana Fulger. Reasoning About Effects: Seeing the Wood Through the Trees. In Proceedings of the Symposium on Trends in Functional Programming, Nijmegen, The Netherlands, May 2008.Google ScholarGoogle Scholar
  23. Roumen Kaiabachev, Walid Taha, and Angela Zhu. E-FRP with priorities. In Proceedings of the 7th ACM & IEEE international conference on Embedded software, EMSOFT ’’07, pages 221–230. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Keera Studios. Keera Hails - Haskell on Rails. https://github. com/keera-studios/keera-hails.Google ScholarGoogle Scholar
  25. Glenn E. Krasner and Stephen T. Pope. A Cookbook for Using the Model-View Controller User Interface Paradigm in Smalltalk-80. J. Object Oriented Program., 1(3):26–49, August 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Glenn E Krasner, Stephen T Pope, et al. A Description of the Model-View-Controller User Interface paradigm in the Smalltalk-80 System. 1988.Google ScholarGoogle Scholar
  27. Hai Liu, Neal Glew, Leaf Petersen, and Todd A Anderson. The intel labs haskell research compiler. In Proceedings of the 2013 ACM SIGPLAN symposium on Haskell, pages 105–116. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Conor McBride and Ross Paterson. Applicative programming with effects. Journal of functional programming, 18(01):1–13, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Sean McDirmid and Wilson C Hsieh. Superglue: Component programming with object-oriented signals. In ECOOP 2006–Object-Oriented Programming, pages 206–229. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Steffen Michels and Rinus Plasmeijer. Uniform data sources in a functional language. In Submitted for presentation at Symposium on Trends in Functional Programming, TFP, volume 12, 2012.Google ScholarGoogle Scholar
  31. Steffen Michels, Rinus Plasmeijer, and Peter Achten. iTask as a new paradigm for building GUI applications. In Implementation and Application of Functional Languages, pages 153–168. Springer, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Brad A. Myers. Separating application code from toolkits: Eliminating the spaghetti of call-backs. In Proceedings of the 4th Annual ACM Symposium on User Interface Software and Technology, UIST ’91, pages 211–220, New York, NY, USA, 1991. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Brad A. Myers. Why Are Human-Computer Interfaces Difficult to Design and Implement? Technical report, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Henrik Nilsson, Antony Courtney, and John Peterson. Functional reactive programming, continued. In Proceedings of the 2002 ACM SIGPLAN workshop on Haskell, pages 51–64. ACM, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Rob Noble and Colin Runciman. Gadgets: Lazy functional components for graphical user interfaces. In Programming Languages: Implementations, Logics and Programs, pages 321–340. Springer, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Addy Osmani. Data-binding revolutions with Object.observe().Google ScholarGoogle Scholar
  37. Bryan O’Sullivan, John Goerzen, and Don Stewart. Real World Haskell. O’Reilly Media, Inc., 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Gergely Patai. Eventless reactivity from scratch. Draft Proceedings of Implementation and Application of Functional Languages (IFL’09), pages 126–140, 2009.Google ScholarGoogle Scholar
  39. Ivan Perez. 1st Year PhD Report. http://www.cs.nott.ac.uk/ ~ixp/, December 2014.Google ScholarGoogle Scholar
  40. Simon L Peyton Jones and Philip Wadler. Imperative functional programming. In Proceedings of the 20th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 71–84. ACM, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Benjamin C. Pierce. Combinators for bi-directional tree transformations: A linguistic approach to the view update problem, October 2004.Google ScholarGoogle Scholar
  42. Invited talk at New England Programming Languages Symposium.Google ScholarGoogle Scholar
  43. Werner Vogels. Eventually consistent. Commun. ACM, 52(1):40–44, January 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Bridging the GUI gap with reactive values and relations

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 50, Issue 12
        Haskell '15
        December 2015
        212 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2887747
        Issue’s Table of Contents
        • cover image ACM Conferences
          Haskell '15: Proceedings of the 2015 ACM SIGPLAN Symposium on Haskell
          August 2015
          212 pages
          ISBN:9781450338080
          DOI:10.1145/2804302

        Copyright © 2015 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 30 August 2015

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!