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.
I 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?
I 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
I may write up a blogpost on getting this far. It's mostly based on this: 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.
I 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:
for 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.
At 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.
I 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.
Clojure has "Web Development with Clojure" which is basically what I listed above, except for Clojure rather than Haskell.