Snap (web framework)
Web development framework in Haskell
From Wikipedia, the free encyclopedia
Snap is a web framework for developing web applications written in the functional programming language Haskell.[3][4]
Original authorsGregory Collins, Doug Beardsley[1]
Initial releaseMay 2010
Stable release
1.1.3.2[2]
/ July 19, 2023
| Snap | |
|---|---|
| Original authors | Gregory Collins, Doug Beardsley[1] |
| Developer | Snap Team |
| Initial release | May 2010 |
| Stable release | 1.1.3.2[2]
/ July 19, 2023 |
| Written in | Haskell |
| Operating system | Cross-platform: Unix, Unix-like, macOS; Windows NT |
| Platform | IA-32, x86-64 |
| Available in | English |
| Type | Web framework |
| License | BSD |
| Website | snapframework |
| Repository | github |
Overview
The Snap framework consists of the following:
- snap-core,[5] a generic Haskell web server API.
- snap-server,[6] a fast[7] HTTP server that implements the snap-core interface.
- Heist,[8] 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,[9] 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.[10]
Snap runs on both Windows NT and Unix-like platforms. Snap uses the Iteratee input/output (I/O) model,[11] As of version 1.0, its I/O is implemented with io-streams.
Usage
Other Haskell web frameworks
- Yesod (web framework)
- Servant (web framework)
- Scotty[19]
- Spock[20]
- MFlow[21]
- Miso[22]