Muutke küpsiste eelistusi

E-raamat: Developing Web Apps with Haskell and Yesod: Safety-Driven Web Development

  • Formaat: 396 pages
  • Ilmumisaeg: 17-Feb-2015
  • Kirjastus: O'Reilly Media
  • Keel: eng
  • ISBN-13: 9781491915554
  • Formaat - EPUB+DRM
  • Hind: 25,16 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: 396 pages
  • Ilmumisaeg: 17-Feb-2015
  • Kirjastus: O'Reilly Media
  • Keel: eng
  • ISBN-13: 9781491915554

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

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
Preface xi
Part I. Basics
1 Introduction
17(4)
Type Safety
17(1)
Concise Code
18(1)
Performance
18(1)
Modularity
19(1)
A Solid Foundation
19(2)
2 Haskell
21(10)
Terminology
21(2)
Tools
23(1)
Language Pragmas
24(1)
Overloaded Strings
24(1)
Type Families
25(1)
Template Haskell
26(2)
QuasiQuotes
28(1)
API Documentation
28(1)
Summary
29(2)
3 Basics
31(8)
Hello, World
31(1)
Routing
32(2)
Handler Function
34(1)
The Foundation
34(1)
Running
35(1)
Resources and Type-Safe URLs
35(2)
Non-HTML Responses
37(1)
The Scaffolded Site
37(1)
Development Server
38(1)
Summary
38(1)
4 Shakespearean Templates
39(18)
Synopsis
39(2)
Hamlet (HTML)
40(1)
Lucius (CSS)
40(1)
Cassius (CSS)
40(1)
Julius (JavaScript)
40(1)
Types
41(2)
Type-Safe URLs
42(1)
Syntax
43(8)
Hamlet Syntax
44(5)
Lucius Syntax
49(2)
Cassius Syntax
51(1)
Julius Syntax
51(1)
Calling Shakespeare
51(4)
Alternative Hamlet Types
53(2)
Other Shakespeare
55(1)
General Recommendations
56(1)
5 Widgets
57(12)
Synopsis
57(2)
What's in a Widget?
59(1)
Constructing Widgets
60(1)
Combining Widgets
61(1)
Generating IDs
62(1)
whamlet
62(2)
Types
63(1)
Using Widgets
64(2)
Using Handler Functions
66(1)
Summary
67(2)
6 The Yesod Typeclass
69(12)
Rendering and Parsing URLs
69(4)
joinPath
71(1)
cleanPath
71(2)
defaultLayout
73(2)
getMessage
74(1)
Custom Error Pages
75(1)
External CSS and JavaScript
76(1)
Smarter Static Files
77(1)
Authentication/Authorization
78(1)
Some Simple Settings
79(1)
Summary
79(2)
7 Routing and Handlers
81(14)
Route Syntax
81(5)
Pieces
82(2)
Resource Name
84(1)
Handler Specification
85(1)
Dispatch
86(2)
Return Type
86(1)
Arguments
87(1)
The Handler Functions
88(3)
Application Information
89(1)
Request Information
89(1)
Short-Circuiting
89(1)
Response Headers
90(1)
I/O and Debugging
91(1)
Query String and Hash Fragments
92(1)
Summary
93(2)
8 Forms
95(20)
Synopsis
95(2)
Kinds of Forms
97(1)
Types
98(2)
Converting
100(1)
Creating AForms
100(2)
Optional Fields
101(1)
Validation
102(1)
More Sophisticated Fields
103(1)
Running Forms
104(1)
il8n
105(1)
Monadic Forms
105(3)
Input Forms
108(1)
Custom Fields
109(2)
Values That Don't Come from the User
111(2)
Summary
113(2)
9 Sessions
115(8)
clientsession
115(1)
Controlling Sessions
116(1)
Session Operations
117(1)
Messages
118(2)
Ultimate Destination
120(2)
Summary
122(1)
10 Persistent
123(32)
Synopsis
124(1)
Solving the Boundary Issue
125(6)
Types
126(1)
Code Generation
127(3)
PersistStore
130(1)
Migrations
131(3)
Uniqueness
134(1)
Queries
135(3)
Fetching by ID
135(1)
Fetching by Unique Constraint
136(1)
Select Functions
136(2)
Manipulation
138(3)
Insert
138(2)
Update
140(1)
Delete
141(1)
Attributes
141(3)
Relations
144(1)
A Closer Look at Types
145(2)
More Complicated, More Generic
146(1)
Custom Fields
147(1)
Persistent: Raw SQL
148(2)
Integration with Yesod
150(2)
More Complex SQL
152(1)
Something Besides SQLite
152(1)
Summary
153(2)
11 Deploying Your Web App
155(12)
Keter
155(1)
Compiling
156(1)
Files to Deploy
156(1)
SSL and Static Files
157(1)
Warp
157(3)
Nginx Configuration
158(2)
Server Process
160(1)
Nginx + FastCGI
160(1)
Desktop
161(1)
CGI on Apache
162(1)
FastCGI on lighttpd
162(1)
CGI on lighttpd
163(4)
Part II. Advanced
12 RESTful Content
167(10)
Request Methods
167(1)
Representations
168(8)
JSON Conveniences
170(2)
New Data Types
172(4)
Other Request Headers
176(1)
Summary
176(1)
13 Yesod's Monads
177(12)
Monad Transformers
177(1)
The Three Transformers
178(1)
Example: Database-Driven Navbar
179(2)
Example: Request Information
181(2)
Performance and Error Messages
183(1)
Adding a New Monad Transformer
184(4)
Summary
188(1)
14 Authentication and Authorization
189(14)
Overview
189(1)
Authenticate Me
190(4)
Email
194(4)
Authorization
198(2)
Summary
200(3)
15 Scaffolding and the Site Template
203(8)
How to Scaffold
203(1)
File Structure
204(3)
Cabal File
204(1)
Routes and Entities
205(1)
Foundation and Application Modules
205(1)
Import
206(1)
Handler Modules
207(1)
widgetFile
207(1)
defaultLayout
208(1)
Static Files
208(1)
Summary
209(2)
16 Internationalization
211(8)
Synopsis
211(2)
Overview
213(1)
Message Files
214(1)
Specifying Types
215(1)
RenderMessage typeclass
215(1)
Interpolation
216(1)
Phrases, Not Words
217(2)
17 Creating a Subsite
219(4)
Hello, World
219(4)
18 Understanding a Request
223(12)
Handlers
223(3)
Layers
224(1)
Content
225(1)
Short-Circuit Responses
226(1)
Dispatch
226(8)
toWaiApp, toWaiAppPlain, and warp
227(1)
Generated Code
228(4)
Complete Code
232(2)
Summary
234(1)
19 SQL Joins
235(10)
Multiauthor Blog
235(2)
Database Queries in Widgets
237(1)
Joins
238(1)
Esqueleto
239(1)
Streaming
240(2)
Summary
242(3)
20 Yesod for Haskellers
245(26)
Hello, Warp
245(5)
What About Yesod?
250(2)
The HandlerT Monad Transformer
252(6)
(To)Content, (To)TypedContent
255(1)
HasContentType and Representations
256(2)
Convenience warp Function
258(1)
Writing Handlers
258(3)
Getting Request Parameters
258(1)
Short-Circuiting
259(1)
Streaming
259(2)
Dynamic Parameters
261(1)
Routing with Template Haskell
262(3)
LiteApp
264(1)
Shakespeare
265(2)
The URL Rendering Function
267(1)
Widgets
267(1)
Details We Won't Cover
268(3)
Part III. Examples
21 Initializing Data in the Foundation Data Type
271(4)
Step 1: Define Your Foundation
272(1)
Step 2: Use the Foundation
272(1)
Step 3: Create the Foundation Value
272(1)
Summary
273(2)
22 Blog:118n, Authentication, Authorization, and Database
275(10)
23 Wiki: Markdown, Chat Subsite, Event Source
285(12)
Subsite: Data
285(1)
Subsite: Handlers
286(3)
Subsite: Widget
289(2)
Master Site: Data
291(1)
Master Site: Instances
292(1)
Master Site: Wiki Handlers
293(1)
Master Site: Running
294(1)
Summary
295(2)
24 EON Web Service
297(4)
Server
297(1)
Client
298(3)
25 Case Study: Sphinx-Based Search
301(16)
Sphinx Setup
301(1)
Basic Yesod Setup
302(3)
Searching
305(3)
Streaming xmlpipe Output
308(2)
Full Code
310(7)
26 Visitor Counter
317(2)
27 Single-Process Pub/Sub
319(6)
Foundation Data Type
319(1)
Allocate a Job
320(1)
Fork Our Background Job
320(1)
View Progress
321(1)
Complete Application
321(4)
28 Environment Variables for Configuration
325(2)
29 Route Attributes
327(8)
Alternative Approach: Hierarchical Routes
329
Part IV. Appendices
A monad-control
335(10)
B Web Application Interface
345(8)
C Settings Types
353(2)
D http-conduit
355(6)
E xml-conduit
361(16)
Index 377
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.