
Hi there, There are some web frameworks out there, as snap, yesod, happstack, and perhaps even more. I'd like to get a recommendation which web framework might be easiest to get into, and to use for a haskell beginner. -- Thanks, Manfred

Hi,
Sorry, but I'm not sure if there is a single framework that is easy for a
beginner :) But from all above I'd choose Yesod. I have some expierience in
web development in haskell (i made SaaS service to create and manage online
stores with haskell - alovendo.com). Unfortunately when I started it I also
was a beginner and decided to build my own framework to get deeper
understanding of what i was doing. Since then i reviewed existing frameworks
and in my opinion Yesod has beautiful and powerful architecture with many
options to customize it to your own needs. If i ever start another web
project in haskell I definitely choose yesod.
2011/6/17 Manfred Lotz
Hi there, There are some web frameworks out there, as snap, yesod, happstack, and perhaps even more.
I'd like to get a recommendation which web framework might be easiest to get into, and to use for a haskell beginner.
-- Thanks, Manfred
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

On 08:30 Fri 17 Jun , Manfred Lotz wrote:
Hi there, There are some web frameworks out there, as snap, yesod, happstack, and perhaps even more.
I'd like to get a recommendation which web framework might be easiest to get into, and to use for a haskell beginner.
My opinion is that you should go with Happstack. It doesn't hold your hand as Yesod does, and enables you to learn a bit at the same time. But the real deal comes from the fact that Happstack is already mature, and has pretty good documentation. The Yesod people are doing a great job with their book, but as long as it's only half finished, it's a pain to learn Yesod. There seems to be no api docs whatsoever. -- Mats Rauhala MasseR

On Fri, Jun 17, 2011 at 3:01 PM, Mats Rauhala
On 08:30 Fri 17 Jun , Manfred Lotz wrote:
Hi there, There are some web frameworks out there, as snap, yesod, happstack, and perhaps even more.
I'd like to get a recommendation which web framework might be easiest to get into, and to use for a haskell beginner.
My opinion is that you should go with Happstack. It doesn't hold your hand as Yesod does, and enables you to learn a bit at the same time.
But the real deal comes from the fact that Happstack is already mature, and has pretty good documentation. The Yesod people are doing a great job with their book, but as long as it's only half finished, it's a pain to learn Yesod. There seems to be no api docs whatsoever.
(Note: I'm the leader developer on Yesod.) I'd like to respectfully disagree with this assessment. I'm not quite sure what you mean by "mature", but Yesod has been developed actively for two years, has the vast majority of features you'll need on a project, is in use by many production settings and has the highest performance figures of any of the big three frameworks. As for documentation: the Yesod book as it stands is already pretty thorough. The entire basics section is complete, sans minor improvements that are constantly happening. Some of the more advanced features are not fully documented, but I'm not sure if you could say otherwise about Happstack (or Snap for that matter). And if by "API docs" you mean the Haddocks autogenerated on the Hackage server... unfortunately, that's a known issue with Hackage, outside of our control. But the sources themselves have Haddocks, and you can generate the documentation locally with some simple changes to your cabal config file. I'm not saying Happstack or Snap are bad frameworks, quite the opposite. But I don't think these generic "X isn't mature" or "Y has bad documentation" do much to help newcomers become acclimated. Michael

On 17 June 2011 14:53, Michael Snoyman
I'm not saying Happstack or Snap are bad frameworks, quite the opposite. But I don't think these generic "X isn't mature" or "Y has bad documentation" do much to help newcomers become acclimated.
I'll back this up, Yesod has quite an extensive book with tips and tricks including corner cases and such: http://www.yesodweb.com/book I'd like to respectfully disagree with this assessment. I'm not quite
sure what you mean by "mature", but Yesod has been developed actively for two years, has the vast majority of features you'll need on a project, is in use by many production settings and has the highest performance figures of any of the big three frameworks.
FWIW I think he means the API changes, not that the software itself is runtime-stable. The "developed actively" may imply a changing API. I don't know whether this is true, but I think that's what he meant. Anyway, I doubt maturity as in runtime stability matters that much to newbies.

Yesod is cool though I know a little about that.
Actually I have one question that what's the reason it has 'special' (a
better word?) style at programming CSS and JavaScripts?
Seems like no other frameworks doing that? (Correct me if I am wrong)
Thanks.
-Simon
On Fri, Jun 17, 2011 at 9:38 PM, Christopher Done
On 17 June 2011 14:53, Michael Snoyman
wrote: I'm not saying Happstack or Snap are bad frameworks, quite the opposite. But I don't think these generic "X isn't mature" or "Y has bad documentation" do much to help newcomers become acclimated.
I'll back this up, Yesod has quite an extensive book with tips and tricks including corner cases and such: http://www.yesodweb.com/book
I'd like to respectfully disagree with this assessment. I'm not quite
sure what you mean by "mature", but Yesod has been developed actively for two years, has the vast majority of features you'll need on a project, is in use by many production settings and has the highest performance figures of any of the big three frameworks.
FWIW I think he means the API changes, not that the software itself is runtime-stable. The "developed actively" may imply a changing API. I don't know whether this is true, but I think that's what he meant.
Anyway, I doubt maturity as in runtime stability matters that much to newbies.
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

On 17 June 2011 16:49, Haisheng Wu
Actually I have one question that what's the reason it has 'special' (a better word?) style at programming CSS and JavaScripts? Seems like no other frameworks doing that? (Correct me if I am wrong)
You don't really need a framework to do CSS https://github.com/chrisdone/amelie/blob/master/src/Amelie/View/Style.hs https://github.com/chrisdone/amelie/blob/master/src/Amelie/View/Style.hsor JavaScript https://github.com/chrisdone/amelie/blob/master/src/Amelie/View/Script.hs https://github.com/chrisdone/amelie/blob/master/src/Amelie/View/Script.hsin a first-class Haskell DSL. The benefit is that you can manipulate both at a kind of macro level, and benefit from Haskell's type system if you wish to make your JavaScript or CSS type-safe.

I know that haml[1], sass[2] and CoffeeScript[3] that are used quite
commonly in the ruby community for generating html, css and javascript
respectively.
I believe Yesod's primary motivation for using 'special' templates is
the ability to make static guarantees about wether URLs, etc are
valid, but they also alleviate some code repetition.
I'd actually be very happy if Yesod supported the syntax from haml,
etc, as it would be one less syntax to learn (not that the options
offered take long to learn) and these languages are quite nice to
write in.
--
[1] http://haml-lang.com/
[2] http://sass-lang.com/
[3] http://jashkenas.github.com/coffee-script/
On Fri, Jun 17, 2011 at 10:55 PM, Christopher Done
On 17 June 2011 16:49, Haisheng Wu
wrote: Actually I have one question that what's the reason it has 'special' (a better word?) style at programming CSS and JavaScripts? Seems like no other frameworks doing that? (Correct me if I am wrong)
You don't really need a framework to do CSS https://github.com/chrisdone/amelie/blob/master/src/Amelie/View/Style.hs or JavaScript https://github.com/chrisdone/amelie/blob/master/src/Amelie/View/Script.hs in a first-class Haskell DSL. The benefit is that you can manipulate both at a kind of macro level, and benefit from Haskell's type system if you wish to make your JavaScript or CSS type-safe. _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

https://github.com/chrisdone/amelie/blob/master/src/Amelie/View/Script.hsin a first-class Haskell DSL. The benefit is that you can manipulate both at a kind of macro level, and benefit from Haskell's type system if you wish to make your JavaScript or CSS type-safe.
Maybe that's the key point Yesod use sass and CoffeeScript. Thanks all. -Simon

That's a very good question, to which Chris and Lyndon have already
hinted at the answer. But there's more to it than that:
* Julius (Javascript) actually isn't a different syntax at all, it's
simply a pass-through parser.
* With Lucius and Cassius (for CSS), each one provides some syntactic
sugar over plain CSS that people like.
* All three languages allow for variable interpolation, including
type-safe URL interpolation.
* Lucius and Cassius automatically minify their output.
* We get many compile-time checks, but on variable existence and
correct typeness, and well-formedness of the file.
* These systems compose very nicely via widgets.
* And via these widgets, we're able to easily concatenate multiple
templates into a single file to be efficiently served via one HTTP
request.
Michael
On Fri, Jun 17, 2011 at 5:49 PM, Haisheng Wu
Yesod is cool though I know a little about that. Actually I have one question that what's the reason it has 'special' (a better word?) style at programming CSS and JavaScripts? Seems like no other frameworks doing that? (Correct me if I am wrong) Thanks. -Simon
On Fri, Jun 17, 2011 at 9:38 PM, Christopher Done
wrote: On 17 June 2011 14:53, Michael Snoyman
wrote: I'm not saying Happstack or Snap are bad frameworks, quite the opposite. But I don't think these generic "X isn't mature" or "Y has bad documentation" do much to help newcomers become acclimated.
I'll back this up, Yesod has quite an extensive book with tips and tricks including corner cases and such: http://www.yesodweb.com/book
I'd like to respectfully disagree with this assessment. I'm not quite sure what you mean by "mature", but Yesod has been developed actively for two years, has the vast majority of features you'll need on a project, is in use by many production settings and has the highest performance figures of any of the big three frameworks.
FWIW I think he means the API changes, not that the software itself is runtime-stable. The "developed actively" may imply a changing API. I don't know whether this is true, but I think that's what he meant. Anyway, I doubt maturity as in runtime stability matters that much to newbies. _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

Don't get me wrong. I respect you work, and I believe Yesod is awesome. Actually for the project I'm working on, I seem to try to emulate Yesod with happstack. I even tried to switch to Yesod midway, but as soon as I tried to reimplement authentication I hit a brick wall. I checked [1] and [2] and even checked the haskellers source. [3] has a bit better documentation, and if only had checked the github site, I might have chosen otherwise. Compared to [4] and [5] where I could easily see examples with documentation. Keep up the good work. I know I will keep checking the book frequently :). 1. http://hackage.haskell.org/package/authenticate-0.9.1.3 2. http://www.yesodweb.com/book/auth 3. http://hackage.haskell.org/package/yesod-auth-0.5.0 4. http://hackage.haskell.org/package/happstack-auth 5. https://github.com/mcmaniac/happstack-auth/tree/master/demo -- Mats Rauhala MasseR

On 17 June 2011 14:01, Mats Rauhala
On 08:30 Fri 17 Jun , Manfred Lotz wrote:
Hi there, There are some web frameworks out there, as snap, yesod, happstack, and perhaps even more.
I'd like to get a recommendation which web framework might be easiest to get into, and to use for a haskell beginner.
Oh well, I might as well chime in with Snap. I'd say it's easiest to get into for a beginner. That's partly why I used it for http://hpaste.org/, because I wanted people who knew Haskell and had done web dev elsewhere but didn't necessarily know how X framework's magic worked, to be able to hack on it. FWIW checkout the source here: https://github.com/chrisdone/amelie The API is well-documented and it's basically only just one step up above CGI, so the concepts are bog standard web dev. Everything you need to get going with something simple in Snap is here: http://snapframework.com/docs/tutorials/snap-api and then http://snapframework.com/docs/latest/snap-core/index.html for everything else.

On Fri, 17 Jun 2011 08:30:10 +0200
Manfred Lotz
Hi there, There are some web frameworks out there, as snap, yesod, happstack, and perhaps even more.
I'd like to get a recommendation which web framework might be easiest to get into, and to use for a haskell beginner.
Thanks to all for sharing your opinions. I didn't get a clear answer but I would say there is no clear answer available. So perhaps I'll play with all of them. -- Thanks again, Manfred
participants (7)
-
Christopher Done
-
Dmitry Simonchik
-
Haisheng Wu
-
Lyndon Maydwell
-
Manfred Lotz
-
Mats Rauhala
-
Michael Snoyman