happstack versus yesod

I already posted about this a little bit but i think i should let the old thread get back to it's regularly scheduled conversaion. on to my question: So I know there are a million easier ways to createa blog (wordpress, django, drupal, etc. etc.) but which would you recommend I use to build a beginner website that is simliar to a blog: happstack or yesod? _Ramy

Hello. It's very interesting theme for me and I want to express my opinion.
Yesod - very fast web-framework(
http://www.yesodweb.com/blog/preliminary-warp-cross-language-benchmarks).
But I don't like Yesod, because idea of Happstack more interesting for me.
Happstack gives to you some freedom.
I trying to use Snap Framework now. And it's very good for me. Try it
http://snapframework.com/!
Sorry for my english.
2011/4/5 Ramy Abdel-Azim
I already posted about this a little bit but i think i should let the old thread get back to it's regularly scheduled conversaion. on to my question:
So I know there are a million easier ways to createa blog (wordpress, django, drupal, etc. etc.) but which would you recommend I use to build a beginner website that is simliar to a blog: happstack or yesod? _Ramy
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

This probably isn't the right forum for expressing this thought, but here
goes anyway:
What exactly is the freedom that Yesod takes away from you? I know this idea
gets passed around a lot: Yesod isn't "really" Haskell, Yesod is its own
language, etc. But all of that is really just talking about some sugar that
Yesod puts in place for you: under the surface, it's just functions, data
types and type classes. You can go ahead and write a complete Yesod
application without using Template Haskell of QuasiQuotation.
So what's the restriction that Yesod has that Happstack/Snap don't? Yesod
requires you to provide some datatypes. That's it. What's the purpose of the
datatypes? Mostly, it's about type-safe URLs. I'm not exactly sure why the
term "restriction" or "freedom" even applies here: Yesod has a *feature*
that Happstack/Snap do not include out of the box.
Let me phrase this in a different way: "But I don't like Haskell, because
the idea of Python in more interesting for me. Python gives you some
freedom." I really do see this as the same argument. You can go ahead and
right some code without static type checking in Python, and you might even
write it faster than you would have in Haskell. But go ahead and start
making changes, and unless you have some very good unit tests, you're in for
a world of hurt. In Haskell, often times the compiler will save you from
yourself.
The same is true in Yesod. I've refactored incredibly large codebases, with
hundreds of different resource patterns, and *never* had to worry about
404s. Maybe some people consider that giving up freedom. I consider it
giving up the freedom to shoot yourself in the foot.
Oh, and if you are absolutely dependent on the idea of getting rid of this
data-type requirements, and want all the freedom of dynamic routes, you can
try out a 44 line module[1] that I mentioned recently[2].
OK, enough of this rant. I'm not trying to attack you, I'm just tired of
this notion that Yesod is a ball-and-chain around your ankles. People can
have legitimate reasons to prefer Happstack or Snap to Yesod, I've never
claimed that it was a perfect framework for everyone. I just don't think
this is one of those legitimate reasons.
Michael
[1] https://gist.github.com/884802
https://gist.github.com/884802[2]
http://osdir.com/ml/general/2011-04/msg02160.html
On Tue, Apr 5, 2011 at 8:35 PM, Alexey G
Hello. It's very interesting theme for me and I want to express my opinion. Yesod - very fast web-framework( http://www.yesodweb.com/blog/preliminary-warp-cross-language-benchmarks). But I don't like Yesod, because idea of Happstack more interesting for me. Happstack gives to you some freedom.
I trying to use Snap Framework now. And it's very good for me. Try it http://snapframework.com/!
Sorry for my english.
2011/4/5 Ramy Abdel-Azim
I already posted about this a little bit but i think i should let the old thread get back to it's regularly scheduled conversaion. on to my question:
So I know there are a million easier ways to createa blog (wordpress, django, drupal, etc. etc.) but which would you recommend I use to build a beginner website that is simliar to a blog: happstack or yesod? _Ramy
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

well, i'll add my $.02 here (hopefully without throwing fuel on the fire)
and say that - without knowing much about either, I asked the question for
pete's sake! - is that from what you're saying, if I'dlike to use one of
these frameworks to not only build my website but to also solidify what
knowledge of haskell i've acquired, I should go with Happstack.
On Tue, Apr 5, 2011 at 2:32 PM, Michael Snoyman
This probably isn't the right forum for expressing this thought, but here goes anyway:
What exactly is the freedom that Yesod takes away from you? I know this idea gets passed around a lot: Yesod isn't "really" Haskell, Yesod is its own language, etc. But all of that is really just talking about some sugar that Yesod puts in place for you: under the surface, it's just functions, data types and type classes. You can go ahead and write a complete Yesod application without using Template Haskell of QuasiQuotation.
So what's the restriction that Yesod has that Happstack/Snap don't? Yesod requires you to provide some datatypes. That's it. What's the purpose of the datatypes? Mostly, it's about type-safe URLs. I'm not exactly sure why the term "restriction" or "freedom" even applies here: Yesod has a *feature* that Happstack/Snap do not include out of the box.
Let me phrase this in a different way: "But I don't like Haskell, because the idea of Python in more interesting for me. Python gives you some freedom." I really do see this as the same argument. You can go ahead and right some code without static type checking in Python, and you might even write it faster than you would have in Haskell. But go ahead and start making changes, and unless you have some very good unit tests, you're in for a world of hurt. In Haskell, often times the compiler will save you from yourself.
The same is true in Yesod. I've refactored incredibly large codebases, with hundreds of different resource patterns, and *never* had to worry about 404s. Maybe some people consider that giving up freedom. I consider it giving up the freedom to shoot yourself in the foot.
Oh, and if you are absolutely dependent on the idea of getting rid of this data-type requirements, and want all the freedom of dynamic routes, you can try out a 44 line module[1] that I mentioned recently[2].
OK, enough of this rant. I'm not trying to attack you, I'm just tired of this notion that Yesod is a ball-and-chain around your ankles. People can have legitimate reasons to prefer Happstack or Snap to Yesod, I've never claimed that it was a perfect framework for everyone. I just don't think this is one of those legitimate reasons.
Michael
[1] https://gist.github.com/884802 https://gist.github.com/884802[2] http://osdir.com/ml/general/2011-04/msg02160.html
On Tue, Apr 5, 2011 at 8:35 PM, Alexey G
wrote: Hello. It's very interesting theme for me and I want to express my opinion. Yesod - very fast web-framework( http://www.yesodweb.com/blog/preliminary-warp-cross-language-benchmarks). But I don't like Yesod, because idea of Happstack more interesting for me. Happstack gives to you some freedom.
I trying to use Snap Framework now. And it's very good for me. Try it http://snapframework.com/!
Sorry for my english.
2011/4/5 Ramy Abdel-Azim
I already posted about this a little bit but i think i should let the old thread get back to it's regularly scheduled conversaion. on to my question:
So I know there are a million easier ways to createa blog (wordpress, django, drupal, etc. etc.) but which would you recommend I use to build a beginner website that is simliar to a blog: happstack or yesod? _Ramy
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

I'm not sure where you got that implication from. Happstack is a good
framework, and using it will definitely help you learn Haskell. But the same
is true of Yesod or Snap. I guess you might say that if your goal is to
learn Haskell, and not to create websites, then you shouldn't be using a
framework at all, and should be writing code that reads/sends ByteStrings
over sockets. You'll definitely learn more Haskell that way...
Michael
On Tue, Apr 5, 2011 at 9:50 PM, Ramy Abdel-Azim
well, i'll add my $.02 here (hopefully without throwing fuel on the fire) and say that - without knowing much about either, I asked the question for pete's sake! - is that from what you're saying, if I'dlike to use one of these frameworks to not only build my website but to also solidify what knowledge of haskell i've acquired, I should go with Happstack.
On Tue, Apr 5, 2011 at 2:32 PM, Michael Snoyman
wrote: This probably isn't the right forum for expressing this thought, but here goes anyway:
What exactly is the freedom that Yesod takes away from you? I know this idea gets passed around a lot: Yesod isn't "really" Haskell, Yesod is its own language, etc. But all of that is really just talking about some sugar that Yesod puts in place for you: under the surface, it's just functions, data types and type classes. You can go ahead and write a complete Yesod application without using Template Haskell of QuasiQuotation.
So what's the restriction that Yesod has that Happstack/Snap don't? Yesod requires you to provide some datatypes. That's it. What's the purpose of the datatypes? Mostly, it's about type-safe URLs. I'm not exactly sure why the term "restriction" or "freedom" even applies here: Yesod has a *feature* that Happstack/Snap do not include out of the box.
Let me phrase this in a different way: "But I don't like Haskell, because the idea of Python in more interesting for me. Python gives you some freedom." I really do see this as the same argument. You can go ahead and right some code without static type checking in Python, and you might even write it faster than you would have in Haskell. But go ahead and start making changes, and unless you have some very good unit tests, you're in for a world of hurt. In Haskell, often times the compiler will save you from yourself.
The same is true in Yesod. I've refactored incredibly large codebases, with hundreds of different resource patterns, and *never* had to worry about 404s. Maybe some people consider that giving up freedom. I consider it giving up the freedom to shoot yourself in the foot.
Oh, and if you are absolutely dependent on the idea of getting rid of this data-type requirements, and want all the freedom of dynamic routes, you can try out a 44 line module[1] that I mentioned recently[2].
OK, enough of this rant. I'm not trying to attack you, I'm just tired of this notion that Yesod is a ball-and-chain around your ankles. People can have legitimate reasons to prefer Happstack or Snap to Yesod, I've never claimed that it was a perfect framework for everyone. I just don't think this is one of those legitimate reasons.
Michael
[1] https://gist.github.com/884802 https://gist.github.com/884802[2] http://osdir.com/ml/general/2011-04/msg02160.html
On Tue, Apr 5, 2011 at 8:35 PM, Alexey G
wrote: Hello. It's very interesting theme for me and I want to express my opinion. Yesod - very fast web-framework( http://www.yesodweb.com/blog/preliminary-warp-cross-language-benchmarks ). But I don't like Yesod, because idea of Happstack more interesting for me. Happstack gives to you some freedom.
I trying to use Snap Framework now. And it's very good for me. Try it http://snapframework.com/!
Sorry for my english.
2011/4/5 Ramy Abdel-Azim
I already posted about this a little bit but i think i should let the old thread get back to it's regularly scheduled conversaion. on to my question:
So I know there are a million easier ways to createa blog (wordpress, django, drupal, etc. etc.) but which would you recommend I use to build a beginner website that is simliar to a blog: happstack or yesod? _Ramy
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

well, thanks for your opinions anyway, Michael.
On Tue, Apr 5, 2011 at 2:59 PM, Michael Snoyman
I'm not sure where you got that implication from. Happstack is a good framework, and using it will definitely help you learn Haskell. But the same is true of Yesod or Snap. I guess you might say that if your goal is to learn Haskell, and not to create websites, then you shouldn't be using a framework at all, and should be writing code that reads/sends ByteStrings over sockets. You'll definitely learn more Haskell that way...
Michael
On Tue, Apr 5, 2011 at 9:50 PM, Ramy Abdel-Azim
wrote: well, i'll add my $.02 here (hopefully without throwing fuel on the fire) and say that - without knowing much about either, I asked the question for pete's sake! - is that from what you're saying, if I'dlike to use one of these frameworks to not only build my website but to also solidify what knowledge of haskell i've acquired, I should go with Happstack.
On Tue, Apr 5, 2011 at 2:32 PM, Michael Snoyman
wrote: This probably isn't the right forum for expressing this thought, but here goes anyway:
What exactly is the freedom that Yesod takes away from you? I know this idea gets passed around a lot: Yesod isn't "really" Haskell, Yesod is its own language, etc. But all of that is really just talking about some sugar that Yesod puts in place for you: under the surface, it's just functions, data types and type classes. You can go ahead and write a complete Yesod application without using Template Haskell of QuasiQuotation.
So what's the restriction that Yesod has that Happstack/Snap don't? Yesod requires you to provide some datatypes. That's it. What's the purpose of the datatypes? Mostly, it's about type-safe URLs. I'm not exactly sure why the term "restriction" or "freedom" even applies here: Yesod has a *feature* that Happstack/Snap do not include out of the box.
Let me phrase this in a different way: "But I don't like Haskell, because the idea of Python in more interesting for me. Python gives you some freedom." I really do see this as the same argument. You can go ahead and right some code without static type checking in Python, and you might even write it faster than you would have in Haskell. But go ahead and start making changes, and unless you have some very good unit tests, you're in for a world of hurt. In Haskell, often times the compiler will save you from yourself.
The same is true in Yesod. I've refactored incredibly large codebases, with hundreds of different resource patterns, and *never* had to worry about 404s. Maybe some people consider that giving up freedom. I consider it giving up the freedom to shoot yourself in the foot.
Oh, and if you are absolutely dependent on the idea of getting rid of this data-type requirements, and want all the freedom of dynamic routes, you can try out a 44 line module[1] that I mentioned recently[2].
OK, enough of this rant. I'm not trying to attack you, I'm just tired of this notion that Yesod is a ball-and-chain around your ankles. People can have legitimate reasons to prefer Happstack or Snap to Yesod, I've never claimed that it was a perfect framework for everyone. I just don't think this is one of those legitimate reasons.
Michael
[1] https://gist.github.com/884802 https://gist.github.com/884802[2] http://osdir.com/ml/general/2011-04/msg02160.html
On Tue, Apr 5, 2011 at 8:35 PM, Alexey G
wrote: Hello. It's very interesting theme for me and I want to express my opinion. Yesod - very fast web-framework( http://www.yesodweb.com/blog/preliminary-warp-cross-language-benchmarks ). But I don't like Yesod, because idea of Happstack more interesting for me. Happstack gives to you some freedom.
I trying to use Snap Framework now. And it's very good for me. Try it http://snapframework.com/!
Sorry for my english.
2011/4/5 Ramy Abdel-Azim
I already posted about this a little bit but i think i should let the old thread get back to it's regularly scheduled conversaion. on to my question:
So I know there are a million easier ways to createa blog (wordpress, django, drupal, etc. etc.) but which would you recommend I use to build a beginner website that is simliar to a blog: happstack or yesod? _Ramy
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

to also solidify what
knowledge of haskell i've acquired, I should go with Happstack.
That doesn't follow. Either project will help you get better with Haskell. Unless you're looking to build a static site, in which case these frameworks are overkill and Hakyll [1] is a good option. As of now, Yesod [2] is much better documented than Happstack. As a Haskell beginner this is far more important to me than the use of quasiquoting. By the way, the happstack-state project (which is used to {de}serialize data structures to disk) is heavily dependent on quasiquoting. The Happstack project has a lot going for it and it has been around longer and thus might be considered more mature, but just from the quality of Yesod's website, documentation and the responsiveness of the lead developer it seems like a more beginner friendly project. -deech [1] http://jaspervdj.be/hakyll/ [2] http://www.yesodweb.com/
On Tue, Apr 5, 2011 at 2:32 PM, Michael Snoyman
wrote: This probably isn't the right forum for expressing this thought, but here goes anyway: What exactly is the freedom that Yesod takes away from you? I know this idea gets passed around a lot: Yesod isn't "really" Haskell, Yesod is its own language, etc. But all of that is really just talking about some sugar that Yesod puts in place for you: under the surface, it's just functions, data types and type classes. You can go ahead and write a complete Yesod application without using Template Haskell of QuasiQuotation. So what's the restriction that Yesod has that Happstack/Snap don't? Yesod requires you to provide some datatypes. That's it. What's the purpose of the datatypes? Mostly, it's about type-safe URLs. I'm not exactly sure why the term "restriction" or "freedom" even applies here: Yesod has a *feature* that Happstack/Snap do not include out of the box. Let me phrase this in a different way: "But I don't like Haskell, because the idea of Python in more interesting for me. Python gives you some freedom." I really do see this as the same argument. You can go ahead and right some code without static type checking in Python, and you might even write it faster than you would have in Haskell. But go ahead and start making changes, and unless you have some very good unit tests, you're in for a world of hurt. In Haskell, often times the compiler will save you from yourself. The same is true in Yesod. I've refactored incredibly large codebases, with hundreds of different resource patterns, and *never* had to worry about 404s. Maybe some people consider that giving up freedom. I consider it giving up the freedom to shoot yourself in the foot. Oh, and if you are absolutely dependent on the idea of getting rid of this data-type requirements, and want all the freedom of dynamic routes, you can try out a 44 line module[1] that I mentioned recently[2]. OK, enough of this rant. I'm not trying to attack you, I'm just tired of this notion that Yesod is a ball-and-chain around your ankles. People can have legitimate reasons to prefer Happstack or Snap to Yesod, I've never claimed that it was a perfect framework for everyone. I just don't think this is one of those legitimate reasons. Michael [1] https://gist.github.com/884802 [2] http://osdir.com/ml/general/2011-04/msg02160.html
On Tue, Apr 5, 2011 at 8:35 PM, Alexey G
wrote: Hello. It's very interesting theme for me and I want to express my opinion. Yesod - very fast web-framework(http://www.yesodweb.com/blog/preliminary-warp-cross-language-benchmarks). But I don't like Yesod, because idea of Happstack more interesting for me. Happstack gives to you some freedom. I trying to use Snap Framework now. And it's very good for me. Try it http://snapframework.com/! Sorry for my english.
2011/4/5 Ramy Abdel-Azim
I already posted about this a little bit but i think i should let the old thread get back to it's regularly scheduled conversaion. on to my question: So I know there are a million easier ways to createa blog (wordpress, django, drupal, etc. etc.) but which would you recommend I use to build a beginner website that is simliar to a blog: happstack or yesod? _Ramy _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

My uninformed take on this is that Yesod is a bit like Django, ~everything comes as default, and the packages have been chosen for you. Yesod/django holds your hand and tells you the right way to do x. Happstack on the other hand is like Pylons where you have the freedom to choose your db libraries/whatever you need. Pylons is also maybe bit more vanilla python without so much "sugaring" (I don't think the term applies well to python, but for yesod/happstack argument it does) I'm not saying that Yesod prevents you from choosing your own DB abstraction layer, I'm saying it comes with one. I think both approaches are good, and it depends on your requirements, which you should choose. On a side-note, both of their documentation is "great". They both seem a bit raw, especially yesod, but the content within already is excellent and provide great ideas. I've used Yesod's documentation to deepen my understanding on web technologies, type safety and enumerators. Happstack has taught me more concrete areas such as MonadPlus and Alternative (msum for routing <3).

Good morning,
Thank you for your very informative comments...
I'm starting Yesod and will , now, also take a look at happstack...
I'm an independent software consultant, so I'm looking for a way to make
money using Haskell...
I tried installing the TK interface to Haskell but was unable to get it
loaded...I spent about a week on it before finally abandoning this effort...
So, I was about ready to give up on Haskell, since I couldn't figure how to
connect it to TK or to the web, and then along came Yesod and Happstack,
hopefully, to the rescue...
I'll let you know how I make out
Wish me luck
----- Original Message -----
From: "Mats Rauhala"
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
participants (6)
-
aditya siram
-
Alexey G
-
Mats Rauhala
-
Michael Snoyman
-
Patrick Lynch
-
Ramy Abdel-Azim