Personal tools

Web/Frameworks/HSP

From HaskellWiki

< Web | Frameworks(Difference between revisions)
Jump to: navigation, search
(Category:Web)
m (HSP moved to Web/Frameworks/HSP)
 

Latest revision as of 14:30, 3 October 2010

Contents

[edit] 1 What is HSP?

Haskell Server Pages (HSP) is an extension of vanilla Haskell, targetted at the task of writing dynamic server-side web pages. Features include:

  • Embedded XML syntax
  • A (low-to-mid-level) programming model for writing dynamic web pages
  • A library for writing server-side Javascript in Haskell
  • Functions for using cgi to show HSP pages

[edit] 2 History

The first version of HSP was presented by Eric Meijer and Danny van Velzen at the Haskell Workshop 2000. Their work was never fully implemented however. This system is at the same time an implementation, improvement and extension of their original system.

  • version 0.2, May 2005:
    • First public release.
  • version 0.4 March 2008:

[edit] 3 HSP Packages

Project HSP v 0.4 consists of a set of packages with related functionality:

[edit] 3.1 Package hsx

Haskell Source with XML (HSX, hsx) is a package that contains everything pertaining to literal XML syntax. In particular it contains a) the trhsx preprocessor that translates hsx source files into vanilla Haskell, and b) modules defining the functions that are injected by trhsx. It also nominally contains generic combinators for creating values of the same types as the literal XML syntax, though these modules are not present in 0.4.

[edit] 3.2 Package hsp

The core HSP package defines the datatypes and functions for writing server-side dynamic web pages. Also defines how to use the HJScript functionality in HSP pages, to allow for client-side dynamics as well.

[edit] 3.3 Package HJavaScript

This package defines an abstract syntax and (not-so-)pretty printer for a large subset of JavaScript, as Language.HJavaScript. However, a significant difference from JavaScript is that HJavaScript is typed, even on the abstract syntax level using GADTs. The subset of JavaScript that is supported is those parts that lend themself to typing (i.e. no prototyping of classes).

[edit] 3.4 Package HJScript

HJScript is a DSL built on top of HJavaScript, for writing client-side dynamic web pages. The programming model is fairly low-level, resembling the actual JavaScript code quite a lot, but should be easy to extend with higher-level functionality. Notable is that HJScript supports the use of literal XML syntax for creating DOM ElementNodes. Also notable is that HJScript supports Ajax functionality.

HJScript and HJavaScript can be used independently of HSP, for creating JavaScript code.

[edit] 3.5 Package hsp-cgi

Run HSP pages as CGI scripts.

(Note: Earlier versions of HSP have come with a server application, hspr, providing the runtime environment for HSP. As of 0.4, this server has been discontinued and should be considered deprecated.)

[edit] 4 Download

HSP is available from Hackage. It currently consists of several different packages.

The development versions of the packages live in darcs repositories under http://code.haskell.org/HSP.

[edit] 5 Installation and Usage

The packages are cabalized. Most of the packages can be configured, built and installed in the standard way.

TBW.

[edit] 6 Documentation

Currently the only existing in-depth documentation is Niklas' masters thesis [ps, pdf]

[edit] 7 Mailing list

There is a Google Group which you should join if you're interested in HSP. This is also the best place to ask any questions you might have.