Jump to content

Snap (web framework)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 65.202.157.234 (talk) at 22:37, 22 September 2016. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Snap
Original author(s)Gregory Collins, Doug Beardsley[1]
Developer(s)Snap Team
Initial releaseMay 2010
Stable release
1.0[2] / August 7, 2016 (2016-08-07)
Repository
Written inHaskell
Operating systemCross-platform
TypeWeb framework
LicenseBSD License
Websitewww.snapframework.com

Snap is a simple web development framework written in the Haskell programming language.[3][4] It is used by Silk,[5] JanRain,[6][7] Racemetric,[8] www.lpaste.net,[9] SooStone Inc, and Group Commerce. Snap is also used as a lightweight, standalone Haskell server. The popular static site generator Hakyll uses Snap for its preview mode.

Overview

The Snap framework comprises:

  • snap-core,[10] a generic Haskell web server API.
  • snap-server,[11] a fast[12] HTTP server that implements the snap-core interface.
  • Heist, 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 completely self-contained and can be used independently.
  • Snaplets, a high-level system for building modular web applications.
  • Built-in snaplets for templating, session management, and authentication.
  • Third party snaplets for features such as 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.

Snap runs on both Windows and *nix platforms. Snap uses the Iteratee I/O model,[13] As of version 1.0, its i/o is implemented with io-streams.

Other Haskell web frameworks

References

  1. ^ Snap team
  2. ^ http://snapframework.com/blog/2016/08/07/snap-1.0-released
  3. ^ Collins, Gregory; Beardsley, Doug (Jan–Feb 2011). "The Snap Framework: A Web Toolkit for Haskell" (PDF). IEEE Internet Computing. 15 (1): 84–87. doi:10.1109/mic.2011.21.
  4. ^ Biscardi, Chris (2014). Snap for Beginners. Gumroad.
  5. ^ "FP Complete Case Study - Silk -- Structured Content Management" (PDF). FP Complete. Retrieved 2014-03-02.
  6. ^ "FP Complete Case Study - JanRain -- User Management System" (PDF). FP Complete. Retrieved 2014-03-02.
  7. ^ "Blog tutorial on Snap and PostgreSQL". JanRain. Retrieved 2014-03-02.
  8. ^ "Haskell Snap App in Production". Luke Hoersten. Retrieved 2014-03-02.
  9. ^ "lpaste source code". Chris Done. Retrieved 2014-03-02.
  10. ^ "snap-core". www.hackage.org.
  11. ^ "snap-server". www.hackage.org.
  12. ^ "Snap 0.3 benchmarks with GHC 7.0.1". www.snapframework.com. Retrieved 2014-03-02.
  13. ^ "InfoQ Interview: Gregory Collins on High Performance Web Apps with Snap and Haskell". Sep 12, 2011.