وبلاگ بلیان

Modular Programming with PHP 7

معرفی کتاب «Modular Programming with PHP 7» نوشتهٔ Branko Ajzele، منتشرشده توسط نشر Packt Publishing - ebooks Account در سال 2016. این کتاب در 5 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است. «Modular Programming with PHP 7» در دستهٔ بدون دسته‌بندی قرار دارد.

**Utilize the power of modular programming to improve code readability, maintainability, and testability** About This Book* This book demonstrates code reusability and distributed development to get high speed, maintainable, and fast applications * It illustrates the development of a complete modular application developed using PHP7 in detail * This book provides a high-level overview of the Symfony framework, a set of tools and a development methodology that are needed to build a modular web shop application Who This Book Is ForThis step-by-step guide is divided into two sections. The first section explores all the fundamentals of modular design technique with respect to PHP 7. The latter section demonstrates the practical development of individual modules of a web shop application. What You Will Learn* Discover the new features of PHP 7 that are relevant to modular application development * Write manageable code based on the GoF design patterns and SOLID principles * Define the application requirements of a working modular application * Explore the ins and outs of the Symfony framework * Build a set of modules based on the Symfony framework that comprise a simple web shop app * Use core modules to set the structure and dependencies for other modules to use * Set up entities that are relevant to the module functionality and see how to manage these entities In DetailModular design techniques help you build readable, manageable, reusable, and more efficient codes. PHP 7, which is a popular open source scripting language, is used to build modular functions for your software. With this book, you will gain a deep insight into the modular programming paradigm and how to achieve modularity in your PHP code. We start with a brief introduction to the new features of PHP 7, some of which open a door to new concepts used in modular development. With design patterns being at the heart of all modular PHP code, you will learn about the GoF design patterns and how to apply them. You will see how to write code that is easy to maintain and extend over time with the help of the SOLID design principles. Throughout the rest of the book, you will build different working modules of a modern web shop application using the Symfony framework, which will give you a deep understanding of modular application development using PHP 7. Style and approachThis book is for intermediate-level PHP developers with little to no knowledge of modular programming who want to understand design patterns and principles in order to better utilize the existing frameworks for modular application development. Cover 1 Copyright 3 Credits 4 About the Author 5 About the Reviewer 6 www.PacktPub.com 7 Table of Contents 8 Preface 14 Chapter 1: Ecosystem Overview 20 Getting ready for PHP 7 21 Scalar type hints 22 Return type hints 23 Anonymous classes 24 The Closure::call() method 27 Generator delegation 28 Generator return expressions 29 The null coalesce operator 31 The Spaceship operator 32 Throwables 33 The \ParseError 35 Level support for the dirname() function 35 The integer division function 36 Constant arrays 37 Uniform variable syntax 37 Secure random number generator 39 Filtered unserialize() 40 Context sensitive lexer 41 Group use declarations 42 Unicode enhancements 43 Assertions 45 Changes to the list() construct 46 Session options 47 Deprecated features 47 Frameworks 49 Laravel framework 50 Symfony 51 Zend Framework 52 CodeIgniter 53 CakePHP 54 Slim 55 Yii 56 Phalcon 57 Summary 58 Chapter 2: GoF Design Patterns 60 Creational patterns 61 Abstract factory pattern 61 Builder pattern 62 Factory method pattern 65 Prototype pattern 66 Singleton pattern 67 Structural patterns 68 Adapter pattern 68 Bridge pattern 70 Composite pattern 71 Decorator pattern 73 Facade pattern 74 Flyweight pattern 76 Proxy pattern 77 Behavioral patterns 79 Chain of responsibility pattern 79 Command pattern 81 Interpreter pattern 82 Iterator pattern 84 Mediator pattern 86 Memento pattern 88 Observer pattern 89 State pattern 91 Strategy pattern 92 Template pattern 93 Visitor pattern 95 Summary 97 Chapter 3: SOLID Design Principles 98 Single responsibility principle 99 Open/closed principle 102 Liskov substitution principle 105 Interface Segregation Principle 108 Dependency inversion principle 109 Summary 110 Chapter 4: Requirement Specification for a Modular Web Shop App 112 Defining application requirements 113 Wireframing 114 Defining a technology stack 126 The Symfony framework 126 Foundation framework 128 Summary 129 Chapter 5: Symfony at a Glance 130 Installing Symfony 130 Creating a blank project 132 Using Symfony console 134 Controller 140 Routing 141 Templates 143 Forms 146 Configuring Symfony 149 The bundle system 151 Databases and Doctrine 154 Testing 156 Validation 158 Summary 160 Chapter 6: Building the Core Module 162 Requirements 162 Dependencies 163 Implementation 163 Configuring application-wide security 176 Unit testing 179 Functional testing 179 Summary 183 Chapter 7: Building the Catalog Module 184 Requirements 184 Dependencies 185 Implementation 185 Creating entities 188 Managing image uploads 193 Overriding core module services 196 Setting up a Category page 199 Setting up a Product page 202 Unit testing 204 Functional testing 205 Summary 207 Chapter 8: Building the Customer Module 208 Requirements 208 Dependencies 209 Implementation 209 Creating a customer entity 211 Modifying the security configuration 213 Extending the customer entity 215 Creating the orders service 216 Creating the customer menu service 217 Implementing the register process 220 Implementing the login process 221 Implementing the logout 226 Managing forgotten passwords 226 Unit testing 228 Functional testing 230 Summary 233 Chapter 9: Building the Payment Module 234 Requirements 234 Dependencies 235 Implementation 236 Creating a card entity 237 Creating a card payment service 238 Creating a card payment controller and routes 240 Creating a check money payment service 241 Creating a check money payment controller and routes 243 Unit testing 244 Functional testing 247 Summary 250 Chapter 10: Building the Shipment Module 252 Requirements 252 Dependencies 253 Implementation 254 Creating a flat rate shipment service 255 Creating a flat rate shipment controller and routes 256 Creating a dynamic rate payment service 257 Creating a dynamic rate shipment controller and routes 259 Unit testing 260 Functional testing 264 Summary 266 Chapter 11: Building the Sales Module 268 Requirements 268 Dependencies 270 Implementation 270 Creating a Cart entity 272 Creating the cart item entity 273 Creating an Order entity 275 Creating a SalesOrderItem entity 278 Overriding the add_to_cart_url service 281 Overriding the checkout_menu service 285 Overriding the customer orders service 287 Overriding the bestsellers service 292 Creating the cart page 294 Creating the Payment service 297 Creating the Shipment service 298 Creating the checkout page 299 Creating the order success page 307 Creating a store manager dashboard 308 Unit testing 310 Functional testing 311 Summary 314 Chapter 12: Integrating and Distributing Modules 316 Understanding Git 316 Understanding GitHub 317 Understanding Composer 320 Understanding Packagist 321 Summary 326 Index 328

Utilize the power of modular programming to improve code readability, maintainability, and testability

About This Book

  • This book demonstrates code reusability and distributed development to get high speed, maintainable, and fast applications
  • It illustrates the development of a complete modular application developed using PHP7 in detail
  • This book provides a high-level overview of the Symfony framework, a set of tools and a development methodology that are needed to build a modular web shop application

Who This Book Is For

This step-by-step guide is divided into two sections. The first section explores all the fundamentals of modular design technique with respect to PHP 7. The latter section demonstrates the practical development of individual modules of a web shop application.

What You Will Learn

  • Discover the new features of PHP 7 that are relevant to modular application development
  • Write manageable code based on the GoF design patterns and SOLID principles
  • Define the application requirements of a working modular application
  • Explore the ins and outs of the Symfony framework
  • Build a set of modules based on the Symfony framework that comprise a simple web shop app
  • Use core modules to set the structure and dependencies for other modules to use
  • Set up entities that are relevant to the module functionality and see how to manage these entities

In Detail

Modular design techniques help you build readable, manageable, reusable, and more efficient codes. PHP 7, which is a popular open source scripting language, is used to build modular functions for your software. With this book, you will gain a deep insight into the modular programming paradigm and how to achieve modularity in your PHP code.

We start with a brief introduction to the new features of PHP 7, some of which open a door to new concepts used in modular development. With design patterns being at the heart of all modular PHP code, you will learn about the GoF design patterns and how to apply them. You will see how to write code that is easy to maintain and extend over time with the help of the SOLID design principles.

Throughout the rest of the book, you will build different working modules of a modern web shop application using the Symfony framework, which will give you a deep understanding of modular application development using PHP 7.

Style and approach

This book is for intermediate-level PHP developers with little to no knowledge of modular programming who want to understand design patterns and principles in order to better utilize the existing frameworks for modular application development.

Utilize the power of modular programming to improve code readability, maintainability, and testability About This Book This book demonstrates code reusability and distributed development to get high speed, maintainable, and fast applications It illustrates the development of a complete modular application developed using PHP7 in detail This book provides a high-level overview of the Symfony framework, a set of tools and a development methodology that are needed to build a modular web shop application Who This Book Is For This step-by-step guide is divided into two sections. The first section explores all the fundamentals of modular design technique with respect to PHP 7. The latter section demonstrates the practical development of individual modules of a web shop application. What You Will Learn Discover the new features of PHP 7 that are relevant to modular application development Write manageable code based on the GoF design patterns and SOLID principles Define the application requirements of a working modular application Explore the ins and outs of the Symfony framework Build a set of modules based on the Symfony framework that comprise a simple web shop app Use core modules to set the structure and dependencies for other modules to use Set up entities that are relevant to the module functionality and see how to manage these entities In Detail Modular design techniques help you build readable, manageable, reusable, and more efficient codes. PHP 7, which is a popular open source scripting language, is used to build modular functions for your software. With this book, you will gain a deep insight into the modular programming paradigm and how to achieve modularity in your PHP code. We start with a brief introduction to the new features of PHP 7, some of which open a door to new concepts used in modular development. With design patterns being at the heart of all modular PHP code, you will learn about the GoF design patterns and how to apply them. You will see how to write code that is easy to maintain and extend over time with the help of the SOLID design principles. Throughout the rest of the book, you will build different working modules of a modern web shop application using the Symfony framework, which will give you a deep understanding of modular application development using PHP 7. Style and approach This book is for intermediate-level PHP developers with little to no knowledge of modular programming who want to understand design patterns.. About This BookThis book demonstrates code reusability and distributed development to get high speed, maintainable, and fast applicationsIt illustrates the development of a complete modular application developed using PHP7 in detailThis book provides a high-level overview of the Symfony framework, a set of tools and a development methodology that are needed to build a modular web shop applicationWho This Book Is ForThis step-by-step guide is divided into two sections. The first section explores all the fundamentals of modular design technique with respect to PHP 7. The latter section demonstrates the practical development of individual modules of a web shop application.What You Will LearnDiscover the new features of PHP 7 that are relevant to modular application developmentWrite manageable code based on the GoF design patterns and SOLID principlesDefine the application requirements of a working modular applicationExplore the ins and outs of the Symfony frameworkBuild a set of modules based on the Symfony framework that comprise a simple web shop appUse core modules to set the structure and dependencies for other modules to useSet up entities that are relevant to the module functionality and see how to manage these entitiesIn DetailModular design techniques help you build readable, manageable, reusable, and more efficient codes. PHP 7, which is a popular open source scripting language, is used to build modular functions for your software. With this book, you will gain a deep insight into the modular programming paradigm and learn how to achieve modularity in your PHP code.We start with a brief introduction to the new features of PHP 7, some of which are new concepts used in modular development. With design patterns being at the heart of all modular PHP code, you will learn about the GoF design patterns. You will see how to write code that is easy to maintain and extend over time with the help of the SOLID design principles.Throughout the book, you will build different working modules of a modern web shop application using the Symfony framework, which will give you a deep understanding of modular application development using PHP 7.
دانلود کتاب Modular Programming with PHP 7