PRO PHP 8 MVC: توسعه برنامه مبتنی بر معماری مدل-نما-کنترلر.
PRO PHP 8 MVC : model view controller architecture -driven application development.
معرفی کتاب «PRO PHP 8 MVC: توسعه برنامه مبتنی بر معماری مدل-نما-کنترلر.» (با عنوان لاتین PRO PHP 8 MVC : model view controller architecture -driven application development.) نوشتهٔ Ian، Rankin و Christopher Pitt (auth.)، منتشرشده توسط نشر Apress L. P. در سال 2021. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
Examine the building blocks that make any good MVC framework using PHP 8. This book exposes all the considerations that many developers take for granted when using a popular framework, and teaches you how to make this MVC framework your own. You'll quickly get started writing your first bit of framework code, then, you build a variety of examples using aspects of an MVC framework, including a router, a template engine, a database library, a persistence engine (ORM), and a testing framework. In the next section, you'll implement sessions, caches, file systems, queues, logging, and mail. You'll wrap up by building a larger scale sample web application: a sales website for a company that sells rockets. Along the way, this book lays bare all the secret parts of MVC to take with you to apply to your own PHP-based MVC projects. What You Will Learn Build PHP-based web applications using the model view controller (MVC) architecture Write your first bit of framework code Compare the code you write with how the popular frameworks do the same kinds of things Create various aspects of applications, engines, and other frameworks Wrap up with a sample case study application Who This Book Is For Experienced PHP and web developers. Some prior experience with PHP and web development at least recommended. Table of Contents 5 About the Author 10 About the Technical Reviewer 11 Before We Start... 12 Chapter 1: Ways to Use PHP 16 Running Scripts in the Terminal 16 Running a Website Through a GUI 18 Running a Website Through a Virtual Computer 18 Running a Website on a Remote Server 20 Coding in a Sandbox 22 Coding on the Go 22 A Note About Docker 27 Where to from Here? 27 Chapter 2: Writing Our First Bit of Code 28 Handling a Request 30 Responding with HTML 34 Redirecting to Another URL 35 Showing an Error Page 38 Summary 43 Chapter 3: Building a Router 44 What Routers Are Used For 44 Some Features We Could Build 45 Putting It Together 45 Adding Named Route Parameters to the Mix 53 Building URLs from Named Routes 60 How the Experts Do It 63 The Symfony Router 63 FastRoute 66 Laravel and Lumen 67 Chapter 4: Building a Template Engine 68 What Do Template Engines Do? 68 Basic Variable String Templates 68 PHP-in-HTML 69 Complex Variable String Templates 70 Complex Compilers 70 Some Features We Could Build 74 Putting It Together 75 Building the Basic Variable String Template Engine 77 Building the PHP-in-HTML Engine 82 Building the Advanced Variable String Template Engine 100 Building the HTML-in-PHP Engine 108 How the Experts Do It 111 Plates 112 Blade 113 Summary 114 Chapter 5: Building a Validator 115 What Are Controllers? 115 What Does This Have to Do with Building a Validator? 116 Improving Error Handling 116 Creating Controllers 121 Creating a Form 127 Protecting Our Forms 141 How the Experts Do It 143 Handling Validation Errors 144 Summary 146 Chapter 6: Building a Database Library 147 What Are Database Libraries Used For? 147 Things We Should Add 148 Communicating with the Database 149 Running Commands from the Terminal 161 Making a Migration Command 165 Altering Tables 182 Caveats 188 How the Pros Do It 189 Summary 191 Chapter 7: Building an Object-Relational Mapper Library 192 In the Meantime... 192 Redesigned Registration, Home, and Product Pages 193 New Migrate Flag and Seeding 195 Validation Errors and the Session 201 Controllers 201 Why Not Stop with Just a Database Library? 203 "has...one?" 205 Putting It Together 207 Tying into the Query Builder 210 Getters and Setters 214 Inserting, Updating, and Deleting 217 Casting Values 222 Relationships 223 What About Attributes 229 Caveats 232 How the Pros Do It 232 Doctrine ORM 233 Summary 234 Chapter 8: Building a Dependency Injection Container 235 During the Break... 235 What Is a Dependency Injection Container Used For? 240 Let’s Get Building! 243 Binding and Resolving 247 Resolving Function Parameters 252 Caveats 256 Different Approaches to Explore 256 Summary 257 Chapter 9: Testing Our Framework 258 Between the Chapters... 258 Why Should We Test Our Code? 260 Different Types of Tests 261 Ways We'll Be Testing 261 Putting It All Together 262 Testing HTTP Requests 271 Testing Browser Interaction 283 Caveats 286 How the Pros Do Things 286 Summary 287 Chapter 10: Config, Cache, Sessions, Filesystems 288 What's Changed Since Last Time? 288 Better Config Management 296 Cache 301 Sessions 314 Filesystems 320 Caveats 326 Summary 327 Chapter 11: Queues, Logging, Emails 328 In the Meantime... 328 Better Exception Handling 328 Refactoring Providers 334 Queuing 336 Logging 349 Email 353 Caveats 360 Summary 361 Chapter 12: Publishing Your Code 362 Finishing Touches 362 #1: Helpful Home Page 362 #2: More Examples of Functionality 364 #3: Good Documentation 364 #4: Complete Tests 365 #5: Make Sure It’s What You Want to Do 366 Using Packagist 366 Summary 368 Afterword: Wrapping Up 369 Index 370
دانلود کتاب PRO PHP 8 MVC: توسعه برنامه مبتنی بر معماری مدل-نما-کنترلر.