Functional Web Development with Elixir, OTP, and Phoenix: Rethink the Modern Web App
暫譯: 使用 Elixir、OTP 和 Phoenix 的功能性網頁開發:重新思考現代網頁應用程式
Lance Halvorsen
- 出版商: Pragmatic Bookshelf
- 出版日期: 2018-03-06
- 定價: $1,600
- 售價: 8.8 折 $1,408
- 語言: 英文
- 頁數: 220
- 裝訂: Paperback
- ISBN: 1680502433
- ISBN-13: 9781680502435
-
相關分類:
Functional-programming
立即出貨 (庫存=1)
買這商品的人也買了...
-
$2,980$2,831 -
$1,350$1,283 -
$2,573Structure and Interpretation of Computer Programs, 2/e (美國原版)
-
$1,392Complex Analysis: A First Course with Applications (Hardcover)
-
$1,880$1,786 -
$580$458 -
$850$808 -
$680$537 -
$2,670$2,537 -
$2,870$2,727 -
$1,088D3.js 4.x Data Visualization, 3/e (Paperback)
-
$2,190$2,081 -
$1,880$1,786 -
$2,040$1,938 -
$450$356 -
$1,452Modern Vim: Craft Your Development Environment with Vim 8 and Neovim
-
$1,680$1,596 -
$380$323 -
$1,220$1,159 -
$2,090$2,048 -
$1,280$1,088 -
$2,400$2,280
相關主題
商品描述
Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web applications. Make the most of them as you build a stateful web app with Elixir and OTP. Model domain entities without an ORM or a database. Manage server state and keep your code clean with OTP Behaviours. Layer on a Phoenix web interface without coupling it to the business logic. Open doors to powerful new techniques that will get you thinking about web development in fundamentally new ways.
Elixir and OTP give us exceptional tools to build stateful back-end applications that really scale, with rock-solid reliability. In this book, you'll build a web application in ways that are radically different from the norm. The back end will be stateful, not stateless. Use persistent connections with Phoenix Channels instead of HTTP's request-response, and create the full application in distinct, decoupled layers.
In Part 1, start by building the business logic as a separate application, without Phoenix. Model the application domain with Elixir Agents and simple data structures. By keeping state in memory instead of a database, you can reduce latency and simplify your code. Then add OTP Behaviours such as gen_server and gen_fsm that make managing in-memory state a breeze. Create a supervision tree to boost fault tolerance while separating error handling from business logic.
Phoenix is a modern web framework you can layer on top of business logic while keeping the two completely decoupled. In Part 2, you'll do exactly that as you build a web interface with Phoenix. Bring in the application from Part 1 as a dependency to a new Phoenix project. Then use ultra-scalable Phoenix Channels to establish persistent connections between the stateful server and a stateful front-end client.
You're going to love this way of building web apps!
What You Need:
You'll need a computer that can run Elixir version 1.3 or higher and Phoenix 1.2 or higher. Some familiarity with Elixir and Phoenix is recommended.
商品描述(中文翻譯)
Elixir 和 Phoenix 正在引起巨大的興奮,成為構建現代網頁應用程式的無敵平台。在使用 Elixir 和 OTP 構建有狀態的網頁應用程式時,充分利用它們。無需 ORM 或資料庫即可建模領域實體。使用 OTP 行為來管理伺服器狀態,並保持代碼的整潔。將 Phoenix 網頁介面層疊在業務邏輯之上,而不將其耦合。開啟強大新技術的大門,讓你以根本不同的方式思考網頁開發。
Elixir 和 OTP 為我們提供了卓越的工具,以構建真正可擴展的有狀態後端應用程式,並具備堅如磐石的可靠性。在這本書中,你將以與常規截然不同的方式構建網頁應用程式。後端將是有狀態的,而非無狀態的。使用持久連接的 Phoenix Channels,而不是 HTTP 的請求-回應,並在不同的、解耦的層中創建完整的應用程式。
在第一部分,首先構建業務邏輯作為一個獨立的應用程式,而不使用 Phoenix。使用 Elixir Agents 和簡單的數據結構來建模應用程式領域。通過將狀態保留在記憶體中而不是資料庫中,你可以減少延遲並簡化代碼。然後添加 OTP 行為,例如 gen_server 和 gen_fsm,使得管理記憶體中的狀態變得輕而易舉。創建一個監督樹以提高容錯能力,同時將錯誤處理與業務邏輯分開。
Phoenix 是一個現代網頁框架,你可以將其層疊在業務邏輯之上,同時保持兩者完全解耦。在第二部分,你將正是這樣做,構建一個使用 Phoenix 的網頁介面。將第一部分的應用程式作為依賴引入新的 Phoenix 專案。然後使用超可擴展的 Phoenix Channels 在有狀態的伺服器和有狀態的前端客戶端之間建立持久連接。
你將會喜歡這種構建網頁應用程式的方式!
你需要的條件:
你需要一台可以運行 Elixir 版本 1.3 或更高版本以及 Phoenix 1.2 或更高版本的電腦。建議對 Elixir 和 Phoenix 有一定的熟悉度。