[Haskell-cafe] Functional Reactive Web Application Framework?

Petr Pudlak deb at pudlak.name
Wed May 13 03:36:42 EDT 2009

Hi, I've been learning Haskell for a few months, and it has influenced my
thinking about programs quite a lot. Most of my current work is creating
complex web applications. Naturally, I was thinking about how to make rich
internet applications (and GUI apps in general) in an (utmost :-)) functional
way. Recently I found out the concepts of functional reactive programming
<http://www.haskell.org/haskellwiki/Functional_Reactive_Programming>, which
supersede and generalize my ideas. My question is:

"Is there a FRP web application framework,
 or perhaps an effort to create one?"

If not, I'd be willing to start such a project, but since I'm not very
experienced Haskell programmer, I'd most likely need some help from somebody
more experienced. If somebody would be interested, my ideas go as follows:

Handling events in GUI/RIA applications can be very tedious, especially for
complex applications. Instead, I'd prefer something like that:

1) Abstract what a user wants to see using a structured datatype,
   specifically tailored for the application. You may imagine it as something
   like a structured URL. This can be then viewed as a FRP behavior --
   a function of the user's request depending on time.
2) The data that will be displayed on the page are a function of this
   structured user request and an environment, which is usually database. This
   is again a behavior.
3) Finally, the resulting page is a function of the data (again a behavior).
4) User actions that change the application state (update the database) could
   be viewed as FRP events.

So instead of handling tons of events, the programmer would construct the
application mostly by composing behaviors. Only state-changing user actions
would be handled as events.

Does anybody see these ideas as useful? Constructive criticism is welcomed.

    Best regards,

More information about the Haskell-Cafe mailing list