وبلاگ بلیان

More Coding in Delphi

معرفی کتاب «More Coding in Delphi» نوشتهٔ Nick Hodges، منتشرشده توسط نشر Nepeta Enterprises در سال 2015. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «More Coding in Delphi» در دستهٔ بدون دسته‌بندی قرار دارد.

Like its predecessor Coding in Delphi, More Coding in Delphi is about writing Delphi code. In this book, you won’t find much about the form designer, the VCL, or the FMX framework. You will, however, learn about:* How to write SOLID code in Delphi* Using Delphi with design patterns like the Factory, Observer, Adapter, Decorator, and Command Patterns.* How to take advantage of Operator Overloading to simplify your code* How to write multi-threaded and parallel code and take advantage of the multiple cores in your CPU* How to write Aspect-oriented code to help separate your concerns* The history of and an deep-dive into the world famous TSmiley component Table of Contents 4 Foreword 7 Preface 8 Acknowledgments 10 Frameworks Used in this Book 11 Spring for Delphi Framework 11 DuckDuckDelphi 11 Six Thoughts Before We Start 12 Thoughts on Encapsulation 12 Thoughts on Coupling 16 Thoughts on Cohesion 17 Thoughts on Command Query Principle 18 Thoughts on Postel's Law 20 Thoughts on Composition over Inheritance 21 Conclusion 24 Writing SOLID Code 26 Introduction 26 What SOLID Is 26 Single Responsibility Principle 27 Open/Closed Principle 29 Liskov's Substitution Principle 31 Interface Segregation Principle 34 Dependency Inversion Principle 37 Conclusion 41 Patterns 42 Factory Pattern 43 Introduction 43 An Informal Look at Factories 43 A More Formal Look at Factories 53 Factory Method 53 Abstract Factory 54 Conclusion 58 Observer Pattern 59 Introduction 59 Baseball Data 59 Generic Observer with Spring4D 65 Conclusion 68 The Adapter Pattern 69 Introduction 69 A Simple Example 70 A More Practical Example 73 Conclusion 76 Decorator Pattern 77 Decorator and Interfaces 81 Summary 86 Introduction 87 A Simple Example: An Auto Key Fob 87 Undoing Commands 92 A Simple Queue of Commands 96 Summary 99 Operator Overloading 101 An Example: TFraction 102 Assignments 106 Implicit vs. Explicit 107 Using TFraction 108 Conclusion 109 Multi-Threading and Parallelism 111 Introduction 111 About These Three Chapters 111 What is a Thread? 111 Think Differently 112 Why Should I Care About Multi-threaded and Parallel Programming? 113 Multi-threading with TThread 116 Introduction 116 Descending from TThread 116 Thread Termination 121 Handling Exceptions in Threads 124 TThread Class Methods 126 Synchronization 128 Abstracting the Notion of Synchronization 131 The Perils of Multi-threading 137 Conclusion 138 Parallel Programming 139 Parallel Programming Library 139 Parallel For Loops 156 Introduction 156 Conclusion 169 Aspect-Oriented Programming 170 Introduction 170 An Illustration 171 The Basics: 172 A More Useful Example 178 AOP in a Single Place 181 AOP via Attributes 183 Conclusion 184 Component Writing 185 Introduction 185 TSmiley – A Brief History 185 Start from Scratch 187 Conclusion 206 Appendix A: Resources 207 Source Control 207 Patterns 208 Appendix B: Duck Typing 209 Introduction 209 What is Going on Here? 209 Duck Typing with DSharp 210 Duck Typing with DuckDuckDelphi 213 Duck Typing in the VCL 217 Why Use Duck Typing? 218 Problems with Duck Typing 218 Conclusion 219 Appendix C: Stuff Nick Does When Coding 220 Formatting Stuff 220 Spacing 220 Coding Stuff 224 Conclusion 227 Appendix D: Sources Used in Writing This Book 228 Books 228 Web Links 228 Videos 229
دانلود کتاب More Coding in Delphi