نام کتاب
Architecture Patterns with Python

Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices

Harry Percival and Bob Gregory

Paperback304 Pages
PublisherO'Reilly
Edition1
LanguageEnglish
Year2020
ISBN9781492052203
1K
A103
انتخاب نوع چاپ:
جلد سخت
494,000ت
0
جلد نرم
434,000ت
0
طلق پاپکو و فنر
444,000ت
0
مجموع:
0تومان
کیفیت متن:اورجینال انتشارات
قطع:B5
رنگ صفحات:دارای متن و کادر رنگی
پشتیبانی در روزهای تعطیل!
ارسال به سراسر کشور

Python#

Architecture#

Patterns#

TDD#

DDD#

Test-Driven_Development,#

Domain-Driven_Design#

Event-driven#

clean_architecture#

توضیحات

🐍 با رشد روزافزون پایتون، پروژه‌ها بزرگ‌تر و پیچیده‌تر شده‌اند. بسیاری از توسعه‌دهندگان پایتون به طراحی‌های سطح بالا مانند Hexagonal/Clean Architecture، معماری مبتنی بر رویداد و الگوهای استراتژیک Domain-Driven Design (DDD) علاقه‌مند شده‌اند. اما پیاده‌سازی این الگوها در پایتون همیشه ساده نیست.


ویژگی‌های کلیدی کتاب:

  • معرفی الگوهای طراحی معماری اثبات‌شده برای مدیریت پیچیدگی برنامه‌ها
  • ارائه مثال‌های عینی و پایتونیک که از پیچیدگی‌های اضافی زبان‌هایی مثل Java و C# اجتناب می‌کنند
  • الگوها شامل:
  • Dependency Inversion و ارتباط آن با Ports & Adapters (Hexagonal/Clean Architecture)
  • تفاوت بین Entities، Value Objects و Aggregates در DDD
  • الگوهای Repository و Unit of Work برای ذخیره‌سازی پایدار
  • Events، Commands و Message Bus
  • CQRS (Command-Query Responsibility Segregation)
  • معماری مبتنی بر رویداد و میکروسرویس‌های واکنشی


📚 فهرست مطالب

بخش اول: ساخت معماری برای پشتیبانی از مدل‌سازی دامنه

فصل ۱: مدل‌سازی دامنه

فصل ۲: الگوی مخزن

فصل ۳: مرور اجمالی: اتصال و انتزاع

فصل ۴: اولین مثال عملی ما: API و لایه سرویس با Flask

فصل ۵: تست محور با سرعت بالا و پایین

فصل ۶: الگوی واحد کار

فصل ۷: Aggregates و مرزهای سازگاری


بخش دوم: معماری مبتنی بر رویداد

فصل ۸: رویدادها و پیام‌رسان

فصل ۹: پیاده‌سازی پیشرفته روی پیام‌رسان

فصل ۱۰: دستورات و مدیریت‌کننده‌ها

فصل ۱۱: استفاده از رویدادها برای یکپارچه‌سازی میکروسرویس‌ها

فصل ۱۲: جداسازی مسئولیت دستورات و پرس‌وجو

فصل ۱۳: تزریق وابستگی و راه‌اندازی


ضمائم

ضمیمه A: نمودار و جدول خلاصه

ضمیمه B: ساختار پروژه نمونه

ضمیمه C: جایگزینی زیرساخت با CSV

ضمیمه D: پیاده‌سازی Repository و Unit of Work با Django

ضمیمه E: اعتبارسنجی


📌 مخاطب کتاب:

  • توسعه‌دهندگانی که با برنامه‌های پایتون پیچیده سر و کار داشته‌اند
  • کسانی که می‌خواهند پیچیدگی برنامه‌ها را مدیریت کنند
  • افرادی که با DDD یا الگوهای کلاسیک معماری آشنا نیستند


👤 درباره نویسندگان:

  • Bob Gregory: معمار نرم‌افزار در MADE.COM با بیش از یک دهه تجربه در سیستم‌های مبتنی بر رویداد و DDD.
  • Harry Percival: توسعه‌دهنده و مروج TDD، با سابقه کار در Resolver One و PythonAnywhere و اکنون در MADE.COM.



As Python continues to grow in popularity, projects are becoming larger and more complex. Many Python developers are taking an interest in high-level software design patterns such as hexagonal/clean architecture, event-driven architecture, and the strategic patterns prescribed by domain-driven design (DDD). But translating those patterns into Python isn’t always straightforward.


With this hands-on guide, Harry Percival and Bob Gregory from MADE.com introduce proven architectural design patterns to help Python developers manage application complexity—and get the most value out of their test suites.


Each pattern is illustrated with concrete examples in beautiful, idiomatic Python, avoiding some of the verbosity of Java and C# syntax. Patterns include:

  • Dependency inversion and its links to ports and adapters (hexagonal/clean architecture)
  • Domain-driven design’s distinction between Entities, Value Objects, and Aggregates
  • Repository and Unit of Work patterns for persistent storage
  • Events, commands, and the message bus
  • Command-query responsibility segregation (CQRS)
  • Event-driven architecture and reactive microservices


Table of Contents

Part I. Building an Architecture to Support Domain Modeling

Chapter 1. Domain Modeling

Chapter 2. Repository Pattern

Chapter 3. A Brief Interlude: On Coupling and Abstractions

Chapter 4. Our First Use Case: Flask API and Service Layer

Chapter 5. TDD in High Gear and Low Gear

Chapter 6. Unit of Work Pattern

Chapter 7. Aggregates and Consistency Boundaries


Part II. Event-Driven Architecture

Chapter 8. Events and the Message Bus

Chapter 9. Going to Town on the Message Bus

Chapter 10. Commands and Command Handler

Chapter 11. Event-Driven Architecture: Using Events to Integrate Microservices

Chapter 12. Command-Query Responsibility Segregation (CQRS)

Chapter 13. Dependency Injection (and Bootstrapping)


Epilogue

Appendix A. Summary Diagram and Table

Appendix B. A Template Project Structure

Appendix C. Swapping Out the Infrastructure: Do Everything with CSVs

Appendix D. Repository and Unit of Work Patterns with Django

Appendix E. Validation


From the Preface

Who Should Read This Book

Here are a few things we assume about you, dear reader:

  • You’ve been close to some reasonably complex Python applications.
  • You’ve seen some of the pain that comes with trying to manage that complexity.
  • You don’t necessarily know anything about DDD or any of the classic application architecture patterns.

We structure our explorations of architectural patterns around an example app, building it up chapter by chapter. We use TDD at work, so we tend to show listings of tests first, followed by implementation. If you’re not used to working test-first, it may feel a little strange at the beginning, but we hope you’ll soon get used to seeing code “being used” (i.e., from the outside) before you see how it’s built on the inside.

We use some specific Python frameworks and technologies, including Flask, SQLAlchemy, and pytest, as well as Docker and Redis. If you’re already familiar with them, that won’t hurt, but we don’t think it’s required. One of our main aims with this book is to build an architecture for which specific technology choices become minor implementation details.


Origins of this book:

At the end of Harry’s last book, Test-Driven Development with Python (O’Reilly), he found himself asking a bunch of questions about architecture, such as, What’s the best way of structuring your application so that it’s easy to test? More specifically, so that your core business logic is covered by unit tests, and so that you minimize the number of integration and end-to-end tests you need? He made vague references to “Hexagonal Architecture” and “Ports and Adapters” and “Functional Core, Imperative Shell,” but if he was honest, he’d have to admit that these weren’t things he really understood or had done in practice.

And then he was lucky enough to run into Bob, who has the answers to all these questions. Bob ended up a software architect because nobody else on his team was doing it. He turned out to be pretty bad at it, but he was lucky enough to run into Ian Cooper, who taught him new ways of writing and thinking about code.

Our aim with this book is to introduce several classic architectural patterns and show how they support TDD, DDD, and event-driven services. We hope it will serve as a reference for implementing them in a Pythonic way, and that people can use it as a first step toward further research in this field.


About the Author

Bob Gregory is a UK-based software architect with MADE.COM. He has been building event driven systems with domain-driven design for more than a decade.


After an idyllic childhood spent playing with BASIC on French 8-bit computers like the Thomson T-07 whose keys go "boop" when you press them, Harry Percival spent a few years being deeply unhappy as a management consultant. Soon he rediscovered his true geek nature, and was lucky enough to fall in with a bunch of XP fanatics, working on the pioneering but sadly defunct Resolver One spreadsheet. He worked at PythonAnywhere LLP, spreading the gospel of TDD world-wide at talks, workshops and conferences. He is now with MADE.COM.

دیدگاه خود را بنویسید
نظرات کاربران (0 دیدگاه)
نظری وجود ندارد.
کتاب های مشابه
Python
469
Python 201
385,000 تومان
Python
842
Python, PyGame, and Raspberry Pi Game Development
525,000 تومان
Network
1,279
Learning Python Networking
609,000 تومان
Python
955
Teach Your Kids to Code
465,000 تومان
Python
880
Competitive Programming in Python
397,000 تومان
Python
258
Data Ingestion with Python Cookbook
586,000 تومان
Python
316
Mastering Python for Finance
556,000 تومان
Python
836
Python Graphics
618,000 تومان
Python
860
Introduction to Python for Science and Engineering
519,000 تومان
Python
1,186
Think Python
458,000 تومان
قیمت
منصفانه
ارسال به
سراسر کشور
تضمین
کیفیت
پشتیبانی در
روزهای تعطیل
خرید امن
و آسان
آرشیو بزرگ
کتاب‌های تخصصی
هـر روز با بهتــرین و جــدیــدتـرین
کتاب های روز دنیا با ما همراه باشید
آدرس
پشتیبانی
مدیریت
ساعات پاسخگویی
درباره اسکای بوک
دسترسی های سریع
  • راهنمای خرید
  • راهنمای ارسال
  • سوالات متداول
  • قوانین و مقررات
  • وبلاگ
  • درباره ما
چاپ دیجیتال اسکای بوک. 2024-2022 ©