Personal tools

Web

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(finish merging to Web/Frameworks and Web/Deploy)
 
(25 intermediate revisions by 8 users not shown)
Line 1: Line 1:
[[Category:Web]]
+
[[Category:Web|*]]
+
{{Web infobox}}
== Libraries ==
 
   
 
The web development community in Haskell has recently had a large boost in activity, resulting in a plethora of choices in libraries. As usual, a breadth of options is a double edged sword: you can choose the tools more to your style, but it is harder to find quality tools.
 
The web development community in Haskell has recently had a large boost in activity, resulting in a plethora of choices in libraries. As usual, a breadth of options is a double edged sword: you can choose the tools more to your style, but it is harder to find quality tools.
   
This document is meant to be an up-to-date listing of different libraries available to perform various tasks related to web development. We want to strike a balance here between enough information to make an informed decision, while keeping a good signal-to-noise ratio. As such, for editors, please try to include the following information on each library:
+
You may want to start on this wiki by looking at [[Web/Frameworks]].
 
* Name
 
* Most recent version, and release date
 
* Link to the code (either Hackage, or elsewhere if not on Hackage)
 
* A short summary of what the library does. In particular, ''what makes this library different than others''
 
* Links to more documentation. If there are lots of links, consider creating a separate Wiki page for those links, so as not to clutter this page.
 
* Links to sample code. Both short snippets and full-scale applications are welcome. Again, create a separate Wiki page as necessary.
 
* Dependencies on other packages. For example, a web framework should list its choice of templating system, server, etc.
 
 
 
=== Interfaces ===
 
 
Interfaces provide an abstraction between servers and applications, allowing different servers to be swapped easily.
 
 
==== Hack ====
 
 
Current version: [http://hackage.haskell.org/package/hack Hack 2009.10.30]. Released: October 30, 2009.
 
 
Hack is a simple interface for applications. Based on Ruby's Rack, it presents a very low barrier to entry. Unlike WAI, it uses lazy bytestrings for request and response bodies, making it easier to use for some. Many backends are available, for numerous backends; simply search hackage for "hack-handler-".
 
 
Samples: None.
 
 
Dependencies: None.
 
 
==== WAI (Web Application Interface) ====
 
 
Current version: [http://hackage.haskell.org/package/wai WAI 0.2.0]. Released: July 12, 2010.
 
 
The WAI is designed to be a type-safe and performant interface. Type safety is achieved by having data types such as RequestHeader, ResponseHeader, HttpVersion, as opposed to simply using Strings or ByteStrings. Performance is achieved by using an enumerator interface, allowing constant-space response construction without needing lazy I/O. Backends available are currently a simple server, CGI, FastCGI and a Snap Framework backend.
 
 
Samples: [http://github.com/snoyberg/wai/blob/master/README.lhs Basic sample application]
 
 
Dependencies: None
 
 
=== Servers ===
 
 
TODO: Information on Happstack, Snap, others.
 
 
=== Templating ===
 
 
==== Hamlet ====
 
 
Current version: [http://hackage.haskell.org/package/hamlet Hamlet 0.4.1]. Released: July 25, 2010
 
 
Hamlet's main goal is to provide you with fully type-safe templates. It uses Haskell's quasi-quoting facilities so that everything is checked at compile time. Unlike using an HTML combinator library, it uses a more intuitive syntax for defining your templates: a Haml-inspired syntax to be precise. It also has support for type-safe URLs, and achieves very high performance by being based on BlazeHtml and performing compile-time optimizations.
 
 
[http://docs.yesodweb.com/hamlet/ Documentation]. [http://docs.yesodweb.com/hamlet/synopsis.html Sample]. Dependencies: BlazeHtml.
 
 
==== HStringTemplate ====
 
 
Current version: [http://hackage.haskell.org/package/HStringTemplate HStringTemplate 0.6.4]. Released: July 14, 2010.
 
 
See the [[HStringTemplate]] wiki page.
 
 
==== TODO ====
 
 
HSP, Heist
 
 
=== Persistence ===
 
 
==== Persistent ====
 
 
Current version [http://hackage.haskell.org/package/persistent Persistent 0.1.0]. Released: July 13, 2010.
 
 
Persistent is a high-level, non-relational, type-safe persistence layer for Haskell. Its design allows it to be used on both SQL and non-SQL backends. Heavy usage of type families allows strong type guarantees, while usage of template haskell removes the need for boilerplate coding.
 
 
[http://docs.yesodweb.com/persistent/ Documentation]. [http://docs.yesodweb.com/persistent/synopsis.html Sample]. Dependencies: Hamlet and web-routes-quasi (only for convenience instances).
 
 
=== Controller ===
 
 
==== UrlDisp ====
 
 
Current version [http://hackage.haskell.org/package/UrlDisp UrlDisp 0.1.7]. Released: February 4, 2009.
 
 
See the wiki page [[UrlDisp]
 
 
==== web-routes ====
 
 
Current version [http://hackage.haskell.org/package/web-routes web-routes 0.22.0]. Released: April 20, 2010.
 
 
Library for maintaining correctness and composability of URLs within an application. A collection of types and functions that ensure that URLs generated by an application are valid. There are a number of related packages available on Hackage.
 
 
==== web-routes-quasi ====
 
 
Current version [http://hackage.haskell.org/package/web-routes-quasi web-routes-quasi 0.5.0]. Released: July 13, 2010.
 
 
Allows declaration of type-safe URLs through a simple quasi-quoted syntax. The quasi-quoter automatically creates datatypes, parse functions, render functions and dispatch functions, ensuring your code is correct without writing a lot of boilerplate. Also includes some advanced support for creating subsites, aka pluggable web components.
 
 
[http://docs.yesodweb.com/web-routes-quasi/ Documentation]. [http://docs.yesodweb.com/web-routes-quasi/synopsis.html Synopsis]. Dependencies: web-routes
 
 
=== Frameworks ===
 
 
==== Yesod ====
 
 
Current version [http://hackage.haskell.org/package/yesod Yesod 0.4.1]. Released: July 15, 2010.
 
 
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.
 
 
[http://docs.yesodweb.com/yesod/ Documentation]. [http://docs.yesodweb.com/yesod/helloworld.html Hello world sample] ([http://www.youtube.com/watch?v=BEWJnDgrmp0 screencast]). [http://github.com/snoyberg/bloggy bloggy blog engine]. Dependencies: Persistent (model), Hamlet (view), web-routes-quasi (controller), clientsession, authenticate.
 
 
==== Snap ====
 
 
TODO: Expand. See homepage: http://snapframework.com/
 
 
==== Happstack ====
 
 
TODO: Expand. See homepage: http://happstack.com/index.html
 
 
=== Miscellaneous ===
 
 
==== clientsession ====
 
 
Current version [http://hackage.haskell.org/package/clientsession clientsession 0.4.0.1]. Released: May 24, 2010.
 
 
clientsession encrypts and hashes data so it can be stored in a cookie safely. This allows you to have very scalable user sessions: you can use multiple servers, and they need only share the encryption key.
 
 
Documentation: [http://hackage.haskell.org/packages/archive/clientsession/0.4.0.1/doc/html/Web-ClientSession.html haddocks]. No samples or dependencies.
 
 
==== authenticate ====
 
 
Current version [http://hackage.haskell.org/package/authenticate authenticate 0.6.3]. Released: June 30, 2010.
 
 
A library for allowing third-party logins to your sites. Currently supports openid version 1 and rpxnow.
 
 
Documentation: [http://hackage.haskell.org/package/authenticate haddocks]. No samples or dependencies.
 
 
== Old Content ==
 
=== Wiki pages ===
 
 
* [[Applications and libraries/Web programming]]
 
* [[Practical web programming in Haskell]]
 
* [[Blog articles/Web]]
 
* [[Web Projects]]
 
 
 
=== External links ===
 
   
* [http://www.haskell.org/mailman/listinfo/web-devel The Haskell Web development mailinglist]
+
Please join us on [[Web/Forums_and_Discussion|the mailing lists]] to discuss web development in Haskell.

Latest revision as of 20:04, 17 February 2011

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

The web development community in Haskell has recently had a large boost in activity, resulting in a plethora of choices in libraries. As usual, a breadth of options is a double edged sword: you can choose the tools more to your style, but it is harder to find quality tools.

You may want to start on this wiki by looking at Web/Frameworks.

Please join us on the mailing lists to discuss web development in Haskell.