WebViews is a high-level web-application framework written in Haskell and JavaScript, based on ideas and experiences that originated from the Proxima 2.0 project. WebViews allows the specification of complex web applications through declarative descriptions of compositional views that have their own state. These WebViews exist at the server side and have an html presentation, which is incrementally kept in-sync with the client-side view in the browser. A huge advantage of this high-level compositional approach is that it is not only easier to create large web applications, but also to maintain or redesign them.

Key features of WebViews are:

  • A powerful underlying model, which allows the expression of complex view patterns without resorting to primitive code. Examples include tabbed views, sortable list views with different categories, and search fields with autocompletion.
  • Support for sessions and user authentication.
  • Because WebViews does not rely on cookies, several WebViews apps can exist simultaneously in the same browser. These apps can either share a single session or each can have its own.
  • The web-server is incremental, hence an update in a small part of the page (e.g. editing a comment in a blog) will not reload the entire page, but only the modified parts.
  • Navigation paths are encoded in the url using hash parameters. This means you can use the browser's Back and Forward buttons to navigate within a web application (without reloading the entire page,) as well as make bookmarks.
  • Relatively small in size: the library is currently about 4000 lines of Haskell code and about 1000 lines of JavaScript and css code.

You can click on the images below to see WebViews in action.

WebForms example
Dynamic form generator

Reservations
Reservation app for restaurants