“Here is useful information: Developing Web Applications with Haskell and Yesod”
Developing Web Applications with Haskell and Yesod
Yesod 框架作者写的 Haskell Web 开发免费指南
这本书由 Yesod 框架作者 Michael Snoyman 撰写,介绍如何用 Haskell 和 Yesod 构建 Web 应用,涉及路由、模板(Hamlet 等)、Persistent 数据库访问、表单、认证和 REST 等内容。重点在于让类型系统在 Web 开发里发挥作用,在编译期保证更多正确性。它既是教程也是框架文档,随 Yesod 版本更新,也有 O'Reilly 的印刷版。
HN 上的人把它当作 Yesod 和 Haskell Web 开发的权威资料推荐,有人称文档对 Yesod 1.4 仍然够新,适合已熟悉 Haskell 和 Web 开发的人入门;也有评论说它有时落后于框架的最新版本。
已会 Haskell、想做 Web 开发的程序员
怎么读
由 Claude 根据这本书和 HN 上的说法整理,可能有错- 1先读快速上手部分,把示例应用跑起来
- 2接着看路由、模板和 Persistent 数据库部分
- 3对 TemplateHaskell 和 QuasiQuotes 不熟的话先补一下
- 4留意书与你所用 Yesod 版本的差异,必要时查最新文档
HN 书评
推荐在前,同类按时间 · 每本最多保留 20 条,统计用全部提及 · 作者本人贴的不算“Yesod has an entire book too Developing Web Applications with Haskell and Yesod though I haven't read it, I assume it covers what you're looking for”
“Yesod's book [2] is nice too but I tend to find that it always seems a bit out of date.”
“"Also, how can I talk to MySql or Sqlite?"”
“It also comes along with a free online book: Developing Web Applications with Haskell and Yesod”
“I have been using this site for (yesod 1.4) [Developing Web Applications with Haskell and Yesod and I found the documentation current.”
看全部 20 条 →
“It's a pretty good introduction to Haskell web development for people who are already familiar with both web development and Haskell.”
“Hack is certainly usable, although I would consider it deprecated in favor of WAI (mostly for performance reasons): Developing Web Applications with Haskell and Yesod”
“Hamlet [1] has me sort of tempted as it is so close to what I write anyhow.”
“Hamlet embeds markup directly into the Haskell source code using quasiquotation.”
“Persistent provides type-safe database access:”
“As explained before in this thread "shakespear-text" is the plain-ERB of Yesod.”
“A new book by O'Reilly covers Yesod”
“By default, it relies on QuasiQuotes and TemplateHaskell a lot [1]”
“Oh, I thought this was the already existing Hamlet language.”
“I am probably better off using Yesod's REST support”
“I don't think it would be as easy as what hamlet [1] looks like”
“If you're used to only programming in dynamic languages, it can be a shock, but yes, a good type system can do things you never thought possible.”
“Here is a Yesod example[4] that uses Auth.”
“Or build a separate language like Haskell's Hamlet [1], or Python's Jinja [2].”