JakubArnold

Yesod is Fun

May 15, 2014

Disclaimer: This article is completely subjective. I'm just sharing the feelings I got from trying out different frameworks and how each made me feel as a beginner. This is by no means an objective comparison of the frameworks.

I've been trying many Haskell web frameworks over the past few weeks. I wrote one small app with Simple, almost wrote another one with Scotty. Then decided it's time to take a look at the big guys, Happstack, Snap and Yesod.

First I tried Happstack, which felt kind of OK and very understandable, mostly because it doesn't seem to be trying to do much magic. This is really great for learning, but then I stumbled when I found that it's not actually being developed on GitHub. I know this in itself isn't an argument against Happstack, but given that it seems to be the least popular and least used out of the three, it definitely doesn't help it get higher on my list.

Next goes Snap, which I have really mixed feelings about. At first Snap feels very simple and well documented, and even has a book, which I immediately bought. There is even an IRC room with more than 20 people in it. I was so excited. But then small things started to pile up and I became less and less excited.

While the documentation seems to be sufficient, I couldn't really found the answers to many of my questions, the IRC room while full of people is very idle and the GitHub repo seems quite dead. I will definitely give Snap another try in the next weeks.

And then came Yesod. I've been avoiding Yesod for quite some time, mostly because I assumed it's a big ball of magic, as Rails is, and I wanted to avoid that in the beginning. I also tried it about a year ago and failed, but this time I decided to really dig in and write something in Yesod.

I haven't really made much progress yet, but there's an interesting factor that was missing from the other frameworks (apart from Simple), and that is fun. Yesod is fun.

Everything worked out of the box and the way I expected. Even the automatic migrations which I didn't like at first surprised me by doing the right thing every time I used it. While there is a lot of Template Haskell being used it actually does make a lot of sense after studying it for a while. It might make some things a bit more obscure, but I find it being used very reasonably and in ways which make sense to me.

Also every time I check out any of the repos for Yesod there has been a new commit, usually a few hours ago. Comparing this to Snap which is fairly inactive I would say and I have yet another bonus point for Yesod. The #yesod channel on IRC is also really active, and the documentation is outstanding. There's also FP Complete, which is another huge bonus point for Yesod.

All of this put together and I have a clear winner, at least for now.

Want to hear about my upcoming book,
Haskell by Example?

Haskell by Example Book

Subscribe to receive updates and free content from the book. You'll also get a discount when the final version of the book is released.