Principles and patterns
Ronald Mak

#Python
#Software_Design
📘 این کتاب بهت یاد میده چطور از صرفا نوشتن کد پایتون، سطحت رو ارتقا بدی و برسی به طراحی اپلیکیشنهای پایتونی.
🚀 با دنبال کردن مثالهای ملموس "قبل" و "بعد" از بهبود کد، یاد میگیری اپلیکیشنهای پایتون رو به شکل موثر برنامهریزی و اجرا کنی و از باگهای مربوط به مدیریت نشدن state، کلاسهای بدفرم، توابع غیرمنعطف و موارد دیگه دوری کنی.
🏗 اپلیکیشنهای عالی از اصول و الگوهای طراحی تثبیتشدهای استفاده میکنن که پرفرمنس، قابلیت نگهداری و اطمینانپذیری رو به حداکثر میرسونه.
🐍 این کتاب کمکت میکنه رویکرد "Pythonic" رو در اصول معماری مثل کپسولهسازی (Encapsulation)، انتزاع (Abstraction)، تنوع متدها و غیره مسلط بشی. مثالها به زبان پایتون هستن، اما تکنیکها برای هر زبان شیگرایی کاربرد داره.
🎓 در کتاب Software Design for Python Programmers یاد میگیری:
• تحلیل نیازمندیها و برنامهریزی معماری اپلیکیشن
• تکامل طرحها از طریق توسعه تکرارپذیر (Iterative)
• شکلدهی به کلاسهای پایتون با انسجام بالا (High Cohesion) و وابستگی کم (Loose Coupling)
• استفاده از دکوریتورها برای ایجاد انتزاع، اعمال محدودیتها و غنیسازی رفتارها
• اعمال اصول طراحی استاندارد صنعت برای ماژولار و قابل نگهداری نگه داشتن کد
• انتخاب و پیادهسازی الگوهای طراحی (Design Patterns) مناسب برای چالشهای پیچیده
🛠 درباره تکنولوژی
💡 نرمافزار عالی با طراحی متفکرانه شروع میشه. اگه بتونی تصمیم بگیری که دادهها چطور در اپلیکیشن جریان پیدا کنن، یه معماری نرمافزاری برنده بسازی و قبل از نوشتن حتی یک خط کد، توابع، کلاسها و ماژولها رو ساختاردهی کنی، توسعهدهنده موثرتری خواهی بود. این کتاب استارت کار رو برات میزنه!
📖 درباره کتاب
📘 کتاب Software Design for Python Programmers یه راهنمای عملی برای ساخت نرمافزارهای قابل نگهداری و خوشساختار در پایتون هست.
🔍 با بررسی مثالهای شفاف "قبل و بعد"، متوجه میشی که حتی انتخابهای کوچک در طراحی چقدر میتونه تأثیر بزرگی روی شفافیت و اطمینانپذیری اپلیکیشن داشته باشه.
📈 در طول مسیر، یاد میگیری چطور نیازمندیها رو جمعآوری کنی، معماری برنامه رو به صورت تکرارپذیر شکل بدی، انتزاعهای تمیز و قابل استفاده مجدد بسازی و الگوهای طراحیای رو انتخاب کنی که مشکلات واقعی شغلیت رو حل کنن.
📦 آنچه در این کتاب است
• تبدیل نیازمندیهای مبهم به طرحهای محکم
• تکنیکهای طراحی نرمافزار مخصوص پایتون
• ایجاد کلاسهایی با انسجام بالا و وابستگی کم
👥 درباره خوانندگان
💻 مناسب برای برنامهنویسانی که با سینتکس پایتون راحت هستن.
📑 فهرست مطالب
بخش ۱: مقدمه
۱. مسیر رسیدن به نرمافزار خوشطراحیشده
۲. تکرار برای رسیدن به طراحی خوب
بخش ۲: طراحی اپلیکیشن درست
۳. دریافت نیازمندیها برای ساخت اپلیکیشن درست
۴. طراحی خوب کلاس برای درست ساختن اپلیکیشن
بخش ۳: درست طراحی کردن اپلیکیشن
۵. مخفیسازی پیادهسازیهای کلاس
۶. کاربران خود را غافلگیر نکنید
۷. طراحی درست زیرکلاسها
بخش ۴: الگوهای طراحی مشکلات معماری اپلیکیشن را حل میکنند
۸. الگوهای طراحی Template Method و Strategy
۹. الگوهای طراحی Factory Method و Abstract Factory
۱۰. الگوهای طراحی Adapter و Façade
۱۱. الگوهای طراحی Iterator و Visitor
۱۲. الگوی طراحی Observer
۱۳. الگوی طراحی State
۱۴. الگوهای طراحی Singleton، Composite و Decorator
بخش ۵: تکنیکهای طراحی اضافی
۱۵. طراحی راهحلها با بازگشت (Recursion) و عقبگرد (Backtracking)
۱۶. طراحی برنامههای چندنخی (Multithreaded)
👨💻 درباره نویسنده
🎓 رونالد مک (Ronald Mak) یه مدرس با رتبه بالا در زمینه تحلیل و طراحی شیگرا در دانشگاه ایالتی سنخوزه هست.
🌌 سوابق شغلی اون شامل نقشهایی مثل دانشمند ارشد کامپیوتر در NASA و JPL میشه، جایی که در مأموریتهای بزرگی مثل مریخنوردها و فضاپیمای Orion مشارکت داشته.
🏢 تخصص رونالد شامل تحقیقات در IBM، استراتژی نرمافزار سازمانی در آزمایشگاه لارنس لیورمور و نقشهای ارشد در Apple و Sun Microsystems میشه.
📜 اون مدارکی در علوم ریاضی و علوم کامپیوتر از دانشگاه استنفورد داره و ۱۲ اختراع نرمافزاری ثبت کرده. کتاب "طراحی نرمافزار شیگرا در C++" ششمین کتاب ایشون هست.
This book shows you how to level up from writing Python code to designing Python applications. Following intuitive “before” and “after” examples of improved code, you’ll learn to plan and execute Python applications effectively and avoid bugs associated with unmanaged state, poorly-formed classes, inflexible functions, and more.
Great applications take advantage of established design principles and patterns that maximize performance, maintainability, and reliability. This book helps you master the “Pythonic” approach to architectural principles, such as encapsulation, abstraction, method variation, and more. The examples are in Python, but the techniques will apply to any object-oriented language.
In Software Design for Python Programmers, you’ll learn to:
• Analyze requirements and plan application architecture
• Evolve designs through iterative development
• Shape Python classes with high cohesion and loose coupling
• Use decorators to introduce abstraction, enforce constraints, and enrich behavior
• Apply industry-standard design principles to keep code modular and maintainable
• Choose and implement the right design patterns for complex challenges
About the Technology
Great software starts with thoughtful design. You’ll be a more effective developer if you can decide how data will
flow through your applications, create a winning software architecture, and structure functions, classes, and modules before you write a line of code. This book will get you started!
About the Book
Software Design for Python Programmers is a practical guide for creating maintainable, well-structured software in Python. By investigating clear “before and after” examples, you’ll discover how even small design choices can have a huge impact on an application’s clarity and reliability. As you go, you’ll learn how to gather requirements, shape a program’s architecture iteratively, create clean and reusable abstractions, and select design patterns that solve the real problems you’ll face on the job.
What’s Inside
• Turn vague requirements into solid designs
• Python-specific software design techniques
• Create classes with high cohesion and loose coupling
About the Readers
For programmers comfortable with Python syntax.
Table of Contents
Part 1 Introduction
1. The path to well-designed software
2. Iterate to achieve good design
Part 2 Design the right application
3. Get requirements to build the right application
4. Good class design to build the application right
Part 3 Design the application right
5. Hide class implementations
6. Don’t surprise your users
7. Design subclasses right
Part 4 Design patterns solve application architecture problems
8. The Template Method and Strategy Design Patterns
9. The Factory Method and Abstract Factory Design Patterns
10. The Adapter and Façade Design Patterns
11. The Iterator and Visitor Design Patterns
12. The Observer Design Pattern
13. The State Design Pattern
14. The Singleton, Composite, and Decorator Design Patterns
Part 5 Additional design techniques
15. Designing solutions with recursion and backtracking
16. Designing multithreaded programs
About the Author
Ronald Mak is a highly rated instructor in object-oriented analysis and design at San Jose State University. His career has included roles as a senior computer scientist at NASA and JPL, where he contributed to major missions like Mars rovers and the Orion spacecraft. Ronald's expertise spans research at IBM, enterprise software strategy at Lawrence Livermore Lab, and senior roles at Apple and Sun Microsystems. He holds degrees in mathematical sciences and computer science from Stanford University, and has 12 software patents. Object-Oriented Software Design in C++ is his sixth book.









