Sunday, July 10, 2011

Functional UI programming

I started using Scala recently to develop a movie player as a side project, with the goal of using functional constructs whenever possible. I found myself using imperative-style programming when interacting with the UI framework. This got me thinking, is there a functional state-less way to develop UIs? A bit of Googling revealed the following:

  • StackOverflow post that talks about this problem and references functional reactive programming (FRP). 
  • The Haskell people have developed UI frameworks around FRP.
  • For the rest of us non-Haskell people, there is Flapjax, an FRP model built on top of JavaScript for the web.
  • The spreadsheet is an example of a FRP model where cells are re-evaluated when dependent values change.
  • Clojure creater Rich Hickey recommends sticking with state-ful programming but keeping it to a minimal.

2 comments:

  1. Thank you for sharing this post about the best techniques for Drupal Development, This is very useful for Drupal Development and Drupal Development. Thanks again :) Drupal Development

    ReplyDelete
  2. I am glad to read this information providing blog post.
    The great loss of information always causes a user to a a feeling of disappointment.
    But for the simplicity of individuals, researchers have launched a solution for problems.
    In case of deletion of data problem, an end user will need to have a preliminary understanding of suitable data recovery application.
    Hard Drive Recovery Norcross

    ReplyDelete