وبلاگ بلیان

Practical Python Design Patterns : Pythonic Solutions to Common Problems

معرفی کتاب «Practical Python Design Patterns : Pythonic Solutions to Common Problems» نوشتهٔ Badenhorst, Wessel، منتشرشده توسط نشر Apress : Imprint: Apress در سال 2017. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Practical Python Design Patterns : Pythonic Solutions to Common Problems» در دستهٔ بدون دسته‌بندی قرار دارد.

Become a better, more productive programmer through a series of projects that will help you deeply understand and master each of the design patterns covered. In this book you will learn to write elegant "Pythonic" code to solve common programming problems. You will also experience design thinking, by identifying design patterns that would be helpful given a specific problem or situation. Python is eating the world. In recent years it has become so much more than a mere object-oriented, scripting language. Design patterns help you think of and solve problems in chunks. They help you to stand on the shoulders of the giants who have come before, instead of having to reinvent the wheel. **What You Will Learn** * Craft cleaner code * Increase your effectiveness as a programmer * Write more "Pythonic" code * Solve bigger problems * Discover optimal solutions to com mon problems, done in a way that is uniquely "Pythonic." **Who This Book Is For** Programmers who are comfortable with Python. It is also guide for people who have mastered other programming languages and who want to make the transition to Python. Table of Contents......Page 5 About the Author......Page 12 About the Technical Reviewer......Page 13 Acknowledgments......Page 14 The Masters......Page 15 Becoming a Better Programmer......Page 17 Deliberate Practice......Page 18 Rapid Feedback......Page 19 Stretch Yourself......Page 20 How Do You Do This?......Page 21 The Ability to Course Correct......Page 22 Mental Models......Page 23 The Right Tools for the Job......Page 24 What Makes a Design Pattern?......Page 25 Structural......Page 26 How to Read This Book......Page 27 On Linux......Page 28 On Mac......Page 29 On Windows......Page 30 VirtualEnv......Page 31 Editors......Page 32 Vim......Page 33 Sublime Text......Page 34 Summary......Page 35 The Problem......Page 36 Enter the Objects......Page 42 Cleaning It Up......Page 45 Exercises......Page 48 Beyond the First Steps......Page 49 Base for an Actual Game......Page 50 Implementing the Prototype Pattern......Page 63 Shallow Copy vs. Deep Copy......Page 64 Shallow Copy......Page 65 Dealing with Nested Structures......Page 66 Deep Copy......Page 67 Using What We Have Learned in Our Project......Page 68 Exercises......Page 71 Getting Started......Page 73 The Game Loop......Page 75 The Factory Method......Page 80 The Abstract Factory......Page 82 Summary......Page 84 Exercises......Page 85 Chapter 5: Builder Pattern......Page 86 Anti-Patterns......Page 95 A Note on Abstraction......Page 100 Exercises......Page 101 Chapter 6: Adapter Pattern......Page 102 Separation of Concern......Page 104 Sample Problem......Page 107 Class Adapter......Page 108 Object Adapter Pattern......Page 109 Duck Typing......Page 110 Implementing the Adapter Pattern in the Real World......Page 111 Parting Shots......Page 113 Exercises......Page 114 Chapter 7: Decorator Pattern......Page 115 The Decorator Pattern......Page 118 Closures......Page 123 Retaining Function __name__ and __doc__ Attributes......Page 124 Decorating Classes......Page 128 Exercises......Page 131 Point of Sale Example......Page 132 Systems Evolution......Page 136 What Sets the Facade Pattern Apart......Page 138 Exercises......Page 141 Memoization......Page 142 The Proxy Pattern......Page 145 Virtual Proxy......Page 148 Parting Shots......Page 149 Exercises......Page 150 Chapter 10: Chain of Responsibility Pattern......Page 151 Setting Up a WSGI Server......Page 153 Authentication Headers......Page 154 The Chain of Responsibility Pattern......Page 158 Implementing Chain of Responsibility in Our Project......Page 162 A More Pythonic Implementation......Page 167 Parting Shots......Page 172 Exercises......Page 173 Controlling the Turtle......Page 174 The Command Pattern......Page 176 Exercises......Page 184 Domain-Specific Languages......Page 185 Disadvantages of DSLs......Page 189 Composite Pattern......Page 194 Internal DSL Implementation Using the Composite Pattern......Page 195 Implementing the Interpreter Pattern......Page 200 Exercises......Page 207 Chapter 13: Iterator Pattern......Page 209 Python Internal Implementation of the Iterator Pattern......Page 212 Itertools......Page 219 Generator Functions......Page 220 Generator Expression......Page 222 Exercises......Page 223 Chapter 14: Observer Pattern......Page 224 Parting Shots......Page 241 Exercises......Page 242 Chapter 15: State Pattern......Page 243 State Pattern......Page 246 Parting Shots......Page 251 Exercises......Page 252 Chapter 16: Strategy Pattern......Page 253 Parting Shots......Page 258 Exercises......Page 259 Chapter 17: Template Method Pattern......Page 260 Exercises......Page 272 Chapter 18: Visitor Pattern......Page 274 The Visitor Pattern......Page 287 Parting Shots......Page 299 Exercises......Page 300 Chapter 19: Model-View-Controller Pattern......Page 301 Model-View-Controller Skeleton......Page 305 Controllers......Page 307 Views......Page 308 Bringing It All Together......Page 309 Parting Shots......Page 315 Exercises......Page 316 Chapter 20: Publish–Subscribe Pattern......Page 317 Distributed Message Sender......Page 324 Parting Shots......Page 327 Exercises......Page 328 Quick Checks for the Code......Page 329 Singleton......Page 330 Factory......Page 331 Builder......Page 332 Decorator......Page 333 Facade......Page 334 Proxy......Page 335 Alternative......Page 336 Command......Page 337 Interpreter......Page 338 Iterator......Page 339 Observer......Page 340 State......Page 341 Template Method......Page 342 Visitor......Page 343 Model–View–Controller......Page 344 Publisher–Subscriber......Page 345 Final Words......Page 346 Index......Page 347
دانلود کتاب Practical Python Design Patterns : Pythonic Solutions to Common Problems