This is a project description for a student project (D3-projekt) at Chalmers University of Technology. The project will run during the 2005-2006 academic year.
Project name
Some suggestions from the community:
- Webby
- Boomerang
- schvung
- Harrow
- Silk``Shirt
- Kombinator
- Wugs
- funkcore
- ChurchAndSTate
Background
Web applications are everywhere. Many of them are written in untyped (or dynamically typed) languages such as PHP and Perl.
Haskell is better. It offers compile-time type safety and strong abstractions.
Project goals
The goal is to create a framework for writing web applications in Haskell by using existing components such as Haskell Server Pages and HaskellDB. The framework should allow construction web applications using a declarative style at a high level of abstration.
The framework should be easy to get started with for users who have not used a functional language before, yet it should allow more experienced Haskell programmers to create and use powerful abstractions.
Possible system features
- Continuation-based programming model for supporting stateful interaction (e.g. sessions).
- High-level combinator libraries for e.g. web forms, graphical layout of web pages, content management etc.
- A consistent high-level interface tying together the new components with existing systems for dynamic loading, database interfaces and web services.
Existing components
The following components exist, but would benefit from being integrated into a larger framework.
- Haskell Server Pages is an extension of Haskell that allows a programmer to embed XML fragments within Haskell code. Apart from the purely syntactic extension, HSP also defines a central XML data type, and libraries for manipulating XML, XHTML etc. There is also support for sessions and user-defined application persistency, and for interfacing to HTTP, CGI and the underlying web server. Haskell Server Pages has been developed as a Chalmers project and has resulted in a Master's thesis and a published article at the ICFP 2004.
- HaskellDB is a combinator library for expressing queries and other operations on relational databases in a type safe and declarative way. All the queries and operations are completely expressed within Haskell, no embedded (SQL) commands are needed. HaskellDB was revised into its current state as a third year project (D3-projekt) at Chalmers during 2003-2004 and resulted in a published paper at the Haskell Workshop 2004. To integrate HaskellDB into a web application framework some of the following might be needed:
- Support for persistent connections
- A back-end supporting HApps.DBMS (see HAppS below)
- and many others
- HaXR, the Haskell XML-RPC library. XML-RPC is a protocol for calling functions over the network. The function call is encoded as XML and sent over HTTP to the server, which executes it and returns the result in the same way.
- HAIFA is a Haskell implementation of SOAP.
- HTTP package
- RSS module (One version here, don't know where the official one is.)
- hsgnutls - Haskell TLS (SSL) bindings.
- NewCGI - A new CGI library for Haskell.
- Haskell FastCGI module - A Haskell binding for FastCGI.
- Flippi Besttermpaper.com - a Haskell Wiki engine.
Related projects
Recommended courses
- Advanced Functional Programming
- Topics in Computer Languages
- Databases
- Programming Languages
- WebTechCourse