Hacker News new | past | comments | ask | show | jobs | submit login
Snap Framework v. 0.6 released (snapframework.com)
27 points by LukeHoersten on Oct 29, 2011 | hide | past | favorite | 7 comments



I'm very interested in using Haskell for web development as the most I've done with it is writing a Scheme subset -> x86 asm compiler. Has anyone done anything non-trivial with it? How does it compare to frameworks for other succinct languages like Django or RoR? Does Snap feature an ORM or is it SQL through the IO monad or similar?


I just used it at work to build an ad server. For a web app that has a few well defined features, Snap is awesome and fast, and working in Haskell is totally a joy. It doesn't have the high level functionality that a web framework like rails or django has though. (yet)

Unfortunately, I used the old Snap extension API since the new snaplet API wasn't around when I started! So maybe if I have some time I'll refactor it to use the new API, which looks like it's a lot better than the old extension API.

One cool thing is if you statically link your binary and build on ubuntu 10.04, you can actually just directly deploy binaries to Heroku, even though it's not a supported language. Just throw in a package.json file or whatever to trick Heroku and specify your Snap binary in your Procfile.

THANKS SNAP GUYS!


I wrote a programming contest server. This isn't anything like a huge, full website, but it isn't a trivial hundred-line "blog" example either. I used Yesod. It's a ways behind Django or RoR. Snap doesn't have an ORM but Yesod has, well, something ORM-esque, but very weak. (Do you really want an "Object"-Relational Manager in Haskell? I'm skeptical.)

I would say interesting things are happening in the Haskell web world, but it's still young and developing. If that appeals to you, it's ready enough for people who really know what they are doing to do real work, but if you're hoping for everything on a silver platter like Django or RoR, it's not there yet.


For some examples of people using Snap in the real world, check out http://snapframework.com/faq#is-anyone-using-snap-in-product.... The guys at Silk (http://silkapp.com) use Snap for some of their back end infrastructure. Janrain discussed their use of Snap in this presentation http://vimeo.com/21210266. In fact, when you log in to ladygaga.com a Snap server is involved at some point. In addition to those, I and others have used Snap to build non-trivial proprietary websites.

Snap intentionally has not made ORM/persistence decisions. The developer is free to choose any Haskell library (including the one used by Yesod) to interface with a database. There is a library written to simplify the use of mongoDB with Snap (pre-0.6). The new snaplet abstraction introduced in 0.6 makes writing these kinds of libraries much easier and provides a clear path to follow, so I imagine we'll be seeing a lot more activity in this area. In fact, someone has already released an HDBC interface as a snaplet. They even have a tutorial for it here: https://github.com/norm2782/snaplet-hdbc/wiki/HDBC-Snaplet-T....


Just tried to find a Snap HTTP header on ladygaga.com. Couldn't find it. Definitely curious, do you have any more detail about what they used it for?


You won't find it. It's somewhere in the back end of Janrain's authentication service. It doesn't serve user facing requests, but it does get hit.


Snap isn't yet at the level of Django or Ruby on Rails. If you're looking for a Haskell web framework with more of those features you should check out Yesod.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: