[rewrite of the homepage jeremy@seereason.com**20110919171948 Ignore-this: fc6b95f94ca1bb36005ef84c5ac206fb ] hunk ./Main.hs 273 -homeContent :: (XMLGenerator m) => XMLGenT m (HSX.XML m) -homeContent = +{- +oldHomeContent :: (XMLGenerator m) => XMLGenT m (HSX.XML m) +oldHomeContent = hunk ./Main.hs 339 +-} + +homeContent :: (XMLGenerator m) => XMLGenT m (HSX.XML m) +homeContent = +
+ +

What is Happstack?

+ +

Happstack is a Haskell web framework. Happstack is designed so that developers can prototype quickly, deploy painlessly, scale massively, operate reliably, and change easily. Happstack is supported on GNU/Linux, OS X, FreeBSD, and Windows environments.

+ +

happstack-server

+

At the core of Happstack is happstack-server. happstack-server is a fast, lightweight, self-contained HTTP server with built-in HTML templating support using blaze-html. happstack-server is database agnostic and can be used with any of your favorite database libraries from hackage. happstack-server is extensively documented in The Happstack Crashcourse.

+ +

Extensions

+ +

Happstack provides a wide range of extensions including:

+
+
acid-state
+
acid-state is a pure Haskell, in-memory, transactional ACID, noSQL database. acid-state is a cleaner, faster, more robust rewrite of the classic happstack-state system.
+ +
ixset
+
ixset is a Set-like datatype with support multiple indexes. It is similar to a table in a traditional SQL database. ixset is often used with the acid-state library.
+ +
happstack-plugins
+
happstack-plugins provides on-the-fly recompilation and dynamic loading of code into running servers. This is especially useful for reloading compiled HTML templates (such as blaze-html). Check out a demonstration here.
+
jmacro
+
jmacro is a Javascript templating library. It supports splicing Haskell values into Javascript, static syntax checking, hygienic naming, and more. Documentation on using it with Happstack can be found here.
+ +
happstack-hsp
+
happstack-hsp leverages the HSX and HSP libraries to provide powerful XML and HTML templates. HSX allows literal XML markup to be embedded in Haskell code. This means that you have the full power of Haskell at your disposal in your templates, not some weak, limited templating language.
+ +
happstack-heist
+
happstack-heist brings the power of heist templates to Happstack. heist aims to keep the presentation and business logic well separated. Additionally, because it uses external .xml files for the templates, they can be easily edited by non-programmers, and modifications do not require the server to be recompiled or restarted. Use with Happstack is documented here.
+ +
happstack-hamlet
+
happstack-hamlet brings hamlet templates to Happstack.
+ +
happstack-hstringtemplate
+
happstack-hstringtemplate allows the use of templates which are similar to the Java StringTemplate engine.
+ +
web-routes
+
web-routes is a family of libraries which provide type-safe URL routing. URLs can be mapped to types and back via a number of methods including invertible-syntax descriptions, parsec, template-haskell, quasi-quotation, and more. Documenation can be found here.
+ +
happstack-authenticate
+
happstack-authenticate is a high-level authentication library for Happstack built on top of the authenticate library. It provides support for authentication via OpenId, Facebook, or a username/password. It includes support for multiple authentication methods per account, as well as multiple personalities per account. It includes themeable templates that can easily be integrated into your site.
+ +
+ +

Getting Started

+

The fastest way to get started is to install happstack from hackage using cabal.

+
+ + $ export PATH=~/.cabal/bin:$PATH
+ $ cabal update
+ $ cabal install happstack-server +
+
+ +

Simple App

+

Here is a simple app to test out your installation. The application will run on port 8000 by default. If you are reading this website on the same machine you are running the app on, just click here to see it.

+ +
+ +

module Main where

+ +

import Happstack.Server

+

main = simpleHTTP nullConf $ ok "Hello, World!"

+ +
+ +

Next, head over to the Happstack Crash Course and start hacking!

+ +
+