Developing Web Applications with Haskell and Yesod

Overview

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. You?ll work with several samples to explore the way Yesod handles widgets, forms, persistence, and RESTful content. You also get an introduction to various Haskell tools to supplement your basic knowledge of the language.

By the time you finish this book, you?ll create a ...

See more details below
Other sellers (Paperback)
  • All (11) from $8.00   
  • New (7) from $23.44   
  • Used (4) from $8.00   
Developing Web Applications with Haskell and Yesod

Available on NOOK devices and apps  
  • NOOK Devices
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK Study
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$16.49
BN.com price
(Save 45%)$29.99 List Price

Overview

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. You’ll work with several samples to explore the way Yesod handles widgets, forms, persistence, and RESTful content. You also get an introduction to 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)
  • Use Shakespearean template languages for HTML, CSS, and Javascript output
  • Produce cleaner, more modular code by learning how Yesod monads interact
  • Implement the yesod-form declarative API to build forms on top of widgets
  • Learn how Yesod and Haskell store session data and handle persistence
  • Use techniques to serve an HTML page and a machine-friendly JSON page from the same URL
  • Create reusable components for several applications with Yesod subsites
Read More Show Less

Product Details

  • ISBN-13: 9781449316976
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 5/4/2012
  • Edition number: 1
  • Pages: 298
  • Sales rank: 1,148,091
  • Product dimensions: 7.00 (w) x 9.19 (h) x 0.62 (d)

Meet the Author

Michael Snoyman, creator of Yesod, has been programming for about 15 years, using Haskell for the past five. 5. He brings ten years of web development experience in a wide variety of environments as well as time spent creating documentation.

Read More Show Less

Table of Contents

Preface;
Who This Book Is For;
Conventions Used in This Book;
Using Code Examples;
Safari® Books Online;
How to Contact Us;
Acknowledgements;
Basics;
Chapter 1: Introduction;
1.1 Type Safety;
1.2 Concise;
1.3 Performance;
1.4 Modular;
1.5 A Solid Foundation;
1.6 Introduction to Haskell;
Chapter 2: Haskell;
2.1 Terminology;
2.2 Tools;
2.3 Language Pragmas;
2.4 Overloaded Strings;
2.5 Type Families;
2.6 Template Haskell;
2.7 QuasiQuotes;
2.8 Summary;
Chapter 3: Basics;
3.1 Hello World;
3.2 Routing;
3.3 Handler Function;
3.4 The Foundation;
3.5 Running;
3.6 Resources and Type-Safe URLs;
3.7 The Scaffolded Site;
3.8 Development Server;
3.9 Summary;
Chapter 4: Shakespearean Templates;
4.1 Synopsis;
4.2 Types;
4.3 Syntax;
4.4 Calling Shakespeare;
4.5 Other Shakespeare;
4.6 General Recommendations;
Chapter 5: Widgets;
5.1 Synopsis;
5.2 What’s in a Widget?;
5.3 Constructing Widgets;
5.4 Combining Widgets;
5.5 Generate IDs;
5.6 whamlet;
5.7 Using Widgets;
5.8 Summary;
Chapter 6: Yesod Typeclass;
6.1 Rendering and Parsing URLs;
6.2 defaultLayout;
6.3 Custom Error Pages;
6.4 External CSS and JavaScript;
6.5 Smarter Static Files;
6.6 Authentication/Authorization;
6.7 Some Simple Settings;
6.8 Summary;
Chapter 7: Routing and Handlers;
7.1 Route Syntax;
7.2 Dispatch;
7.3 The Handler Monad;
7.4 Summary;
Chapter 8: Forms;
8.1 Synopsis;
8.2 Kinds of Forms;
8.3 Types;
8.4 Converting;
8.5 Create AForms;
8.6 Validation;
8.7 More Sophisticated Fields;
8.8 Running Forms;
8.9 i18n;
8.10 Monadic Forms;
8.11 Input Forms;
8.12 Custom Fields;
8.13 Summary;
Chapter 9: Sessions;
9.1 Clientsession;
9.2 Controlling Sessions;
9.3 Session Operations;
9.4 Messages;
9.5 Ultimate Destination;
9.6 Summary;
Chapter 10: Persistent;
10.1 Synopsis;
10.2 Solving the Boundary Issue;
10.3 Migrations;
10.4 Uniqueness;
10.5 Queries;
10.6 Manipulation;
10.7 Attributes;
10.8 Relations;
10.9 Closer Look at Types;
10.10 Custom Fields;
10.11 Persistent: Raw SQL;
10.12 Integration with Yesod;
10.13 Summary;
Chapter 11: Deploying Your Webapp;
11.1 Compiling;
11.2 Warp;
11.3 FastCGI;
11.4 Desktop;
11.5 CGI on Apache;
11.6 FastCGI on lighttpd;
11.7 CGI on lighttpd;
Advanced;
Chapter 12: RESTful Content;
12.1 Request Methods;
12.2 Representations;
12.3 Other Request Headers;
12.4 Stateless;
12.5 Summary;
Chapter 13: Yesod’s Monads;
13.1 Monad Transformers;
13.2 The Three Transformers;
13.3 Example: Database-Driven Navbar;
13.4 Example: Request Information;
13.5 Summary;
Chapter 14: Authentication and Authorization;
14.1 Overview;
14.2 Authenticate Me;
14.3 Email;
14.4 Authorization;
14.5 Conclusion;
Chapter 15: Scaffolding and the Site Template;
15.1 How to Scaffold;
15.2 File Structure;
15.3 widgetFile;
15.4 defaultLayout;
15.5 Static Files;
15.6 Conclusion;
Chapter 16: Internationalization;
16.1 Synopsis;
16.2 Overview;
16.3 Message Files;
16.4 RenderMessage Typeclass;
16.5 Interpolation;
16.6 Phrases, Not Words;
Chapter 17: Creating a Subsite;
17.1 Hello World;
Examples;
Chapter 18: Blog: i18n, Authentication, Authorization, and Database;
Chapter 19: Wiki: Markdown, Chat Subsite, Event Source;
Chapter 20: JSON Web Service;
20.1 Server;
20.2 Client;
Chapter 21: Case Study: Sphinx-Based Search;
21.1 Sphinx Setup;
21.2 Basic Yesod Setup;
21.3 Searching;
21.4 Streaming xmlpipe Output;
21.5 Full Code;
Appendices;
monad-control;
Overview;
Intuition;
Types;
Real Life Examples;
Lost State;
More Complicated Cases;
Conduit;
Conduits in Five Minutes;
Structure of This Chapter;
The Resource Monad Transformer;
Source;
Sinks;
Conduit;
Buffering;
Web Application Interface;
The Interface;
Hello World;
Middleware;
Settings Types;
http-conduit;
Synopsis;
Concepts;
Request;
Manager;
Response;
http and httpLbs;
xml-conduit;
Synopsis;
Types;
Text.XML;
Cursor;
xml-hamlet;
xml2html;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)