Zend Framework 1.8 Web Application Development


Zend Framework 1.8 Web Application Development
eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
$20.39
save 15%!
Print + free eBook + free PacktLib access to the book: $63.98    Print cover: $39.99
$39.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters
  • Create powerful web applications by leveraging the power of this Model-View-Controller-based framework
  • Learn by doing – create a "real-life" storefront application
  • Covers access control, performance optimization, and testing
  • Best practices, as well as debugging and designing discussion

Book Details

Language : English
Paperback : 380 pages [ 235mm x 191mm ]
Release Date : September 2009
ISBN : 1847194222
ISBN 13 : 9781847194220
Author(s) : Keith Pope
Topics and Technologies : All Books, Web Development, Open Source, PHP, Web Development

Back to BOOK PAGE

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
    • 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
  • 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
    • Logging and debugging
      • Zend_Debug
      • Zend_Log
        • Adding Zend_Log to the Storefront
        • Using the logger
        • Database profiling with Zend_Log
    • Summary
  • 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
    • 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
    • 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
    • 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
    • Creating the Customer Views
    • Building the application
    • Summary
  • Chapter 7: The Shopping Cart
    • Creating the Cart Model and Resources
      • Cart Model
        • Cart Model interfaces
        • Cart Model implementation
      • Cart Model Resources
      • Shipping 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
    • Summary
  • 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
    • 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
    • Securing the administration area
      • ACL action helper
        • Securing the Admin functions
      • Catalog Model ACL
    • Summary
  • 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
  • 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
  • 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
    • 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
Back to BOOK PAGE

Keith Pope

Keith Pope has over ten years of experience in web-related industries and has had a keen interest in programming from an early age. Keith currently works in the airline industry as a technical project manager, providing entertainment systems
for aircraft.

He has been working with the Zend Framework since its first preview release, using it in many of his work and personal projects.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


Errata

- 10 submitted: last submission 02 Apr 2013

Errata type: Typo | Page number: 2 |

As of this writing, the current version is 1.5.3 and the core components are at a mature stable state.
It should be:
As of this writing, the current version is 1.8 and the core components are at a mature stable state.

 

Errata type: Code | Page number: 37 |

For the code on page 37 to work add the following line in application.ini resources.view = ""

 

Errata type: typo | Page number: 139 |

However, in our case we have namespaced our classes with the prefix Strorefront_Resource...
should be:
However, in our case we have namespaced our classes with the prefix Storefront_Resource...

 

Errata type: Code | Page number: 141 |

1) class Storefront_Resource_Product extends Zend_Db_Table_Abstract should be: class Storefront_Resource_Product extends SF_Model_Resource_Db_Table_Abstract
2) class Storefront_Resource_ProductImage extends Zend_Db_Table_Abstract should be: class Storefront_Resource_ProductImage extends SF_Model_Resource_Db_Table_Abstract
3) class Storefront_Resource_Category extends Zend_Db_Table_Abstract should be: class Storefront_Resource_Category extends SF_Model_Resource_Db_Table_Abstract

 

Errata type: Code | Page number: 145 |

1) class Storefront_Resource_Category extends Zend_Db_Table_Abstract should be: class Storefront_Resource_Category extends SF_Model_Resource_Db_Table_Abstract
2) class Storefront_Resource_Product extends Zend_Db_Table_Abstract should be: class Storefront_Resource_Product extends SF_Model_Resource_Db_Table_Abstract
3) class Storefront_Resource_ProductImage extends Zend_Db_Table_Abstract should be: class Storefront_Resource_ProductImage extends SF_Model_Resource_Db_Table_Abstract

 

Errata type: Code | Page number: 173 |

application/modules/storefront/views/scripts/category/index.phtml
should be:
application/modules/storefront/views/scripts/catalog/index.phtml

 

Errata type: Code | Page number: 214 |

class Storefront_Form_User_Edit extends Storefront_Form_User_Register
should be:
class Storefront_Form_User_Edit extends Storefront_Form_User_Base

 

Errata type: Typo| Page number: 174 |

application/modules/storefront/views/scripts/category/view.phtml should be: application/modules/storefront/views/scripts/catalog/view.phtml

Errata type: Typo| Page number: 215 |

"You should be able to register at /register" should be "You should be able to register at /customer/register"

Errata type: Typo | Page number: 247

"They are database adapter, database table, table name, identity column and credential treatment." should be "They are database adapter, table name, identity column, credential column and credential treatment."

 

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Zend Framework 1.8 Web Application Development +    IBM WebSphere Application Server 8.0 Administration Guide =
50% Off
the second eBook
Price for both: $42.60

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Explore the features of Zend Framework's MVC architecture
  • Learn about designing and implementing an MVC application
  • Avoid common mistakes made when first learning an MVC framework
  • Test your applications with the popular PHPUnit framework
  • Interact with a database using Zend_Db and Zend_Db_Table
  • Secure your application using Zend_Acl and Zend_Auth
  • Optimize your application using caching and other performance tips
  • Add administrative functionality to your applications

In Detail

The Zend Framework has a flexible architecture that lets you build modern web applications and web services easily. The MVC components make the maintenance and testing of your applications easier. However, it is not only an MVC framework for developers. It also provides an easy-to-use high-quality component library that is designed to be used the way you want, picking up specific components without requiring the use of whole framework.

It's easy to get started and produce a powerful and professional looking web site when you've got this book to hand. Taking you through a real-life application, it covers the major Zend Framework components, as well as throwing light on the best practices and design issues faced when building complex MVC applications.

This book takes you through detailed examples as well as covering the foundations you will need to get the most out of the Zend Framework. From humble beginnings you will progress through the book and slowly build upon what you have learned previously. By the end, you should have a good understanding of the Zend Framework, its components, and the issues involved in implementing a Zend Framework based application.

Create a real-life storefront application from design to deployment and explore all the major aspects of the Zend Framework

Approach

This book is an example-driven tutorial that takes you through the process of building Model-View-Controller-based web applications. You will create and develop a storefront application. It also covers common mistakes and best practices that will be helpful for developers.

Who this book is for

This book is for PHP web developers who want to get started with Zend Framework. If you are already using this framework, you will learn how to use it in the best way and produce better applications.

Basic knowledge of Object Oriented design will be helpful.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software