wai-routes vs IHP
When comparing wai-routes vs IHP, the Slant community recommends wai-routes for most people. In the question“What are the best Haskell web frameworks for building RESTful web services?” wai-routes is ranked 6th while IHP is ranked 10th. The most important reason people chose wai-routes is:
Automatically maps routes to datatypes which are checked at compile time. It uses Template Haskell to reduce boilerplate.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Provides type-safe routes
Automatically maps routes to datatypes which are checked at compile time. It uses Template Haskell to reduce boilerplate.
Pro Freely mix "unrouted" handlers with typesafe routing and middleware
Can be used without any routing or Template Haskell. "Unrouted" handlers can be freely mixed and matched with typed routing and middleware.
Pro Easy to customise
Wai-routes is extremely easy to customise. It's neutral to other parts of the system such as the templating language, or the wai server being used. Wai-routes only targets and provides full access to the wai API. The wai-routes handlers are also simple functions which are passed the request data and the environment and return a Response in IO. Arbitrary middleware, routes, and handlers can be mixed together to construct an application.
Pro Lightweight
Performs quite well when compared with other Haskell web frameworks.
Pro Subsites support
Subsites provide encapsulation and ability compile time enforcement of contracts between main site and subsites.
Pro Provides nested routes
Nested routes allow reduction of boilerplate code.
Pro Route annotations
Route annotations provide an easy way to "mark" routes for extra processing.
Pro Easy for beginners
With the code generators even haskell beginners can easily build CRUD apps.
Pro Under the hood
Code generators, database schema editors, etc. work with Haskell and SQL files, which can also be edited manually, to get 'under the hood'.
Pro Instant live reloading
Makes for a super smooth development experience.
Pro HSX
If you have experience with react, you feel right at home with the HSX view syntax.
Cons
Con Learning curve
Even though it's a "micro" framework, it has a steep learning curve when using advanced features such as subsites.
Con (Small) Server deployment
I'm a bit unclear on the memory requirements for the server (which becomes less of an issue every following year).