Difference between revisions of "Web/Comparison of Happstack, Snap and Yesod"
m (→Features: happstack-fay)
m (→Features: yesod-fay)
|Line 226:||Line 226:|
| jmacro, fay
| jmacro, fay
! Form Processing
! Form Processing
Revision as of 23:46, 24 November 2012
Note: Work in progress. I will outline planned sections in headings momentarily.
There is no existing complete comparison of Happstack, Snap and Yesod. Such a thing helps people to choose and feel they've made a well-founded decision.
The home page
I'll start with the web sites at first impression.
- Happstack's web site is simple and clean.
- Snap's web site is pretty and professionally designed.
- Yesod's web site is okay, good links.
Next, the main maintainers of the projects is handy to know:
- Happstack — Happstack is currently maintained by Jeremy Shaw (aka stepcut) with financial support from seereason.com. Significant past (and present) contributors and maintainers include Alex Jacobson, Lemmih, Matthew Elder, Andrea Vezzosi (Saizan), Thomas Hartman, Gracjan Polak, Antoine Latter, Joachim Fasting, Facundo Domínguez, Creighton Hogg, Einar Karttunen, Shae Erisson (shapr), Ian Lynagh, and others.
- Snap — Many are listed as ‘contributors’ on the about page, but Gregory Collins and Doug Beardsley are certainly maintainers, the rest I'm not sure, may be just contributors; (Shu-yu Guo, James Sanders, Carl Howells, Shane O'Brien, Ozgun Ataman, Chris Smith, Jurriën Stutterheim.) the site doesn't distinguish.
- Yesod — Michael Snoyman, Greg Weber, (Garnered from the contributors page, via Community.) there are other contributors listed, some of which might be maintainers. (Felipe Lessa, Patrick Brisbin, Luite Stegeman, Hiromi ISHII, Kazu Yamamoto. See the page for past contributors.)
- Happstack — Garnered from the Community page, the HappS mailing list, #happs on Freenode IRC, with IRC logs, Google Code for issue tracking, a wiki, Twitter, a Facebook group, and the happstack tag on StackOverflow.
- Snap — Garnered from the About page, the Snap mailing list #snapframework on Freenode IRC, Github for issue tracking.
- Yesod — Garnered from the Community Resources, StackOverflow, a Google Group, the web-devel mailing list, (Which, due to the large proportion of Yesod-related questions, has essentially become ‘yesod-devel’.) #yesod on Freenode IRC, Github for issue tracking, a wiki for posting documentation.
There is roughly the same set of documentation for each, varying in side and detail, with a quickstart for each, more complete tutorials, and haddock API documentation.
- Happstack — A small tutorial covering writing a simple program, a larger crash course cover routing, templating, request handling, static files and database state, and examples. And haddock docs.
- Snap — A simple quickstart guide, a slightly larger tutorial similar to happstack's, a tutorial on snaplets (Snap's means of extension), a tutorial on heist (Snap's templating) and haddock docs.
- Yesod — a simple quickstart guide similar to Snap's, screencasts, an online book similar to Happstack's crash course, covering templates, widgets, routing, forms, sessions, databases, deployment, authentication, scaffolding, internationalisation, and examples. And haddock docs.
It's interesting to know who is using these frameworks.
- Matt Gruen used Happstack to create Hackage 2.0.
- The Happstack homepage is written with Happstack.
- Creative Prompts — A site for exchanging story ideas -- which was developed but never got around to promoting.
- See Reason — A site which allows you to construct and prove arguments using first order logic. This site is in public beta.
- A (4chan clone) image board (not running anywhere).
- Gitit is a Happstack wiki app.
- Patch-Tag provides hosting for Darcs repositories and Gitit wikis.
- npaste.de Happstack + PostgreSQL pastebin with src on github
- Personal site of James Halliday with src on github
- reskell a hacker news clone
- noscolls.com a website for tracking CrossFit workout results
- Silk — a new way to create and consume content. (runs a mixture of Ruby, Happstack, and Snap)
- AtikTeam - an online software for project management and teamwork.
- hpaste — the Haskell pastebin.
- Darcs Den — a place to share your darcs projects and collaborate with others.
- housetab.org — a webapp for sharing expenses (source code here)
- JCU — a web-based Prolog environment.
- snap-pastie another pastebin.
- snapframework.com the Snap home page.
- Silk — a new way to create and consume content.
- Karamaan Group — uses Snap for an internal company intranet.
- Haskellers uses Yesod: https://github.com/snoyberg/haskellers
- Braden Shepherdson made an AJAX chat application using Yesod.
- Björn Buckwalter made a URL shortener using Yesod.
- TKYProf — a ghc profiling visualizer
- Orange Roster — Open source, privacy-centric shared address book.
- hledger-web — The web interface for the hledger accounting tool.
- Urban Listings — A free listing website for the South African property market.
- Luach — English and Hebrew anniversary reminders.
- Hoogle — Uses some of the Yesod stack, mostly Wai/Warp.
- Haskellers — Professional network of Haskell programmers.
- packdeps — Track outdated Hackage dependencies.
- yackage — A personal Hackage serving for testing new packages.
- Kestrel — A Wiki clone. This site has been published as a home customized to a university department (Seitoku University Junior College).
- Buccaneer Battle — A multi-player game in the browser: as the captain of a pirate ship, try to sink your opponent!
- Personal site of Patrick Brisbin — might be of interest for those wanting to create a blog.
- Personal site of Blake Rain
- Personal site of Pascal Wittmann
Repositories and Installation
I am running Ubuntu 10.04.
$ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.12.3 $ cabal --version cabal-install version 0.10.2 using version 188.8.131.52 of the Cabal library $ cabal-dev install happstack … Registering happstack-6.0.5... real 2m13.240s user 1m38.886s sys 0m7.588s
Installs fine in GHC 6.12.3 in a couple of minutes.
The web site Download page advises to install the snap package from Hackage:
$ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.12.3 $ cabal --version cabal-install version 0.10.2 using version 184.108.40.206 of the Cabal library $ cabal-dev install snap … Registering snap-0.7... real 5m1.105s user 4m24.369s sys 0m15.389s
Installs fine in GHC 6.12.3 in a couple of minutes.
The web site advises to install the yesod package from Hackage.
$ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.12.3 $ cabal --version cabal-install version 0.10.2 using version 220.127.116.11 of the Cabal library $ time cabal-dev install yesod Resolving dependencies... cabal: cannot configure conduit-0.0.1.1. It requires base >=4.3 && <5 For the dependency on base >=4.3 && <5 there are these packages: base-18.104.22.168, base-22.214.171.124, base-126.96.36.199 and base-188.8.131.52. However none of them are available.
This was anticipated in the documentation, (“If you want to install yesod painlessly, get ghc >= 7.” from the install help wiki page. ) so the behaviour is expected.
chris@cn-done:~/yesod$ export PATH=/opt/ghc/7.0.4/bin/:$PATH chris@cn-done:~/yesod$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.0.4 chris@cn-done:~/yesod$ cabal install Cabal cabal-install --bindir=/opt/ghc/7.0.4/bin … Linking dist/build/cabal/cabal ... Installing executable(s) in /opt/ghc/7.0.4/bin chris@cn-done:~/yesod$ cabal --version cabal-install version 0.10.2 using version 184.108.40.206 of the Cabal library
So I'm now on 7.0.4 with the latest cabal installed for 7.0.4. Proceeding should work:
$ time cabal-dev install yesod … Registering yesod-0.9.4.1... real 8m55.781s user 7m2.446s sys 0m21.809s
Installs with no problems as the guide suggests.
This is an overview of features as supported directly by code in published packages. When a feature is listed as "no special support" for a framework, it usually means you could somewhat trivially add the support yourself by integrating existing packages into the framework.
|Server||lazy IO (being rewritten with pipes)||enumerator||conduit|
|Scaffolding||not maintained||three templates||one template, interactive options|
|Configuration||records||configurator||type classes, yaml|
|Routing Combinators||yes||yes||yes, with yesod-pure|
|Type-safe Routing||web-routes fully supported||no special support, but can integrate web-routes manually||template-haskell DSL|
|Logic-free Templating||heist supported||heist fully supported and preferred||no special support|
|Embedded Templating||hsp and blaze-html fully supported||can use blaze-html in heist splices, but discouraged||hamlet fully supported|
|External Databases||no special support (unless you count acid-state's "remote" backend)||several snaplets||persistent|
|Internal Databases||acid-state (via documentation and happstack-foundation)||snaplet-acid-state, snaplet-sqlite-simple||persistent-sqlite|