Wrapping Up

Yesod is a traditional framework built out of a very nontraditional language. Yesod has models, views, and controllers, but it is also compiled, lazily evaluated, and has static typing. Far from being a burden, Haskell adds much to the traditional web stack—safety, speed, and robustness against programmer error.

Many errors you’d normally find while testing your app will be found by the compiler. You can’t accidentally forget to escape content when including it in an HTML template because in Yesod, strings and HTML are different types and you can’t substitute one for the other. You won’t be surprised by null pointer exceptions or undefined results; the compiler forces you to handle all cases of a Maybe value.

In this chapter, ...

Get Seven Web Frameworks in Seven Weeks now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.