Difference between revisions of "Web/Frameworks"

From HaskellWiki
< Web
Jump to navigation Jump to search
(merge overview content from Web)
(→‎Obelisk: re: Elm)
 
(41 intermediate revisions by 24 users not shown)
Line 7: Line 7:
   
 
See also: there are also many [[Web/Frameworks/Inactive|inactive web frameworks]] to draw inspiration from
 
See also: there are also many [[Web/Frameworks/Inactive|inactive web frameworks]] to draw inspiration from
  +
  +
== IHP: Integrated Haskell Platform ==
  +
  +
IHP is a modern batteries-included web framework using haskell and nix. It comes with everything you need to build great web applications out of the box. Combined with the unique mix of technologies and a fast development process, IHP makes it very pleasant to build applications.
  +
  +
The development environment is fully managed, so you don't need to worry about installing GHC, Cabal or other haskell tools. The built-in web server automatically reloads your haskell code, no need to manually recompile your app. Thanks to code generators and it's great documentation you can build real web applications with very basic knowledge of haskell. You will pick up more advanced Haskell along the way!
  +
  +
Notable features:
  +
*HSX, a JSX-like template language that looks like HTML while providing type safety
  +
*Auto live reloading without the need to setup anything
  +
*Documentation with examples: it lets you query the database without learning about monads
  +
*Type-safe, composable SQL queries
  +
*Active community that can help you with type errors
  +
*IHP runs on MacOS, Windows and Linux.
  +
  +
{| class="wikitable"
  +
! License
  +
| MIT
  +
|-
  +
! Author:
  +
| digitally induced GmbH and Open Source Contributors
  +
|-
  +
! Maintainer:
  +
| digitally induced GmbH
  +
|-
  +
! Home page:
  +
| https://ihp.digitallyinduced.com/
  +
|-
  +
! Documentation:
  +
| https://ihp.digitallyinduced.com/Guide/
  +
|-
  +
! Package & repositories
  +
| [https://github.com/digitallyinduced/ihp]
  +
|}
  +
  +
Join the [https://gitter.im/digitallyinduced/ihp Gitter Community] or [https://forum.ihpapp.com/ the IHP Forum] to get help while building your application.
  +
  +
== Obelisk ==
  +
  +
'''Obelisk''' is an opinionated, batteries-included framework for building production-ready web and mobile applications in Haskell. It’s goal is to represent a cohesive, highly-curated set of choices that Obsidian Systems has made for building these types of applications in a way that is extremely fast but does not compromise on production readiness.
  +
  +
Obelisk also provides GHCJS-based toolset with ready-made libraries for writing full-stack [https://reflex-frp.org/ Reflex] apps in Haskell. If you have used Elm before, then Reflex is a natural next choice.
  +
  +
  +
{| class="wikitable"
  +
! License
  +
| BSD3
  +
|-
  +
! Author:
  +
| Obsidian Systems
  +
|-
  +
! Maintainer:
  +
| Obsidian Systems
  +
|-
  +
! Home page:
  +
| https://github.com/obsidiansystems/obelisk
  +
|-
  +
! Documentation:
  +
| https://github.com/obsidiansystems/obelisk
  +
|-
  +
! Package & repositories
  +
| [https://github.com/obsidiansystems/obelisk]
  +
|}
  +
  +
View [https://www.srid.ca/fa9766e6.html a tutorial here]. Join the [https://app.element.io/#/room/#freenode_#reflex-frp:matrix.org IRC] to get help while building your application.
   
 
== Happstack ==
 
== Happstack ==
Line 23: Line 88:
 
|-
 
|-
 
! Home page:
 
! Home page:
| http://happstack.com/index.html
+
| http://happstack.com/
 
|-
 
|-
 
! Documentation:
 
! Documentation:
| http://happstack.com/docs
+
| http://happstack.com/page/view-page-slug/3/documentation
 
|-
 
|-
 
! Package & repositories
 
! Package & repositories
| [http://hackage.haskell.org/package/happstack Hackage] - [http://patch-tag.com/r/mae/happstack/pullrepo Darcs]
+
| [http://hackage.haskell.org/package/happstack-server Hackage] - [http://patch-tag.com/r/mae/happstack Darcs]
 
|}
 
|}
   
  +
[http://happstack.com/ Happstack] is a complete web framework. The main component is [http://hackage.haskell.org/package/happstack-server happstack-server]: an integrated HTTP server, routing combinators, fileserving, etc. In addition, a number of packages that used to be coupled to Happstack have now been decoupled from it, but remain promoted and documented for use with Happstack:
   
  +
* [http://hackage.haskell.org/package/safecopy safecopy]: datatype serialization and migration support
[http://happstack.com/index.html Happstack] is a complete web framework. It is organized as a suite of libraries including:
 
  +
* [http://hackage.haskell.org/package/acid-state acid-state]: a powerful NoSQL ACID storage system with native support for Haskell types
* happstack-server: an integrated HTTP server, routing combinators, fileserving, etc
 
* happstack-data: datatype serialization and migration support
 
* happstack-state (aka macid): an (optional) powerful NoSQL ACID storage system with native support for Haskell types and replication
 
   
 
It also includes integration with many 3rd party libraries including:
 
It also includes integration with many 3rd party libraries including:
   
*templating: [http://hackage.haskell.org/package/blaze-html Blaze HTML combinator library], [http://docs.yesodweb.com/ Hamlet], [[HSP]], [[HStringTemplate]], [[Heist]], and more
+
*templating: [http://hackage.haskell.org/package/blaze-html Blaze HTML], [http://www.yesodweb.com/book/shakespearean-templates Hamlet], [[HSP]], [[HStringTemplate]], [[Heist]], and more
  +
*forms: [http://hackage.haskell.org/package/reform reform]
*forms: [[Formlets]]
 
 
*routing: [http://hackage.haskell.org/package/web-routes web-routes] type-safe urls and routing
 
*routing: [http://hackage.haskell.org/package/web-routes web-routes] type-safe urls and routing
 
*databases: can be used with most [[Database interfaces]] with no special support required
 
*databases: can be used with most [[Database interfaces]] with no special support required
   
  +
See the [http://happstack.com/ Happstack Home Page] for more information and to learn how to get support via IRC and mailing lists.
Happstack is primarily intended for use on VPS or dedicated hosts, but can be used with CGI via FastCGI or [http://hackage.haskell.org/package/hack-handler-happstack-2009.12.20 hack].
 
 
See the [http://happstack.com/index.html Happstack Home Page] for more information and to learn how to get support via IRC and mailing lists.
 
   
 
== Snap ==
 
== Snap ==
   
Snap is a simple web development framework for unix systems, written in the Haskell programming language.
+
Snap is a web development framework built around an abstraction called [http://snapframework.com/snaplets snaplets].
   
Snap is well-documented and has a test suite with a high level of code coverage, but it is early-stage software with still-evolving interfaces. Snap is therefore likely to be most appropriate for early adopters and potential contributors.
+
Snap is well-documented and has a test suite with a high level of code coverage. It has been used in production for years, and version 1.0 was released in August 2016. As of July 2017, it does not support HTTP/2.
   
  +
The framework provides:
* A fast HTTP server library with an optional high-concurrency backend using the libev event loop library
 
  +
  +
* A fast [https://wiki.haskell.org/Web/Servers#Snap_Server HTTP server library]
 
* A sensible and clean monad for web programming
 
* A sensible and clean monad for web programming
  +
* A simple, yet powerful template system that supports both HTML5 and XML
* An XML-based templating system for generating HTML
 
  +
  +
Snaplets that come with the framework include functionality for templating, authentication and sessions. Additional functionality (including MySQL and PostgreSQL database access) is provided by third-party snaplets.
   
 
{| class="wikitable"
 
{| class="wikitable"
Line 76: Line 142:
 
|-
 
|-
 
! Package & repositories
 
! Package & repositories
| [http://hackage.haskell.org/package/snap-server Hackage] - [http://git.snapframework.com/snap-server.git Git]
+
| [https://hackage.haskell.org/package/snap Hackage] - [https://github.com/snapframework Git]
 
|}
 
|}
   
Line 94: Line 160:
 
|-
 
|-
 
! Announcement:
 
! Announcement:
| : http://www.haskell.org/pipermail/haskell-cafe/2010-March/074271.html
+
| http://www.haskell.org/pipermail/haskell-cafe/2010-March/074271.html
 
|-
 
|-
 
! Home page:
 
! Home page:
Line 100: Line 166:
 
|-
 
|-
 
! Documentation:
 
! Documentation:
| http://docs.yesodweb.com/yesod/
+
| http://www.yesodweb.com/book
 
|-
 
|-
 
! Screencast:
 
! Screencast:
| http://www.youtube.com/watch?v=BEWJnDgrmp0
+
| http://www.yesodweb.com/page/screencasts
 
|-
 
|-
 
! Package & repositories
 
! Package & repositories
| [http://hackage.haskell.org/package/yesod Hackage] - [http://github.com/snoyberg/yesod Github]
+
| [http://hackage.haskell.org/package/yesod Hackage] - [https://github.com/yesodweb/yesod Github]
 
|}
 
|}
   
[http://docs.yesodweb.com/ Yesod] is a full-featured web framework. It takes a modular approach to development, so many parts of the framework such as [http://docs.yesodweb.com/book/templates Hamlet] and [http://docs.yesodweb.com/book/persistent Persistent] are available as standalone packages. However, put together, Yesod provides you with solutions for templating, routing, persistence, sessions, JSON, authentication/authorization, and more. Yesod's major guiding principle is type safety: if your application compiles, it works.
+
[http://docs.yesodweb.com/ Yesod] is a full-featured web framework. It takes a modular approach to development, so many parts of the framework such as [http://www.yesodweb.com/book/shakespearean-templates Hamlet] and [http://www.yesodweb.com/book/persistent Persistent] are available as standalone packages. However, put together, Yesod provides you with solutions for templating, routing, persistence, sessions, JSON, authentication/authorization, and more. Yesod's major guiding principle is type safety: if your application compiles, it works.
   
Yesod is very well documented through the [http://docs.yesodweb.com/book Yesod book]. Work is being done on an constant basis to improve the documentation status, but the first ten chapters (covering all the basics) are already done, so it should be easy to get started.
+
Yesod is very well documented through a combination of haddocks and the [http://docs.yesodweb.com/book Yesod book].
   
 
Yesod is built on [http://hackage.haskell.org/package/wai WAI], or the Web Application Interface. This is similar to WSGI in Python or Rack in Ruby. It provides a single interface that all applications can target and work on multiple backends. Backends exist for CGI, FastCGI, SCGI, development server (auto-recompile) and even a Webkit-powered desktop version.
 
Yesod is built on [http://hackage.haskell.org/package/wai WAI], or the Web Application Interface. This is similar to WSGI in Python or Rack in Ruby. It provides a single interface that all applications can target and work on multiple backends. Backends exist for CGI, FastCGI, SCGI, development server (auto-recompile) and even a Webkit-powered desktop version.
   
But the premier backend is [http://hackage.haskell.org/package/warp Warp]: a very simple web server which, at the time of writing, is the fastest Haskell has to offer. You can read more in its [http://docs.yesodweb.com/blog/announcing-warp release announcement] and see some [http://docs.yesodweb.com/blog/warp-speed-ahead followup benchmarks]. Warp is already powering Yesod; some other major players that are planning a move are Hoogle and Happstack.
+
But the premier backend is [http://hackage.haskell.org/package/warp Warp]: a very simple web server which, at the time of writing, is the fastest Haskell has to offer. You can read more in its [http://docs.yesodweb.com/blog/announcing-warp release announcement] and see some [http://www.yesodweb.com/blog/2011/02/warp-speed-ahead followup benchmarks]. Warp is already powering Yesod; some other major players that are planning a move are Hoogle and Happstack.
   
You can see a [http://wiki.yesodweb.com/Powered%20by%20Yesod list of Yesod-powered sites and packages], or check out the [https://github.com/snoyberg/haskellers source code for Haskellers]. Most discussions for Yesod take place on the [http://www.haskell.org/mailman/listinfo/web-devel web-devel list], so feel free to join in and ask any questions you have, the Yesod community is very beginner-friendly.
+
You can see a [https://github.com/yesodweb/yesod/wiki/Powered-by-Yesod list of Yesod-powered sites and packages], or check out the [https://github.com/snoyberg/haskellers source code for Haskellers]. Most discussions for Yesod take place on the [http://groups.google.com/group/yesodweb yesodweb list], so feel free to join in and ask any questions you have, the Yesod community is very beginner-friendly.
   
== Haskell on a Horse ==
+
== mohws ==
   
  +
A web server with a module system and support for CGI. Based on Simon Marlow's original Haskell Web Server.
Haskell on a Horse (HoH) is a combinatorial web framework for the programming language Haskell. It is currently at an early, unsettled stage of development. It is available under the "BSD3" open-source license.
 
   
 
{| class="wikitable"
 
{| class="wikitable"
! License
+
!License:
| BSD3
+
|BSD3
 
|-
 
|-
  +
!Copyright:
! Author
 
  +
|Simon Marlow, Bjorn Bringert
| Jason Hart Priestley
 
 
|-
 
|-
  +
!Author:
! Maintainer
 
  +
|Simon Marlow, Bjorn Bringert <bjorn@bringert.net>
| jason@on-a-horse.org
 
 
|-
 
|-
  +
!Maintainer:
! Home page:
 
  +
|Henning Thielemann <webserver@henning-thielemann.de>
| http://haskell.on-a-horse.org/
 
 
|-
 
|-
! Package & repositories
+
!Packages & repositories
| [http://hackage.haskell.org/package/on-a-horse Hackage]
+
|[http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mohws Hackage] - [http://code.haskell.org/mohws/ Darcs]
 
|}
 
|}
   
== loli ==
+
== Scotty ==
   
  +
A Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp. Sinatra + Warp = Scotty.
A simple library for fast web prototyping in Haskell.
 
  +
  +
Scotty is simple, cheap and cheerful way to write RESTful, declarative web applications. It has good documentation for all the relevant functions.
  +
  +
* A page is as simple as defining the verb, url pattern, and Text content.
  +
* It is template-language agnostic. Anything that returns a Text value will do.
  +
* Conforms to WAI Application interface.
  +
* Uses very fast Warp webserver by default.
   
 
{| class="wikitable"
 
{| class="wikitable"
! License
+
! License:
| BSD3
+
| BSD3
 
|-
 
|-
! Author
+
! Author:
  +
| Andrew Farmer
| Wang, Jinjing
 
 
|-
 
|-
! Maintainer
+
! Maintainer:
  +
| Andrew Farmer
| Wang, Jinjing <nfjinjing@gmail.com>
 
  +
|-
  +
! Home page:
  +
| https://github.com/scotty-web/scotty
  +
|-
  +
! Documentation:
  +
| http://hackage.haskell.org/package/scotty
 
|-
 
|-
 
! Package & repositories
 
! Package & repositories
| [http://hackage.haskell.org/package/loli Hackage] - [http://github.com/nfjinjing/loli Github]
+
| [http://hackage.haskell.org/package/scotty Hackage] - [https://github.com/scotty-web/scotty Git]
 
|}
 
|}
   
== Lemmachine ==
+
== Miso ==
   
  +
Miso is a small "isomorphic" Haskell front-end framework featuring a virtual-dom, diffing / patching algorithm, event delegation, event batching, SVG, Server-sent events, Websockets, and an extensible Subscription-based subsystem. Inspired by Elm, Redux and Bobril. IO and other effects (like XHR) can be introduced into the system via the Effect data type. Miso makes heavy use of the GHCJS FFI and therefore has minimal dependencies.
Lemmachine is a REST'ful web framework that makes it easy to get HTTP right by exposing users to overridable hooks with sane defaults. The main architecture is a copy of Erlang-based Webmachine, which is currently the best documentation reference (for hooks & general design).
 
   
Lemmachine stands out from the dynamically typed Webmachine by being written in dependently typed Agda. The goal of the project is to show the advantages gained from compositional testing by taking advantage of proofs being inherently compositional. See proofs for examples of universally quantified proofs (tests over all possible input values) written against the default resource, which does not override any hooks.
 
 
[http://github.com/larrytheliquid/Lemmachine#readme More information]
 
   
 
{| class="wikitable"
 
{| class="wikitable"
  +
! License:
! Author
 
| Larry Diehl
+
| BSD3
 
|-
 
|-
  +
! Author:
! Packages & repositories
 
  +
| David Johnson
| [http://github.com/larrytheliquid/Lemmachine Github]
 
  +
|-
  +
! Maintainer:
  +
| djohnson.m@gmail.com
  +
|-
  +
! Home page:
  +
| https://github.com/dmjio/miso
  +
|-
  +
! Package & repositories
  +
| [http://hackage.haskell.org/package/miso Hackage] - [https://github.com/dmjio/miso Git]
 
|}
 
|}
   
== mohws ==
+
== Servant ==
  +
  +
Servant is a a light-weight framework primarily for REST APIs. It allows to specify API specifications as type aliases and then work with these type aliases to create servers, but also documentation, client code in Haskell and Javascript, etc.. It is based on wai.
   
A web server with a module system and support for CGI. Based on Simon Marlow's original Haskell Web Server.
 
   
 
{| class="wikitable"
 
{| class="wikitable"
!License:
+
! License:
|BSD3
+
| BSD3
 
|-
 
|-
  +
! Author:
!Copyright:
 
  +
| Alp Mestanogullari, Sönke Hahn, Julian K. Arni
|Simon Marlow, Bjorn Bringert
 
 
|-
 
|-
  +
! Maintainer:
!Author:
 
  +
| alpmestan@gmail.com
|Simon Marlow, Bjorn Bringert <bjorn@bringert.net>
 
 
|-
 
|-
  +
! Home page:
!Maintainer:
 
  +
| http://haskell-servant.github.io/
|Henning Thielemann <webserver@henning-thielemann.de>
 
 
|-
 
|-
!Packages & repositories
+
! Package & repositories
|[http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mohws Hackage] - [http://code.haskell.org/mohws/ Darcs]
+
| [http://hackage.haskell.org/package/servant Hackage] - [https://github.com/haskell-servant Git]
 
|}
 
|}
   
== Salvia ==
+
== Spock ==
   
  +
Another Haskell web framework for rapid development: This toolbox provides everything you need to get a quick start into web hacking with haskell: routing, middleware, json, blaze, sessions, cookies, database helper, csrf-protection, global state
Salvia is a feature rich modular web server and web application framework that can be used to write dynamic websites in Haskell. From the lower level protocol code up to the high level application code, everything is written as a Salvia handler. This approach makes the server extremely extensible. To see a demo of a Salvia website, please see the salvia-demo package.
 
   
  +
* Simple API
All the low level protocol code can be found in the salvia-protocol package, which exposes the datatypes, parsers and pretty-printers for the URI, HTTP, Cookie and MIME protocols.
 
  +
* Adds lots of useful features for rapid web development
 
  +
* Fast tree based routing
This Salvia package itself can be separated into three different parts: the interface, the handlers and the implementation. The interface module defines a number of type classes that the user can build the web application against. Reading the request object, writing to the response, or gaining direct access to the socket, all of these actions are reflected using one type class aspect in the interface. The handlers are self contained modules that implement a single aspect of the Salvia web server. The handlers expose their interface requirements in their type context. Salvia can have multiple implementations which can be switched by using different instances for the interface type classes. This package has only one implementation, a simple accepting socket loop server. The salvia-extras package has two additional implementations. Keeping a clear distinction between the abstract server aspects and the actual implementation makes it very easy to migrate existing web application to different back-ends.
 
  +
* Plugins like [http://hackage.haskell.org/package/Spock-auth Spock-auth] and [http://hackage.haskell.org/package/Spock-worker Spock-worker]
   
 
{| class="wikitable"
 
{| class="wikitable"
 
! License:
 
! License:
| BSD3
+
| BSD3
 
|-
 
|-
 
! Author:
 
! Author:
  +
| Alexander Thiemann
| Sebastiaan Visser
 
 
|-
 
|-
 
! Maintainer:
 
! Maintainer:
  +
| Alexander Thiemann
| sfvisser@cs.uu.nl
 
 
|-
 
|-
  +
! Home page:
! Announcement:
 
  +
| https://github.com/agrafix/Spock
| http://www.haskell.org/pipermail/haskell-cafe/2010-March/074870.html
 
  +
|-
  +
! Documentation:
  +
| http://hackage.haskell.org/package/Spock
 
|-
 
|-
 
! Package & repositories
 
! Package & repositories
| [http://hackage.haskell.org/package/salvia Hackage] - [http://github.com/sebastiaanvisser/salvia Git]
+
| [http://hackage.haskell.org/package/Spock Hackage] - [https://github.com/agrafix/Spock Git]
 
|}
 
|}
  +
  +
==See also==
  +
  +
* [[Web/Framework survey]]

Latest revision as of 17:49, 26 October 2020

Haskell Web Development

Software:
Servers - Libraries - Frameworks
Deploy - Cloud
Interfaces to frameworks
Databases and Persistence
Testing and Verification
Content Management

Community & Research:
Forums and Discussion
Literature (research, talks and blogs)
Existing Haskell web applications
Ongoing projects and ideas

Content from Web should be merged here.

Below is a list of known to be active Haskell web frameworks. Rather than one framework to rule them all, Haskell provides several options. You can view the Web/Deploy page to get an idea of how you might deploy an application written in some of these frameworks.

See also: there are also many inactive web frameworks to draw inspiration from

IHP: Integrated Haskell Platform

IHP is a modern batteries-included web framework using haskell and nix. It comes with everything you need to build great web applications out of the box. Combined with the unique mix of technologies and a fast development process, IHP makes it very pleasant to build applications.

The development environment is fully managed, so you don't need to worry about installing GHC, Cabal or other haskell tools. The built-in web server automatically reloads your haskell code, no need to manually recompile your app. Thanks to code generators and it's great documentation you can build real web applications with very basic knowledge of haskell. You will pick up more advanced Haskell along the way!

Notable features:

  • HSX, a JSX-like template language that looks like HTML while providing type safety
  • Auto live reloading without the need to setup anything
  • Documentation with examples: it lets you query the database without learning about monads
  • Type-safe, composable SQL queries
  • Active community that can help you with type errors
  • IHP runs on MacOS, Windows and Linux.
License MIT
Author: digitally induced GmbH and Open Source Contributors
Maintainer: digitally induced GmbH
Home page: https://ihp.digitallyinduced.com/
Documentation: https://ihp.digitallyinduced.com/Guide/
Package & repositories [1]

Join the Gitter Community or the IHP Forum to get help while building your application.

Obelisk

Obelisk is an opinionated, batteries-included framework for building production-ready web and mobile applications in Haskell. It’s goal is to represent a cohesive, highly-curated set of choices that Obsidian Systems has made for building these types of applications in a way that is extremely fast but does not compromise on production readiness.

Obelisk also provides GHCJS-based toolset with ready-made libraries for writing full-stack Reflex apps in Haskell. If you have used Elm before, then Reflex is a natural next choice.


License BSD3
Author: Obsidian Systems
Maintainer: Obsidian Systems
Home page: https://github.com/obsidiansystems/obelisk
Documentation: https://github.com/obsidiansystems/obelisk
Package & repositories [2]

View a tutorial here. Join the IRC to get help while building your application.

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. It supports GNU/Linux, OS X, FreeBSD, and Windows environments.

License BSD3
Author: Happstack team, HAppS LLC
Maintainer: Happstack team <happs@googlegroups.com>
Home page: http://happstack.com/
Documentation: http://happstack.com/page/view-page-slug/3/documentation
Package & repositories Hackage - Darcs

Happstack is a complete web framework. The main component is happstack-server: an integrated HTTP server, routing combinators, fileserving, etc. In addition, a number of packages that used to be coupled to Happstack have now been decoupled from it, but remain promoted and documented for use with Happstack:

  • safecopy: datatype serialization and migration support
  • acid-state: a powerful NoSQL ACID storage system with native support for Haskell types

It also includes integration with many 3rd party libraries including:

See the Happstack Home Page for more information and to learn how to get support via IRC and mailing lists.

Snap

Snap is a web development framework built around an abstraction called snaplets.

Snap is well-documented and has a test suite with a high level of code coverage. It has been used in production for years, and version 1.0 was released in August 2016. As of July 2017, it does not support HTTP/2.

The framework provides:

  • A fast HTTP server library
  • A sensible and clean monad for web programming
  • A simple, yet powerful template system that supports both HTML5 and XML

Snaplets that come with the framework include functionality for templating, authentication and sessions. Additional functionality (including MySQL and PostgreSQL database access) is provided by third-party snaplets.

License: BSD3
Author: James Sanders, Gregory Collins, Doug Beardsley
Maintainer: snap@snapframework.com
Home page: http://snapframework.com/
Documentation: http://snapframework.com/docs
Package & repositories Hackage - Git

Yesod

Yesod is designed for RESTful, type-safe, performant web apps. By leveraging quasi-quotation for the more boilerplate tasks, we get concise web apps with high levels of type safety. Its Hamlet templates are compile-time checked for correctness, and the controller (web-routes-quasi) uses type-safe URLs to make certain you are only generating valid URLs. It loosely follows Model/View/Controller principles.

License: BSD3
Author: Michael Snoyman <michael@snoyman.com>
Maintainer: Michael Snoyman <michael@snoyman.com>
Announcement: http://www.haskell.org/pipermail/haskell-cafe/2010-March/074271.html
Home page: http://www.yesodweb.com/
Documentation: http://www.yesodweb.com/book
Screencast: http://www.yesodweb.com/page/screencasts
Package & repositories Hackage - Github

Yesod is a full-featured web framework. It takes a modular approach to development, so many parts of the framework such as Hamlet and Persistent are available as standalone packages. However, put together, Yesod provides you with solutions for templating, routing, persistence, sessions, JSON, authentication/authorization, and more. Yesod's major guiding principle is type safety: if your application compiles, it works.

Yesod is very well documented through a combination of haddocks and the Yesod book.

Yesod is built on WAI, or the Web Application Interface. This is similar to WSGI in Python or Rack in Ruby. It provides a single interface that all applications can target and work on multiple backends. Backends exist for CGI, FastCGI, SCGI, development server (auto-recompile) and even a Webkit-powered desktop version.

But the premier backend is Warp: a very simple web server which, at the time of writing, is the fastest Haskell has to offer. You can read more in its release announcement and see some followup benchmarks. Warp is already powering Yesod; some other major players that are planning a move are Hoogle and Happstack.

You can see a list of Yesod-powered sites and packages, or check out the source code for Haskellers. Most discussions for Yesod take place on the yesodweb list, so feel free to join in and ask any questions you have, the Yesod community is very beginner-friendly.

mohws

A web server with a module system and support for CGI. Based on Simon Marlow's original Haskell Web Server.

License: BSD3
Copyright: Simon Marlow, Bjorn Bringert
Author: Simon Marlow, Bjorn Bringert <bjorn@bringert.net>
Maintainer: Henning Thielemann <webserver@henning-thielemann.de>
Packages & repositories Hackage - Darcs

Scotty

A Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp. Sinatra + Warp = Scotty.

Scotty is simple, cheap and cheerful way to write RESTful, declarative web applications. It has good documentation for all the relevant functions.

  • A page is as simple as defining the verb, url pattern, and Text content.
  • It is template-language agnostic. Anything that returns a Text value will do.
  • Conforms to WAI Application interface.
  • Uses very fast Warp webserver by default.
License: BSD3
Author: Andrew Farmer
Maintainer: Andrew Farmer
Home page: https://github.com/scotty-web/scotty
Documentation: http://hackage.haskell.org/package/scotty
Package & repositories Hackage - Git

Miso

Miso is a small "isomorphic" Haskell front-end framework featuring a virtual-dom, diffing / patching algorithm, event delegation, event batching, SVG, Server-sent events, Websockets, and an extensible Subscription-based subsystem. Inspired by Elm, Redux and Bobril. IO and other effects (like XHR) can be introduced into the system via the Effect data type. Miso makes heavy use of the GHCJS FFI and therefore has minimal dependencies.


License: BSD3
Author: David Johnson
Maintainer: djohnson.m@gmail.com
Home page: https://github.com/dmjio/miso
Package & repositories Hackage - Git

Servant

Servant is a a light-weight framework primarily for REST APIs. It allows to specify API specifications as type aliases and then work with these type aliases to create servers, but also documentation, client code in Haskell and Javascript, etc.. It is based on wai.


License: BSD3
Author: Alp Mestanogullari, Sönke Hahn, Julian K. Arni
Maintainer: alpmestan@gmail.com
Home page: http://haskell-servant.github.io/
Package & repositories Hackage - Git

Spock

Another Haskell web framework for rapid development: This toolbox provides everything you need to get a quick start into web hacking with haskell: routing, middleware, json, blaze, sessions, cookies, database helper, csrf-protection, global state

  • Simple API
  • Adds lots of useful features for rapid web development
  • Fast tree based routing
  • Plugins like Spock-auth and Spock-worker
License: BSD3
Author: Alexander Thiemann
Maintainer: Alexander Thiemann
Home page: https://github.com/agrafix/Spock
Documentation: http://hackage.haskell.org/package/Spock
Package & repositories Hackage - Git

See also