9 ms·
Anybody know of solid super-entry level tutorials for starting Web Development with Haskell with less opinionated libraries like Scotty? Something that shows yo
by BadassFractal 13y ago
Anybody know of solid super-entry level tutorials for starting Web Development with Haskell with less opinionated libraries like Scotty? Something that shows you how to slap together a solid cabal sandboxed ready-to-deploy application that's a mix of Scotty/Persistant/Esqueleto and all the other basics?
Clojure has "Web Development with Clojure" which is basically what I listed above, except for Clojure rather than Haskell.
- klrr 13y agoThere is this tutorial: http://adit.io/posts/2013-04-15-making-a-website-with-haskell.html http://adit.io/posts/2013-04-15-making-a-website-with-haskel... Although it uses virthualenv instead of a cabal sandbox.
- chrisrogers 13y agoI read that article a few weeks ago in order to get a basic personal site server running on Heroku. I used a standard cabal setup and updated a few things. end result here, which I think should serve as a good starter point for developing with Scotty: https://github.com/chrissrogers/chrissrogers.com https://github.com/chrissrogers/chrissrogers.com For Heroku builds I used the following excellent buildpack https://github.com/begriffs/heroku-buildpack-ghc https://github.com/begriffs/heroku-buildpack-ghc
- mark_l_watson 13y ago+1 thanks! Nice example. Scotty is appealing to me because it has a Sinatra like feel to it.
- gcb0 13y agofor a true beginner, it starts with an outdated cabal definition for virthualenv/hsenv that has specific old versions. nobody will be able to just copy and paste trhu the tutorial. but it seems well written if you can get past that point. Most beginners won't though.
- egonschiele 13y agoPost author here. I just updated the post to use cabal sandboxes.
- boothead 13y agoI gave a talk at a Haskell meetup in London this week that covered some of this - the slides won't really be useful standalone, but I could probably re purpose them to a blog post fairly easily if you're interested?
- arms 13y agoI know I would be very interested in this.
- BadassFractal 13y agoWould be pretty interested.
- pdpi 13y agoNot sure about the OP, but I'd definitely love to read that.
- prawks 13y agoDitto
- ch0wn 13y agoPlease do, that sounds fantastic. Also, which meetup were you speaking at?
- crntaylor 13y agoLondon Haskell Meetup: http://www.meetup.com/London-Haskell/ http://www.meetup.com/London-Haskell/
- octagonal 13y agoYes Please. Do you have a link to your blog?
- crntaylor 13y agoSorry I missed the talk! Did it get videoed? They usually are.
- jbeja 13y agoI am rading that book right now, is amazing. It makes Clojure so much easy, and the tutorials are well paced as explained.
- copergi 13y agoI can't help you with the tutorials, but snap and happstack are no more opinionated than scotty. They just have documentation and a collection of useful libraries you can use with them.
- cgag 13y agoI just figured out how to do this yesterday, here's the source of my barebones Scott/Persistent/Esqueleto app. All it does is insert some records into the db (sqlite), then runs a server that displays the first entry. (The entry is mixed into the scotty tutorial because I stopped as soon as I got something working). https://github.com/cgag/comments https://github.com/cgag/comments I may write up a blogpost on getting this far. It's mostly based on this: https://www.fpcomplete.com/school/starting-with-haskell/libraries-and-frameworks/persistent-db https://www.fpcomplete.com/school/starting-with-haskell/libr... . I didn't do much beyond figure out explictly using L.fromStrict to deal with conflicting interpretations of overloaded-strings and figuring out how where to put my fillDB and getComments functions in main. I initially tried to call these within the scotty monad, but I think doing it that way would have required learning about monad transformers. I'm hoping to eventually turn this into a simple disqus alternative that should be lightweight and easy to distribute as a binary.
- mightybyte 13y agoAt the lowest level, the Snap Framework is not at all opinionated. The base level of the framework is comprised of snap-core and snap-server. snap-core is a web server API roughly on the level of Yesod's wai with maybe a little more slightly higher-level functionality. snap-server is Snap's web server that implements the snap-core API--roughly equivalent to Yesod's warp. I personally don't understand the draw of scotty because as soon as you want to start doing more substantial web development, you're going to want higher level abstractions. The Snap Framework adds to this in a pretty flexible and not-too-opinionated way with snaplets which are implemented in the snap package. The snap package also contains a few core snaplets that almost every application will want out of the box like sessions, auth, and a snaplet for Heist templating. The Heist part is the only place where the snap package gets opinionated. But you are definitely not locked into using Heist. You could very easily use Yesod's Hamlet, HStringTemplate, hastache, or anything else. Heist just happens to be the direction that the core Snap developers seem to prefer.