Learn to master the secrets of the Zend Framework with this new book from php|architect's popular Nanobook series! Written by Zend DevZone editor and well-known PHP expert Cal Evans, php|architect's Guide to Programming with Zend Framework helps you understand the Zend Framework through a detailed roadmap into its features and functionality. This book covers much of the primary functionality offered by the Zend Framework, and works well both as a thorough introduction to its use and as a reference for higher-level tasks. The table of contents includes: - Getting started - The Model - The Controller - The View - Data access - Web services - Authorizations - Exceptions and error management - Rich Internet Applications - Hacking the framework: secret classes and advanced functionality - Framework internals - Tips & tricks - The new Zend_Layout classes With a rich, example-driven style and the trademark no-fluff approach to professional content, php|architect's Guide to Programming with the Zend Framework belongs in your book collection! Contents......Page 8 Foreword......Page 14 Which Framework is Right for Me?......Page 16 MVC in a Nutshell......Page 17 A Brief History of Zend Framework......Page 19 What You Need To Go From Here......Page 20 Summary......Page 22 Building Your First App......Page 24 Step 1: Download a copy of Zend Framework......Page 25 Step 2: Create Your Directory Structure......Page 26 Step 3: Create Your Bootstrap File......Page 27 Step 4: Create Your .htaccess File......Page 30 Step 5: Create Your Controller......Page 31 Summary......Page 32 Laying the Groundwork for a Sample Application......Page 36 Creating a Sample Application......Page 37 BaseController......Page 45 Helpers and Plugins......Page 50 Placing the Helper......Page 51 Using the Helper......Page 52 Summary......Page 53 No Model......Page 56 Creating and Connecting to the Database......Page 57 The Member Class-Registering New Members......Page 59 Allowing Members to Login......Page 67 Summary......Page 70 Instantiating the View and Rendering Output......Page 74 View Script......Page 75 View Helpers......Page 76 Summary......Page 84 Connecting to the Database......Page 88 Fetching Data......Page 91 fetchAll()......Page 92 fetchCol()......Page 94 fetchRow()......Page 95 Profiler......Page 96 Summary......Page 99 Authentication......Page 102 About Zend_Auth......Page 103 Using Zend_Auth......Page 104 Summary......Page 110 Super Secret Ninja Class: Globals.php......Page 114 Setting Up Globals.php......Page 115 Using Globals.php with Zend_Cache......Page 118 Storing Global Configuration Values......Page 128 Summary......Page 133 Introduction to Flickr's API......Page 136 Integrating Yahoo! and Flickr APIs......Page 138 Creating Your Own Web Service......Page 143 Summary......Page 149 Exceptions: A Primer......Page 152 Summary......Page 166 Rich Internet Applications......Page 170 Making our Sample App Into an RIA......Page 171 Summary......Page 179 Cleaning Your Cache Through CLI......Page 182 Setting up the Bootstrap......Page 185 Creating a New Bootstrap......Page 188 ProcessController.php......Page 191 Summary......Page 194 Appendix A - Zend_Layout and doing the Two-Step......Page 196 Index......Page 214 Contents 8 Foreword 14 What makes the Frame-work 16 Why Use a Framework? 16 Which Framework is Right for Me? 16 Why Zend Framework 17 MVC in a Nutshell 17 Introducing Zend Framework 19 A Brief History of Zend Framework 19 The Zend Framework Community 20 The Zend Framework License and Intellectual Property Concerns 20 What You Need To Go From Here 20 Summary 22 Getting Started 24 Building Your First App 24 Step 1: Download a copy of Zend Framework 25 Step 2: Create Your Directory Structure 26 Step 3: Create Your Bootstrap File 27 Step 4: Create Your .htaccess File 30 Step 5: Create Your Controller 31 Step 6: Fire Up a Browser and Revel In Your Handiwork 32 Summary 32 The Controller 36 Laying the Groundwork for a Sample Application 36 Creating a Sample Application 37 BaseController 45 Helpers and Plugins 50 Placing the Helper 51 Using the Helper 52 Summary 53 The Model 56 Types of Model Implementation 56 No Model 56 Light Model 57 Heavy Model 57 Adding Registration & Login 57 Creating and Connecting to the Database 57 The Member Class-Registering New Members 59 Allowing Members to Login 67 Summary 70 The View 74 Instantiating the View and Rendering Output 74 View Script 75 Escaping Output 76 View Helpers 76 Summary 84 Data Access 88 Connecting to the Database 88 Fetching Data 91 fetchAll() 92 fetchAssoc() 94 fetchCol() 94 fetchPairs() 95 fetchRow() 95 fetchOne() 96 Profiler 96 Summary 99 Authentication 102 About Zend_Auth 103 Using Zend_Auth 104 Summary 110 Super Secret Ninja Class: Globals.php 114 Setting Up Globals.php 115 Using Globals.php with Zend_Cache 118 Storing Global Configuration Values 128 Summary 133 Web Services 136 Introduction to Flickr's API 136 Integrating Yahoo! and Flickr APIs 138 Creating Your Own Web Service 143 Summary 149 Exceptions 152 Exceptions: A Primer 152 Summary 166 Rich Internet Applications 170 Making our Sample App Into an RIA 171 Summary 179 Zend Framework Party Tricks 182 Cleaning Your Cache Through CLI 182 Setting up the Bootstrap 185 Creating a New Bootstrap 188 ProcessController.php 191 Summary 194 Appendix A - Zend_Layout and doing the Two-Step 196 Index 214
Learn to master the secrets of the Zend Framework with this new book from php|architect's popular Nanobook series! Written by Zend DevZone editor and well-known PHP expert Cal Evans, php|architect's Guide to Programming with Zend Framework helps you understand the Zend Framework through a detailed roadmap into its features and functionality.
This book covers much of the primary functionality offered by the Zend Framework, and works well both as a thorough introduction to its use and as a reference for higher-level tasks. The table of contents includes:
- Getting started
- The Model
- The Controller
- The View
- Data access
- Web services
- Authorizations
- Exceptions and error management
- Rich Internet Applications
- Hacking the framework: secret classes and advanced functionality
- Framework internals
- Tips & tricks
- The new Zend_Layout classes
With a rich, example-driven style and the trademark no-fluff approach to professional content, php|architect's Guide to Programming with the Zend Framework belongs in your book collection!