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.

Highlights

  • Modern interactive applications are often large and complex with many interrelated elements and sophisticated Graphical User Interfaces (GUIs)

  • To specify how the values of Reactive Values (RVs) are related, allowing them to be synchronised during execution in response to changes, we introduce Reactive Relations (RRs)

  • We provide a library with a default implementation of “very light” RVs that fulfils all of these requirements

Read more

Summary

Introduction

Modern interactive applications are often large and complex with many interrelated elements and sophisticated Graphical User Interfaces (GUIs). The complexity stems from many sources, including the nature of specific application domains, existing software infrastructure, and orthogonal usability features like undo-redo and support for cancellation of long-running operations (requiring concurrency) [33] Structuring such programs well is difficult, as is reasoning about them [17, 20, 29]. The central idea of this paper is to provide light-weight abstractions that on the one hand enable easy, uniform access to arbitrary existing GUI toolkits and other external resources, and on the other seamlessly blend with the functional programming paradigm, scale well, and support modularity. This is what we refer to as “bridging the GUI gap”.

Background
Imperative GUIs in Functional Languages
Functional GUI Toolkits
Functional Reactive Programming
Reactive Values and Relations
Reactive Values
Creating Reactive Values
Externally-backed Reactive Values
Internally-backed Reactive Values
Reactive Relations
Choreographies
Experience
Gale IDE
Keera Posture
Summary
Comparison to Functional GUIs and FRP
Comparison with OO and Reactive Programming
Summary and Future work

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.