Ajax applications are stand-alone Web applications that execute into the browser environment, communicating with one or more server back-ends only to get raw data.
Ajax applications can be written using either:
- Higher-level languages that are compiled into native browser code.
Hajax is a proposal to create a Haskell-based tool to program 'stand-alone' Ajax applications.
The main advantages of Hajax would be:
- Web development using a very-high level language with extensive compile-time checks
- No plugins (e.g. a Java VM) required on the user browser
- No Haskell server back-end required (Hajax applications would communicate with back-ends written in any language).
Likely disadvantages with respect to native Ajax solutions are:
- An additional compilation step
- Lower performance
Hajax would consist of the following modules:
- A Haskell compiler able to generate, directly or indirectly, native browser code.
- Generic Haskell libraries (a port of a subset of the standard Haskell Libraries.
- User interface framework and libraries.
- (Optionally) A development environment.
- Support for Haskell 98 + most popular extensions.
- Fast compilation.
- Compact and efficient compiled code.
Compiler Design alternatives
Possible targets for the compiler are:
- Flash (potentially through SWFmill)
- The OpenLaszlo kernel (currently under development) that can be executed in either Flash or HTML/Web browsers.
- The haXe language can compile to Flash Player versions 6-9, Ajax using the JS DOM, or server-side using the Neko VM.
Generic Haskell Libraries
Libraries that would be useful include:
- Generic functional and mutable data structures
- Parser/Regex libraries
UI Framework and Libraries
Most of the Haskell frameworks developed for GUI programming (see Libraries_and_tools/GUI_libraries) or Web programming (e.g. HSPClientside, see a full list at Libraries_and_tools/Web_programming) could be adapted for Hajax.
The libraries would include:
- A complete set of UI widgets
- Network libraries for browser-to-server communication
It should be relatively easy to adapt existing Haskell development environments like EclipseFP to work with Hajax.
Existing AJAX Applications Written in Haskell