Comparing Dynamic and Static Language Approaches to Web Frameworks [pdf]
cs.kent.ac.uk
cs.kent.ac.uk
I have written web apps in Common Lisp for 2-3 years, and in Java (with Play! Framework) for a year now: routes, templates and form submission are the most standardized parts of all framworks. My Lisp code to do those things is identical to the way it's done in Java.
If you want to compare web frameworks start by comparing their database & Model substrates: ORM, migrations, validation .. those are where you will become unstuck. (if you don't consider those an integral part of the web-framework, then we haven nothing to discuss, pedal your big-wheel away)
(I personally would prefer Play! to just try to be the perfect Rails-like experience in Javaland, instead of something much bigger).
I've got a casual interest in Haskell and flipped through Learn You A Haskell's earlier chapters, but I can't scan snippets of fancy Meta-Haskell well, so some of the specifics here are probably lost on me. The text of the slides does seem to admit that the author is also kind of new to Yesod. (I've never met a Yesod expert...)
With all of that said, I think that part of the premise was that while Yesod's not a typical 'web platform for a static language', it's an interesting case study because it (apparently) tries harder to maintain compile-time benefits static typing everywhere. (I understand this is true of the persistence layer as well)
I agree that the content isn't what you'd expect given the title, but I get why the author's interested in Yesod and why it was chosen to represent the 'static' side.
Dynamic languages: faster to write something, less code, no time wasted waiting for compilation, but harder to maintain and a bitch to refactor. Need more unit tests.
Static languages: more boilerplate, slower write time, but man it's nice to get compile-time vs. run-time errors...
Fwiw, this is less and a less a problem with static languages. In the Scala ecosystem, for example, on-the-fly compilation is available with Play, or any framework that uses SBT [1] (Lift, Scalatra, etc). Edit, save, and your edits (and only your edits) are automatically recompiled and reloaded.
> more boilerplate
Not sure about that. Lift at least (maybe Play too, not sure) is about the same lines of code as Rails, less if you include tests.
1. github.com/harrah/xsbt
https://github.com/harrah/xsbt/wiki/Triggered-Execution
http://cookbook.liftweb.net/Developing+using+a+text+editor.h...
https://github.com/liftstack/lift24-s29-blank.g8#readme (still a work in progress, not debugged, but you can test the sbt "~ compile" continuous compilation directive)