When comparing Nested-Routes vs Yesod, the Slant community recommends Yesod for most people. In the question“What are the best Haskell web frameworks for building RESTful web services?” Yesod is ranked 1st while Nested-Routes is ranked 9th. The most important reason people chose Yesod is:
While not required, Yesod offers templating through a Shakespearean family of languages to produce page code.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Embed Attoparsec parsers and regular expressions in a routable url
If you have a data encoding you would like to allow as a path chunk, you can do so by routing with an attoparsec parser or regular expression directly.
Pro Nesting of Handlers
The ability to give a handler child handlers turns a list of handlers into a tree of handlers - much easier to maintain.
Pro Simple and Concise
Routing a RESTful api is very literal in Nested-Routes.
Pro Offers templating for type-safe, well-formed content
While not required, Yesod offers templating through a Shakespearean family of languages to produce page code.
Pro Uses type-safe URLs
Ensures that data provided by the URL is type-safe. This means that data in the URL has a definitive type.
Pro Can be used without knowing much Haskell
While Yesod is written in Haskell, developers can achieve basic functionality without much investment in the language.
Cons
Con Complicated Types
There is a lot of advanced language extensions in use for the engine - if you have a typo somewhere, the errors are practically impossible to understand.
Con Is hard to customize
Learning how Yesod works internally is hard. It is a large framework with complicated components. Finding the appropriate code and understanding how it contributes to the framework is difficult, meaning developers will struggle.
Con Too much template haskell
You actually want to code in haskell and not some DSL with "magic" hidden under the bonnet.