架構模式|使用 Python (Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices)

Harry Percival, Bob Gregory 賴屹民 譯

  • 架構模式|使用 Python (Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices)-preview-1
  • 架構模式|使用 Python (Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices)-preview-2
  • 架構模式|使用 Python (Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices)-preview-3
  • 架構模式|使用 Python (Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices)-preview-4
  • 架構模式|使用 Python (Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices)-preview-5
  • 架構模式|使用 Python (Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices)-preview-6
  • 架構模式|使用 Python (Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices)-preview-7
  • 架構模式|使用 Python (Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices)-preview-8
  • 架構模式|使用 Python (Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices)-preview-9
架構模式|使用 Python (Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices)-preview-1

買這商品的人也買了...

商品描述

進行測試驅動開發、領域驅動設計及製作事件驅動微服務

「這是一本社群期待已久的書籍,讓大家看到現代app架構的核心在Python裡面究竟長怎樣!Harry與Bob展示了依賴反轉原則在這種時尚、動態的語言中有多麼優雅。」
—Brandon Rhodes
Python-patterns.guide作者

「截至目前為止,坊間幾乎沒有介紹使用Python編寫可維護大型系統的Python原生教材。本書展示Python可以遊刃有餘地進行重要的軟體開發。」
—Hynek Schlawack
Python忠實支持者、部落客及演說者

隨著Python越來越流行,專案的規模也越來越大、越來越複雜,讓許多Python開發者對高階軟體設計模式產生濃厚的興趣,例如六邊形/整潔架構、事件驅動架構,和以領域驅動設計(DDD)制定的策略模式,但是將這些模式轉換成Python不是那麼容易。

透過這本實戰指南,來自MADE.com的Harry Percival與Bob Gregory介紹一些行之有效的架構設計模式,協助Python開發者管理app的複雜性,並且充分利用測試套件。

作者透過具體的範例和優美、典型的Python來介紹各種模型,避免Java與C#語法的冗長表述。

本書介紹的模式包括:
‧依賴反轉,以及它和port及adapter(六邊形/整潔架構)的關係
‧領域驅動設計與Entity、Value Object及Aggregate的區別
‧持久保存機制的Repository和Unit of Work模式
‧事件、指令和訊息匯流排
‧命令查詢責任隔離(CQRS)模式
‧事件驅動架構與反應式微服務

Harry Percival 在2009年就開始使用Python了,他也是TDD和XP的粉絲。他是O’Reilly書籍《測試驅動開發|使用Python》的作者,此書的副標題更是聞名—服從測試羊。

Bob Gregory 使用領域驅動設計來建構事件驅動系統已有十多年之久了,他曾經用過的語言包括C#、F#、Python與TypeScript。

目錄大綱

前言
引言

【第一部分 建立架構來支援領域模型的建構】
第一章 建立領域模型
第二章 Repository 模式
第三章 簡短插曲:關於耦合與抽象
第四章 我們的第一個用例:Flask API 與服務層
第五章 高速檔與低速檔的 TDD
第六章 Unit of Work 模式
第七章 Aggregate 與一致性界限


【第二部分 事件驅動架構】
第八章 事件與 Message Bus
第九章 搭著 Message Bus 進城
第十章 指令與指令處理式
第十一章 事件驅動架構:使用事件來整合微服務
第十二章 指令查詢責任隔離(CQRS)
第十三章 依賴注入(與啟動)

結語
附錄 A 總結圖表
附錄 B 模板專案結構
附錄 C 換掉基礎設施:用 CSV 做每一件事
附錄 D Repository 與 Unit of Work 模式,使用 Django
附錄 E 驗證

索引