6 ms·
Developing Web Applications with Haskell
- mark_l_watson 11y agoThat is a good summary of the options for Haskell web development. The author of this slide deck also wrote "Beginning Haskell." I bought this book and like it. That said I have an addiction to buying Haskell books :-) Personally, I use Yesod for complicated apps, otherwise Spock.
- akurilin 11y agoThat was definitely a good book, would recommend it as well.
- codygman 11y agoI'll also chime in and say the same. I've been meaning to go back and complete the exercises I couldn't at first. I almost got stuck not reading on because I couldn't figure out how to do some exercises but I'm glad I didn't because hindsight shows me that would have been a mistake.
- sivers 11y agoBased on your recommendations, just now, I went to go check out the book and found they're having a one-day half-price sale on it at Apress, the publishers: http://www.apress.com/9781430262503?gtmf=s http://www.apress.com/9781430262503?gtmf=s Nice timing. Buying now. Thanks for the tip.
- 15155 11y agoI'd like to see something like this, but with JSON-based APIs instead of HTML templating.
- danidiaz 11y ago"aeson" is the go-to library for producing and parsing JSON in Haskell.
- codygman 11y agoYou'd like servant: http://haskell-servant.github.io/tutorial/#tutorial http://haskell-servant.github.io/tutorial/#tutorial
- framp 11y agoYou should check out PostgREST, a tool to expose Postres tables through a JSON APIs: https://github.com/begriffs/postgrest https://github.com/begriffs/postgrest
- akurilin 11y agothoughtbot's carnival is a good example of a JSON API written with Yesod: https://github.com/thoughtbot/carnival https://github.com/thoughtbot/carnival
- serras 11y ago(Author here) There is a set of exercises that come with the slides at https://github.com/serras/lambdaconf-2015-web https://github.com/serras/lambdaconf-2015-web In particular, they introduce the Aeson library for both producing and consuming JSON.
- dllthomas 11y agoI believe the HTML templating stuff is pretty optional in all the major Haskell web platforms. I know in Yesod it is trivial to serve JSON rather than HTML from an end-point, and pretty easy to serve multiple representations of the same resource.
- amelius 11y agoDoes it support a "React" style of building web applications?
- framp 11y agoreact-haskell enables that http://begriffs.com/posts/2015-01-12-reactjs-in-haskell.html http://begriffs.com/posts/2015-01-12-reactjs-in-haskell.html
- tinco 11y agoWhat would have to be different in a web application for it to be able to support the "React" style of building web applications?
- codygman 11y agoDon't forget about reflex[0], you can try it here[1]. I also use purescript[2] with purescript-halogen[3] as does slamdata[4]. There's also a video on Purescript halogen[5] that's very interesting. Purescript is great because the JavaScript it generates is so readable, that if you really need to you can understand the output and make micro-optimizations. 0: https://github.com/ryantrinkle/reflex https://github.com/ryantrinkle/reflex 1: https://github.com/ryantrinkle/try-reflex https://github.com/ryantrinkle/try-reflex 2: http://purescript.org/ http://purescript.org/ 3: https://github.com/slamdata/purescript-halogen https://github.com/slamdata/purescript-halogen 4: http://slamdata.com/ http://slamdata.com/ 5: https://www.youtube.com/watch?v=AbDX-wRigAo https://www.youtube.com/watch?v=AbDX-wRigAo
- michaelochurch 11y agoThanks for the links! I'm really curious about what Haskell can come up with for a front-end story. Do you think that Purescript's row typing (as seen in records and the Eff monad/effect system) is a viable replacement for monad transformer stacks? I "get" MT stacks but I find them heavyweight when what is most often desired is commutative set building of capabilities rather than MT-style stacking.
- 11y ago
- orionblastar 11y agoIt looks like a good start. I've been trying to learn Haskell and F Sharp and other functional languages and always wondered if there was a web option.
- yogthos 11y agoSuave.io for F# is very nice http://suave.io/ http://suave.io/
- crimsonalucard 11y agoWhat's the most rails or django-esque framework for haskell?
- kyllo 11y agoYesod.
- spectrum1234 11y agoI'm somewhat new to web dev and new to functional programming. Can someone tell me how this is fundamentally different that ClojureScript + OM (https://github.com/omcljs/om https://github.com/omcljs/om) ?
- birdsbolt 11y agoFundamentally, I guess the difference is that one is type-safe, and the other isn't. You can get compile time errors instead of runtime for bunch of things.
- dllthomas 11y agoClojureScript also, I think, has a better front-end story for squishier front ends at the moment (although there are a number of projects working on changing that).