Table of Contents
Preface
Chapter 1: Creating a Basic MVC Application
Chapter 2: The Zend Framework MVC Architecture
Chapter 3: Storefront Basic Setup
Chapter 4: Storefront Models
Chapter 5: Implementing the Catalog
Chapter 6: Implementing User Accounts
Chapter 7: The Shopping Cart
Chapter 8: Authentication and Authorization
Chapter 9: The Administration Area
Chapter 10: Storefront Roundup
Chapter 11: Storefront Optimization
Chapter 12: Testing the Storefront
Appendix: Installing Supporting Software
Index
- Chapter 1: Creating a Basic MVC Application
- Overview of MVC architecture
- Setting up the environment
- Installation
- Creating the project structure
- Application directory structure
- Bootstrapping
- The index file
- Application configuration
- The bootstrap file
- Your first controller
- The Action Controller
- Subclassing
- Initialization
- Actions
- The standard router
- Utility methods
- Action Helpers
- The Action Controller
- Your first view
- View directories
- Creating a view
- View Helpers
- URL View Helper
- View customization
- Handling errors
- Summary
- Chapter 2: The Zend Framework MVC Architecture
- Zend framework MVC overview
- What is a request
- Request handling
- Abstractness of MVC components
- The Front Controller
- Design
- Defaults
- Using the Front Controller
- Invocation parameters
- Options
- Modules, controllers, and actions
- MVC component customization
- Plugins
- The router
- Design
- Defaults
- Using the router
- Zend_Controller_Router_Route
- Zend_Controller_Router_Route_Static
- Zend_Controller_Router_Route_Regex
- Zend_Controller_Router_Route_Hostname
- Zend_Controller_Router_Route_Chain
- Zend_Config
- The Dispatcher
- Design
- Request dispatching
- Using the Dispatcher
- The Request object
- Design
- Defaults
- Using the Request object
- The HTTP Request object
- The Response object
- Design
- Defaults
- Using the Response object
- Summary
- Zend framework MVC overview
- Chapter 3: Storefront Basic Setup
- Getting started
- Software requirements
- Coding standards
- The Storefront requirements
- The Storefront overview
- Basic structure and setup
- The directory structure
- Bootstrapping with Zend_Application
- Zend_Application basics
- Bootstrapping the storefront
- Zend_Application configuration
- The bootstrap class
- Creating the bootstrap resources
- Bootstrapping complete
- The basic layout
- A little task for you
- Building the Storefront
- The Storefront database
- Database installation
- Product table
- ProductImage table
- Category table
- The user table
- Introducing Zend_Db
- Adding Zend_Db to the Storefront
- Database installation
- Logging and debugging
- Zend_Debug
- Zend_Log
- Adding Zend_Log to the Storefront
- Using the logger
- Database profiling with Zend_Log
- Summary
- Getting started
- Chapter 4: Storefront Models
- Models in the Zend Framework
- Model design
- The application stack
- Fat Model Skinny Controller
- Fat Controller
- Fat Model
- Model design strategies
- Direct inheritance
- Has-a relationship (composition)
- Domain Model
- Further reading
- Storefront Models
- Model Resources
- Managing Model Resources
- Model Resource data sources
- Model Resource Items
- Resource Item business logic
- Loading Models and Resources
- Zend_Loader_Autoloader_Resource
- Resource Autoloading
- Zend_Loader_Autoloader_Resource
- The SF Library
- Summary
- Chapter 5: Implementing the Catalog
- Getting started
- Creating the Catalog Model and Resources
- Catalog model skeleton
- Naming conventions
- Catalog methods
- Catalog Model Resources
- Zend_Db_Table
- Model Resource Items
- Implementing the Catalog Model
- Model Resource interfaces
- Model Resource implementation
- Catalog Model
- Catalog model skeleton
- Loading Models and other assets
- Configuring the Autoloader
- The Zend_Db_Table bug
- Creating the Catalog Controllers
- CategoryController
- Action Stack Front Controller Plugin
- CatalogController
- Storefront routes
- CategoryController
- Creating the Catalog Views
- Category views
- Catalog views
- Catalog View Helpers
- View Helper creation
- Creating the Catalog View Helpers
- Building and running the storefront
- Summary
- Chapter 6: Implementing User Accounts
- Creating the user model and resources
- User model
- User Model Resources
- Creating the Customer Controller
- Zend_Form
- Basic forms
- What is a Form?
- Creating a Form
- Customizing Zend_Form's output
- The Decorator pattern
- Zend_Form's Decorators
- Fixing the login forms HTML
- The User forms
- A Typical Form element
- Custom validators
- Base form decorators
- Specializing forms
- Basic forms
- Creating the Customer Views
- Building the application
- Summary
- Creating the user model and resources
- Chapter 7: The Shopping Cart
- Creating the Cart Model and Resources
- Cart Model
- Cart Model interfaces
- Cart Model implementation
- Cart Model Resources
- Shipping Model
- Cart Model
- Creating the Cart Controller
- Creating the Cart Views and Forms
- Cart forms
- Add form
- Table form
- SF_Form_Abstract
- Cart View Helper
- Cart View scripts
- Cart view.phtml
- Cart _cart.phtml
- Layout main.phtml
- Catalog index.phtml
- Catalog view.phtml
- Cart forms
- Summary
- Creating the Cart Model and Resources
- Chapter 8: Authentication and Authorization
- Authentication versus Authorization
- Authentication with Zend_Auth
- Zend_Auth
- Authentication adapters
- Authentication results
- Identity persistence
- Authentication Service
- Customer Controller
- Authentication View Helper
- Other Authentication Service elements
- Zend_Auth
- Authorization with Zend_Acl
- Zend_Acl introduction
- ACL in MVC
- Using a centralized global ACL
- Using module specific ACL's
- ACL in the Domain layer
- Model based ACL
- The Storefront ACL
- The Storefront roles
- The Storefront resources
- The new base model
- Securing the User Model
- Non-Model ACL
- Unit testing with ACL
- Summary
- Chapter 9: The Administration Area
- What is an administration area?
- Implementation options
- Implementing the storefront administration area
- Admin Route
- Admin context Front Controller plugin
- Admin layout
- Admin controller
- Catalog management
- Adding products
- Product add form
- Catalog Model
- Catalog Controller
- Adding products
- Securing the administration area
- ACL action helper
- Securing the Admin functions
- Catalog Model ACL
- ACL action helper
- Summary
- What is an administration area?
- Chapter 10: Storefront Roundup
- Using multiple modules
- Setup
- Configuring Zend_Application
- Bootstrapping modules
- Module specific configuration
- Sharing common elements
- Services
- Services for cross module communication
- Services for extending model behavior
- Summary
- Using multiple modules
- Chapter 11: Storefront Optimization
- General optimizations
- Opcode caching
- Path optimizations
- Requires and includes
- Standard caches
- Plugin loader cache
- Db table cache
- Dispatching optimizations
- Caching
- Zend_Cache
- Model data caching
- Basic class caching
- Model cache integration
- Summary
- General optimizations
- Chapter 12: Testing the Storefront
- What is testing?
- PHPUnit and Zend_Test setup
- PHPUnit setup
- Zend_Test setup
- Handling the database
- Writing tests
- Running tests
- Adding tests to the build
- Running tests
- Testing the Customer Controller
- Running the Customer Controller test
- Common problems
- Summary
- Appendix: Installing Supporting Software
- Installing PHPUnit
- Installing Xdebug
- Windows installation
- Linux based installation
- OSX Installation
- Configuration
- Installing Apache Ant
- Windows installation
- Linux installation


