Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Snap (web framework)
Web development framework in Haskell

Snap is a web framework for developing web applications written in the functional programming language Haskell.

Related Image Collections Add Image
We don't have any YouTube videos related to Snap (web framework) yet.
We don't have any PDF documents related to Snap (web framework) yet.
We don't have any Books related to Snap (web framework) yet.
We don't have any archived web articles related to Snap (web framework) yet.

Overview

The Snap framework consists of the following:

  • snap-core,3 a generic Haskell web server API.
  • snap-server,4 a fast5 HTTP server that implements the snap-core interface.
  • Heist,6 an HTML-based templating system for generating pages that allows you to bind Haskell functionality to HTML tags for a clean separation of view and backend code, much like Lift's snippets. Heist is self-contained and can be used independently.
  • Snaplets,7 a high-level system for building modular web applications.
  • Built-in snaplets for templating, session management, and authentication.
  • Third party snaplets for features including file uploads, database connectivity (PostgreSQL, MongoDB, etc.), generation of JavaScript from Haskell code, and more.
  • The Snap monad for stateful access to HTTP requests and responses.8

Snap runs on both Windows NT and Unix-like platforms. Snap uses the Iteratee input/output (I/O) model,9 As of version 1.0, its I/O is implemented with io-streams.

Usage

Snap is used by Silk,10 JanRain,1112 Racemetric,13 Lee Paste's Financial Blog,1415 SooStone Inc, and Group Commerce. Snap is also used as a lightweight, standalone Haskell server. The static site generator Hakyll uses Snap for its preview mode.16

Other Haskell web frameworks

References

  1. Collins, Gregory; Beardsley, Doug (January–February 2011). "The Snap Framework: A Web Toolkit for Haskell" (PDF). IEEE Internet Computing. 15 (1): 84–87. doi:10.1109/mic.2011.21. http://steve.vinoski.net/pdf/IC-Snap_Framework.pdf

  2. Biscardi, Chris (2014). Snap for Beginners. Gumroad. https://gumroad.com/l/qWMnO

  3. "snap-core". Hackage.org. http://hackage.haskell.org/package/snap-core

  4. "snap-server". Hackage.org. http://hackage.haskell.org/package/snap-server

  5. "Snap 0.3 benchmarks with GHC 7.0.1". Snap Framework.com. Retrieved 2014-03-02. http://snapframework.com/blog/2010/11/17/snap-0.3-benchmarks

  6. Snap Framework Team. "Snap: A Haskell Web Framework: Heist Tutorial". Snap Framework.com. http://snapframework.com/docs/tutorials/heist

  7. Snap Framework Team. "Snap: A Haskell Web Framework: Snaplet Directory". Snap Framework.com. http://snapframework.com/snaplets

  8. "Snap.Core". Hackage.org. http://hackage.haskell.org/package/snap-core-0.9.6.0/docs/Snap-Core.html#t:Snap

  9. "InfoQ Interview: Gregory Collins on High Performance Web Apps with Snap and Haskell". Sep 12, 2011. http://www.computer.org/portal/web/computingnow/content?g=53319&type=article&urlTitle=gregory-collins-on-high-performance-web-apps-with-snap-and-haskell

  10. "FP Complete Case Study – Silk – Structured Content Management" (PDF). FP Complete. Retrieved 2014-03-02. https://www.fpcomplete.com/wp-content/uploads/2013/05/Silk%20case%20study.pdf

  11. "FP Complete Case Study – JanRain – User Management System" (PDF). FP Complete. Retrieved 2014-03-02. https://www.fpcomplete.com/wp-content/uploads/2013/05/janrain%20case%20study.pdf

  12. "Blog tutorial on Snap and PostgreSQL". JanRain. Retrieved 2014-03-02. http://janrain.com/blog/tutorial-building-a-sample-application-with-haskell-snap-postgresql-and-the-postgresql-simple-snaplet/

  13. Hoersten, Luke. "Haskell Snap App in Production". Retrieved 2014-03-02. http://blog.hoersten.co/post/76773146365/haskell-snap-app-in-production

  14. "Lee Paste". Lee Paste's Financial Blog. http://www.lpaste.net/

  15. Done, Chris. "lpaste source code". GitHub. Retrieved 2014-03-02. https://github.com/chrisdone/lpaste/blob/master/hpaste.cabal#L102

  16. Van der Jeugt, Jasper. "Hakyll". JasperVdJ.be. Retrieved 2024-11-09. http://jaspervdj.be/hakyll/

  17. "scotty: Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp". Hackage.org. http://hackage.haskell.org/package/scotty

  18. "Spock: Another Haskell web framework for rapid development". Hackage.org. http://hackage.haskell.org/package/Spock

  19. "MFlow: stateful, RESTful web framework". Hackage.org. http://hackage.haskell.org/package/MFlow

  20. "miso: A tasty Haskell front-end framework". Hackage.org. http://hackage.haskell.org/package/miso