Developing Web Apps with Haskell and Yesod, 2nd Edition
- Length: 396 pages
- Edition: 2
- Language: English
- Publisher: O'Reilly Media
- Publication Date: 2015-02-27
- ISBN-10: 1491915595
- ISBN-13: 9781491915592
- Sales Rank: #1807215 (See Top 100 Books)
This fast-moving guide introduces web application development with Haskell and Yesod, a potent language/framework combination that supports high-performing applications that are modular, type-safe, and concise. Fully updated for Yesod 1.4, this second edition shows you how Yesod handles widgets, forms, persistence, and RESTful content. Author Michael Snoyman also introduces various Haskell tools to supplement your basic knowledge of the language.
By the time you finish this book, you’ll create a production-quality web application with Yesod’s ready-to-use scaffolding. You’ll also examine several real-world examples, including a blog, a wiki, a JSON web service, and a Sphinx search server.
- Build a simple application to learn Yesod’s foundation datatype and Web Application Interface (WAI)
- Output HTML, CSS, and Javascript with Shakespearean template languages
- Get an indepth look at Yesod’s core monads for producing cleaner, more modular code
- Probe Yesod’s internal workings: learn the request handling process for a typical application
- Build forms on top of widgets by implementing the yesod-form declarative API
- Learn how Yesod and Haskell handle persistence and session data
- Serve an HTML page and a machine-friendly JSON page from the same URL
Table of Contents
Part I. Basics
Chapter 1. Introduction
Chapter 2. Haskell
Chapter 3. Basics
Chapter 4. Shakespearean Templates
Chapter 5. Widgets
Chapter 6. The Yesod Typeclass
Chapter 7. Routing and Handlers
Chapter 8. Forms
Chapter 9. Sessions
Chapter 10. Persistent
Chapter 11. Deploying Your Web App
Part II. Advanced
Chapter 12. RESTful Content
Chapter 13. Yesod’s Monads
Chapter 14. Authentication and Authorization
Chapter 15. Scaffolding and the Site Template
Chapter 16. Internationalization
Chapter 17. Creating a Subsite
Chapter 18. Understanding a Request
Chapter 19. SQL Joins
Chapter 20. Yesod for Haskellers
Part III. Examples
Chapter 21. Initializing Data in the Foundation Data Type
Chapter 22. Blog: i18n, Authentication, Authorization, and Database
Chapter 23. Wiki: Markdown, Chat Subsite, Event Source
Chapter 24. JSON Web Service
Chapter 25. Case Study: Sphinx-Based Search
Chapter 26. Visitor Counter
Chapter 27. Single-Process Pub/Sub
Chapter 28. Environment Variables for Configuration
Chapter 29. Route Attributes
Part IV. Appendices
Appendix A. monad-control
Appendix B. Web Application Interface
Appendix C. Settings Types
Appendix D. http-conduit
Appendix E. xml-conduit