Personal tools

Web/Comparison of Happstack, Snap and Yesod

From HaskellWiki

< Web(Difference between revisions)
Jump to: navigation, search
m (Removed bloggy text.)
m (Replace refs with parens.)
Line 15: Line 15:
 
Next, the main maintainers of the projects is handy to know:
 
Next, the main maintainers of the projects is handy to know:
   
* Happstack — There is no link on the homepage about maintainers, but I garnered [http://www.n-heptane.com/ Jeremy Shaw],<ref>Figured out from [http://www.haskellers.com/user/52 here], “Maintainer of Happstack, the Haskell web application framework: http://www.happstack.com/”</ref> aka stepcut. I can't tell if there are any more maintainers, [http://patch-tag.com/r/mae/happstack/snapshots/all/history the darcs history] doesn't show any major contributors. A list of contributors, I suppose, can be seen [http://patch-tag.com/r/mae/happstack/home on the patch-tag homepage], I'm not going to bother trying to convert usernames to real names.<ref>Lemmih, Saizan, alexjacobson, creighton, mightybyte, stepcut, tphyahoo.</ref>
+
* Happstack — There is no link on the homepage about maintainers, but I garnered [http://www.n-heptane.com/ Jeremy Shaw], (Figured out from [http://www.haskellers.com/user/52 here], “Maintainer of Happstack, the Haskell web application framework: http://www.happstack.com/”) aka stepcut. I can't tell if there are any more maintainers, [http://patch-tag.com/r/mae/happstack/snapshots/all/history the darcs history] doesn't show any major contributors. A list of contributors, I suppose, can be seen [http://patch-tag.com/r/mae/happstack/home on the patch-tag homepage], I'm not going to bother trying to convert usernames to real names. (Lemmih, Saizan, alexjacobson, creighton, mightybyte, stepcut, tphyahoo.)
* Snap — Many are listed as ‘contributors’ on [http://snapframework.com/about the about page], but [http://gregorycollins.net/ Gregory Collins] and [http://softwaresimply.blogspot.com/ Doug Beardsley] are certainly maintainers, the rest I'm not sure, may be just contributors;<ref>[http://rfrn.org/~shu Shu-yu Guo], [http://james-sanders.com/ James Sanders], Carl Howells, Shane O'Brien, [http://github.com/ozataman Ozgun Ataman], [http://github.com/cdsmith Chris Smith], [https://github.com/norm2782 Jurriën Stutterheim].</ref> the site doesn't distinguish.
+
* Snap — Many are listed as ‘contributors’ on [http://snapframework.com/about the about page], but [http://gregorycollins.net/ Gregory Collins] and [http://softwaresimply.blogspot.com/ Doug Beardsley] are certainly maintainers, the rest I'm not sure, may be just contributors; ([http://rfrn.org/~shu Shu-yu Guo], [http://james-sanders.com/ James Sanders], Carl Howells, Shane O'Brien, [http://github.com/ozataman Ozgun Ataman], [http://github.com/cdsmith Chris Smith], [https://github.com/norm2782 Jurriën Stutterheim].) the site doesn't distinguish.
* Yesod — [http://www.snoyman.com/ Michael Snoyman], [http://blog.gregweber.info/ Greg Weber],<ref>Garnered from [http://www.yesodweb.com/page/contributors the contributors page], via Community.</ref> there are other contributors listed, some of which might be maintainers.<ref>Felipe Lessa, [http://pbrisbin.com/ Patrick Brisbin], [https://github.com/luite Luite Stegeman], [http://konn.x0.com/ Hiromi ISHII], [http://www.mew.org/~kazu/ Kazu Yamamoto]. See the page for past contributors.</ref>
+
* Yesod — [http://www.snoyman.com/ Michael Snoyman], [http://blog.gregweber.info/ Greg Weber], (Garnered from [http://www.yesodweb.com/page/contributors the contributors page], via Community.) there are other contributors listed, some of which might be maintainers. (Felipe Lessa, [http://pbrisbin.com/ Patrick Brisbin], [https://github.com/luite Luite Stegeman], [http://konn.x0.com/ Hiromi ISHII], [http://www.mew.org/~kazu/ Kazu Yamamoto]. See the page for past contributors.)
   
 
== Communities ==
 
== Communities ==
Line 23: Line 23:
 
* Happstack — Garnered from [http://happstack.com/community the Community page], [http://groups.google.com/group/HAppS the HappS mailing list], #happs on Freenode IRC, [http://happstack.com/irc-logs/ with IRC logs], [http://code.google.com/p/happstack/issues/list Google Code] for issue tracking, [http://code.google.com/p/happstack/w/list a wiki], [http://www.twitter.com/happstack Twitter], a [http://www.facebook.com/happstack Facebook group].
 
* Happstack — Garnered from [http://happstack.com/community the Community page], [http://groups.google.com/group/HAppS the HappS mailing list], #happs on Freenode IRC, [http://happstack.com/irc-logs/ with IRC logs], [http://code.google.com/p/happstack/issues/list Google Code] for issue tracking, [http://code.google.com/p/happstack/w/list a wiki], [http://www.twitter.com/happstack Twitter], a [http://www.facebook.com/happstack Facebook group].
 
* Snap — Garnered from the [http://snapframework.com/about About page], [http://mailman-mail5.webfaction.com/listinfo/snap the Snap mailing list] #snapframework on Freenode IRC, [https://github.com/snapframework/snap-core/issues Github] for issue tracking.
 
* Snap — Garnered from the [http://snapframework.com/about About page], [http://mailman-mail5.webfaction.com/listinfo/snap the Snap mailing list] #snapframework on Freenode IRC, [https://github.com/snapframework/snap-core/issues Github] for issue tracking.
* Yesod — Garnered from the [http://www.yesodweb.com/page/community Community Resources], [http://stackoverflow.com/questions/tagged/yesod StackOverflow], a [http://groups.google.com/group/yesodweb?pli=1 Google Group], [http://www.haskell.org/mailman/listinfo/web-devel the web-devel mailing list],<ref>Which, due to the large proportion of Yesod-related questions, has essentially become ‘yesod-devel’.</ref> #yesod on Freenode IRC, [https://github.com/yesodweb/yesod/issues Github] for issue tracking, a [http://www.yesodweb.com/wiki wiki] for posting documentation.
+
* Yesod — Garnered from the [http://www.yesodweb.com/page/community Community Resources], [http://stackoverflow.com/questions/tagged/yesod StackOverflow], a [http://groups.google.com/group/yesodweb?pli=1 Google Group], [http://www.haskell.org/mailman/listinfo/web-devel the web-devel mailing list], (Which, due to the large proportion of Yesod-related questions, has essentially become ‘yesod-devel’.) #yesod on Freenode IRC, [https://github.com/yesodweb/yesod/issues Github] for issue tracking, a [http://www.yesodweb.com/wiki wiki] for posting documentation.
   
 
== Documentation ==
 
== Documentation ==
Line 124: Line 124:
 
packages: base-4.3.0.0, base-4.3.1.0, base-4.4.0.0 and
 
packages: base-4.3.0.0, base-4.3.1.0, base-4.4.0.0 and
 
base-4.4.1.0. However none of them are available.</pre>
 
base-4.4.1.0. However none of them are available.</pre>
This was anticipated in the documentation,<ref>“If you want to install yesod painlessly, get ghc &gt;= 7.” from [http://www.yesodweb.com/wiki/install-help the install help wiki page.]
+
This was anticipated in the documentation, (“If you want to install yesod painlessly, get ghc &gt;= 7.” from [http://www.yesodweb.com/wiki/install-help the install help wiki page.]
</ref> so the behaviour is expected.
+
) so the behaviour is expected.
   
 
<pre>chris@cn-done:~/yesod$ export PATH=/opt/ghc/7.0.4/bin/:$PATH
 
<pre>chris@cn-done:~/yesod$ export PATH=/opt/ghc/7.0.4/bin/:$PATH
Line 148: Line 148:
 
sys 0m21.809s</pre>
 
sys 0m21.809s</pre>
 
Installs with no problems as the guide suggests.
 
Installs with no problems as the guide suggests.
 
<references />
 

Revision as of 20:32, 11 January 2012

Still fixing the formatting broken stuff from conversion to wiki from markdown. 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.

Contents

1 The home page

I'll start with the web sites at first impression.

2 Maintainers

Next, the main maintainers of the projects is handy to know:

3 Communities

4 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.

5 Use Cases

It's interesting to know who is using these frameworks.

5.1 Happstack

5.2 Snap

Not found any yet.

  • hpaste is written with Snap but that's my own so it doesn't count.

5.3 Yesod

5.3.1 Massive Tactical

Massive Tactical are using Yesod, but their web site is down, so it's hard to learn anything from that. However, the testimonial by Simon Cheung is interesting:

In the beginning, I found Hamlet and Cassius to be quite strange. After some time I found it a lot easier to use. The Hamlet makes rapid design easier: less typing and no worrying about tag mismatches. It was also really good to only have to do something once with widgets! It took me a bit longer to get to grips with haskell: when I get told that "customers is a [(CustomerId, Maybe Customer)]" it took me a while to work out what to do with it :) After I'd learned basics it became a lot easier and my work was a lot simpler. Working at Massive started off quite scary: totally different development than what Im used to! After having worked on two projects using Yesod I will wish they are all this easy!

Hachicode is using Yesod, quoth “Nubis”, presumbly a developer:

Between our server and client we use C, C++, Java, Objective-C, Javascript and Haskell. We've got weird runtime errors and sometimes even race conditions in all of them except Haskell. Yesod is clearly far behind rails and django in terms of convenience, but already has a much stronger foundation and the potential to catch up quick without giving that up.

5.3.2 Miscellaneous

6 Repositories and Installation

I am running Ubuntu 10.04.

6.1 Happstack

Installed from the happstack package from Hackage, or can be retrieved via the patch-tag Darcs repository. Info from the Download page.

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.3
$ cabal --version
cabal-install version 0.10.2
using version 1.10.2.0 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.

6.2 Snap

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 1.10.2.0 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.

6.3 Yesod

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 1.10.2.0 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-4.3.0.0, base-4.3.1.0, base-4.4.0.0 and
base-4.4.1.0. 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 1.10.2.0 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.