Pro PHP MVC [electronic resource] /
Pitt, Chris.author.
Model View Controller (MVC) is becoming the definitive architecture of website development frameworks due to the stability, extensibility and predictability it lends to development. It is not just the primary separation of database, business logic and interface components, but includes a wide range of considerations for building high-performing, scalable and secure applications. Deciding which MVC framework best suits the project you are about to begin is one of the biggest challenges you'll face as a developer. If you are part of a team, this decision has probably already been made for you; but in any event, you'll need to know how (and why) the framework authors made it work the way it does. Pro PHP MVC looks at the building blocks that make any good MVC framework, and how they apply to PHP. It exposes all considerations that many developers take for granted when using a popular framework, and teaches you how to make the framework your own.  Over the course of reading this book, you will learn the theoretical implications of the choices you would make when writing your own MVC framework, and how to put the pieces together in a cohesive package. We take a look at the highly modular Zend Framework—how to use its collection of loosely coupled classes to build a unified system. We also look at CakePHP, learning from its automated build system (Bakery) and highly intuitive approach to rapid development. This book will lay bare all the secret parts of MVC for you.
Title Page; Copyright Page; Table of Contents; About the Author; About the Technical Reviewer; Acknowledgments; Introduction; Who This Book Is For; What This Book Won't Teach You; What This Book Will Teach You; Source Code; CHAPTER 1 Introduction to MVC; What Is MVC?; Benefits of MVC; Popular MVC Frameworks; CodeIgniter; Zend Framework; CakePHP; Design Patterns; Singleton; Registry; Factory; Observer; Creating Our Own Framework; Goals; CHAPTER 2 Foundation; Goals; Autoloading; Namespaces; Lazy Loading; Exceptions; Type Methods; Metadata; Questions; Answers; Exercises; CHAPTER 3 Base Class
GoalsGetters and Setters; Magic Methods; Adding Introspection; Transparent Getters/Setters; Questions; Answers; Exercises; CHAPTER 4 Configuration; Goals; Associative Arrays; INI Files; Questions; Answers; Exercises; CHAPTER 5 Caching; Goals; Performance Bottlenecks; The Code; Questions; Answers; Exercises; CHAPTER 6 Registry; Goals; Singleton; Registry; Questions; Answers; Exercises; CHAPTER 7 Routing; Goals; Defining Routes; Route Classes; Router Class; Questions; Answers; Exercises; CHAPTER 8 Templates; Goals; Idea; Alternatives; Implementation; Benefits; Questions; Answers; Exercises
CHAPTER 9 DatabasesGoals; Implementation; Connectors; Queries; Questions; Answers; Exercises; CHAPTER 10 Models; Goals; Idea; Implementation; Building the SQL; Modifying Records; No Relation of Mine!; Questions; Answers; Exercises; CHAPTER 11 Testing; Goals; Unit Testing; Test Class; Cache; Coverage; Tests; Configuration; Coverage; Tests; Database; Coverage; Tests; Model; Coverage; Tests; Template; Coverage; Tests; Holy Code, Batman!; Questions; Answers; Exercises; CHAPTER 12 Structure; Goals; Database; Folders; Questions; Answers; CHAPTER 13 Bootstrapping; Goals; When a File Is Not a File...
URL RewritingIndex.php; Configuration; Database; Cache; Controller; Views; Rendering; Questions; Answers; Exercises; CHAPTER 14 Registration and Login; Goals; Shared Libraries; User Model; Registration; Sessions; Login; Questions; Answers; Exercises; CHAPTER 15 Search; Goals; Extended Implementation; URL Requests; Search; Questions; Answers; Exercises; CHAPTER 16 Settings; Goals; Validation; Validate As Required; Settings; Questions; Answers; Exercises; CHAPTER 17 Sharing; Goals; Error Pages; Friends; Sharing; Questions; Answers; Exercises; CHAPTER 18 Photos; Goals; How to Upload Files
User PhotosShowing Off, a Little; Questions; Answers; Exercises; CHAPTER 19 Extending; Goals; Foxy; Custom CSS Fonts; Building the Proxy; Using the Proxy; Imagine; Observer; Synchronicity; Code; Events; Plugins; Questions; Answers; Exercises; CHAPTER 20 Administration; Goals; What Is a CMS?; Administrators; Login; Users; Photos; Questions; Answers; Exercises; CHAPTER 21 Testing; Goals; Questions; Answers; Exercises; CHAPTER 22 CodeIgniter: Bootstrapping; Goals; Why CodeIgniter?; Why Not CodeIgniter?; URL Rewriting; Routes; Questions; Answers; Exercises; CHAPTER 23 CodeIgniter: MVC; Goals
Differences
Includes index.
Model View Controller (MVC) is becoming the definitive architecture of website development frameworks due to the stability, extensibility and predictability it lends to development. It is not just the primary separation of database, business logic and interface components, but includes a wide range of considerations for building high-performing, scalable and secure applications. Deciding which MVC framework best suits the project you are about to begin is one of the biggest challenges you'll face as a developer. If you are part of a team, this decision has probably already been made for you; but in any event, you'll need to know how (and why) the framework authors made it work the way it does. Pro PHP MVC looks at the building blocks that make any good MVC framework, and how they apply to PHP. It exposes all considerations that many developers take for granted when using a popular framework, and teaches you how to make the framework your own.  Over the course of reading this book, you will learn the theoretical implications of the choices you would make when writing your own MVC framework, and how to put the pieces together in a cohesive package. We take a look at the highly modular Zend Framework—how to use its collection of loosely coupled classes to build a unified system. We also look at CakePHP, learning from its automated build system (Bakery) and highly intuitive approach to rapid development. This book will lay bare all the secret parts of MVC for you.
Computer programming.
Software engineering.
Web Development.
Software Engineering/Programming and Operating Systems.