Home Page Icon
Home Page
Table of Contents for
About the Author
Close
About the Author
by Forrest Lyman
Pro Zend Framework Techniques: Build a Full CMS Project
Copyright
Preface
About the Author
About the Technical Reviewers
Acknowledgments
Introduction
Who This Book Is For
Prerequisites
1. Getting Started
1.1. Introducing Zend Framework MVC Implementation
1.1.1. The Controller: Zend_Controller_Front
1.1.2. The Model: Zend_Db
1.1.3. The View: Zend_View
1.2. Setting Up Your Development Environment
1.2.1. Installing Zend Server CE
1.2.2. Doing Rapid Application Development with the Zend Command-Line Tool
1.3. Creating Your Project
1.3.1. Building a Project with the Zend Tool Framework
1.3.2. Testing Your New Project
1.4. Exploring the Anatomy of Your Project
1.4.1. The public Folder
1.4.1.1. Redirecting the Request with .htaccess
1.4.1.2. The Index File
1.4.1.3. Additional Public Folders
1.4.2. The library Folder
1.4.3. The application Folder
1.4.3.1. Zend_Application
1.4.3.2. The Bootstrap Class
1.4.3.3. Application Configuration
1.4.3.4. Action Controllers
1.4.3.5. Views
1.4.3.6. Error Handling
1.5. Summary
2. Designing Your Site
2.1. Rendering the Presentation Layer with Zend_View
2.1.1. View Scripts
2.1.2. View Helpers
2.2. Rendering the Presentation Layer with Zend_Layout
2.2.1. Using Zend_Layout on Its Own
2.2.2. Zend_Layout MVC
2.3. Three-Step Views
2.4. Designing the Interface
2.4.1. Organizing the Interface Components
2.4.2. Mocking It Up
2.4.3. Creating the Base HTML Page
2.4.4. Testing Your Design
2.5. Creating the Layout
2.5.1. Creating the Layout
2.5.2. Adding the Dynamic Head with Zend_View's Placeholders
2.5.3. Adding the Dynamic Content to Your Layout
2.5.4. Rendering the Controller Response with Zend_Layout
2.5.5. Configuring Your Application to Use the Layout
2.5.6. Testing Your New Layout
2.6. Implementing the Skin
2.6.1. What Goes in a Skin?
2.6.2. Creating the Blues Skin
2.6.2.1. The skin.xml File
2.6.2.2. The Style Sheets
2.6.3. Building a View Helper to Render the Skin
2.6.4. Using the loadSkin Helper
2.6.5. Testing the Skin
2.7. Summary
3. Building and Processing Web Forms with Zend_Form
3.1. The Anatomy of a Zend Framework Form
3.1.1. Rendering Forms
3.1.2. Processing a Form
3.2. Form Elements
3.2.1. Initial Elements
3.2.1.1. Zend_Form_Element_Button
3.2.1.2. Zend_Form_Element_Captcha
3.2.1.3. Zend_Form_Element_Checkbox
3.2.1.4. Zend_Form_Element_File
3.2.1.5. Zend_Form_Element_Hidden
3.2.1.6. Zend_Form_Element_Hash
3.2.1.7. Zend_Form_Element_Image
3.2.1.8. Zend_Form_Element_MultiCheckbox
3.2.1.9. Zend_Form_Element_Multiselect
3.2.1.10. Zend_Form_Element_Password
3.2.1.11. Zend_Form_Element_Radio
3.2.1.12. Zend_Form_Element_Reset
3.2.1.13. Zend_Form_Element_Select
3.2.1.14. Zend_Form_Element_Submit
3.2.1.15. Zend_Form_Element_Text
3.2.1.16. Zend_Form_Element_Textarea
3.2.2. Custom Form Elements
3.3. Creating a Page Form
3.3.1. Getting Started
3.3.2. Creating the Form
3.3.3. Adding Controls to the Form
3.3.3.1. The Author Text Control
3.3.3.2. The E-mail Text Control
3.3.3.3. The Date Text Control
3.3.3.4. The URL Text Control
3.3.3.5. The Description Text Area Control
3.3.3.6. The Priority Select Control
3.3.3.7. The Status Select Control
3.3.3.8. The Submit Button
3.3.4. Rendering the Form
3.3.5. Processing the Form
3.3.6. Styling the Form
3.4. Summary
4. Managing Data with Zend Framework
4.1. Setting Up the Database
4.1.1. Creating the CMS Database
4.1.2. Configuring the Database Connection
4.1.3. Creating the bugs Table
4.2. Exploring the Zend Framework Models
4.2.1. Learning About the Models
4.2.2. Creating the Bug Model
4.3. Working with Bugs
4.3.1. Submitting a New Bug
4.3.1.1. Creating the createBug() Method
4.3.1.2. Updating the Bug Controller's Submit Action
4.3.2. Viewing All the Current Bugs
4.3.2.1. Creating the fetchBugs() Method
4.3.2.2. Adding the List Action to the Bug Controller
4.3.2.3. Creating the List View
4.3.3. Filtering and Sorting the Bug Reports
4.3.3.1. Updating the fetchBugs() Method
4.3.3.2. Creating the Form to Filter and Sort the Bugs
4.3.3.3. Loading and Rendering the Filter Form
4.3.3.4. Processing the Filters and Sort Criteria
4.3.4. Limiting and Paginating Bug Reports Using Zend_Paginator
4.3.4.1. Updating the fetchBugs() Method to Return a Zend_Paginator Adapter
4.3.4.2. Refactoring the Bug Controller listAction() to Load the Paginator
4.3.4.3. Rendering the Bug Reports Using the Paginator
4.3.5. Updating a Bug
4.3.5.1. Updating the Bug Report Form
4.3.5.2. Creating the Edit Action
4.3.5.3. Creating the Edit View
4.3.5.4. Updating the Bug Record
4.3.6. Deleting a Bug
4.3.6.1. Adding the Delete Method to the Bug Model
4.3.6.2. Creating the Bug Controller Delete Action
4.4. Summary
5. Working with CMS Data
5.1. Exploring the Data Structure
5.1.1. Traditional CMS Data Structures
5.1.2. Abstract Data Structures
5.2. Designing a Database That Can Grow with Your System
5.3. Implementing the Data Management System
5.4. Managing Content Nodes
5.4.1. Creating the content_nodes Table
5.4.2. Creating the ContentNode Model Class
5.4.2.1. Creating and Updating Content Nodes
5.4.2.2. Deleting Nodes
5.5. Managing Pages
5.5.1. Creating the pages Table
5.5.2. Creating the Page Model Class
5.5.2.1. Creating Pages
5.5.2.2. Updating Existing Pages
5.5.2.3. Deleting a Page
5.6. Defining and Working with Table Relationships
5.6.1. Defining the Relationships
5.6.1.1. The ContentNode to Page Relationship
5.6.1.2. The Page to Parent Page Relationship
5.6.2. Working with Related Items
5.6.3. Cascading Updates and Deletes
5.7. Working with Content Items
5.7.1. Using the Abstract CMS Content_Item Class
5.7.1.1. Creating the Base Class
5.7.1.2. Loading Pages
5.7.1.3. Using Utility Methods
5.7.1.4. Manipulating Data
5.7.2. Extending the Base Content Item Class
5.8. Summary
6. Managing Content
6.1. Creating and Updating Content Pages
6.1.1. Creating the Page Content Item Class
6.1.2. Creating the Page Controller
6.1.3. Creating the Page Form
6.1.3.1. Rendering the Page Form
6.1.3.2. Inserting the New Page
6.1.4. Managing Pages
6.1.5. Editing an Existing Page
6.1.5.1. Opening a Page to Edit
6.1.5.2. Updating the Page
6.1.6. Deleting Pages
6.2. Rendering Pages
6.2.1. The Home Page
6.2.1.1. Rendering the Most Recent Pages
6.2.1.2. Setting This Page As Your Site's Home Page
6.2.2. Opening a Page
6.3. Summary
7. Creating the Site Navigation
7.1. How CMSs Manage Menus
7.2. Managing Menu Data
7.3. Creating the Menu Controllers
7.4. Creating a New Menu
7.4.1. Creating the Menu Form
7.4.2. Rendering the Create Menu Form
7.4.3. Processing the Form
7.5. Listing Current Menus
7.6. Updating a Menu
7.6.1. Opening the Menu to Edit
7.6.2. Updating the Menu
7.7. Deleting Menus
7.8. Managing Menu Items
7.8.1. Listing the Menu Items
7.8.2. Adding New Menu Items
7.8.2.1. The Menu Item Form
7.8.2.2. Creating the Add Menu Item Action
7.8.2.3. Rendering the Menu Item Form
7.8.2.4. Processing the Form
7.8.3. Sorting Menu Items
7.8.4. Updating Menu Items
7.8.4.1. Loading the Update Item Form
7.8.4.2. Rendering the Update Item Form
7.8.4.3. Processing the Update Item Form
7.8.5. Deleting Menu Items
7.9. Rendering Menus
7.10. Creating the Main Site Menus
7.10.1. Creating the Main Menus
7.10.2. Setting the Main Menu GUIDs
7.10.3. Rendering the Main Menus
7.10.4. Rendering the Admin Menu
7.11. Creating SEO-Friendly URLs
7.12. Summary
8. Handling Security in a Zend Framework Project
8.1. Managing CMS Users
8.1.1. User Data and Model
8.1.2. Creating a New User
8.1.2.1. Creating the User Controller
8.1.2.2. Creating the User Form
8.1.2.3. Rendering the Create User Form
8.1.2.4. Processing the Form
8.1.3. Managing Existing Users
8.1.4. Updating Users
8.1.5. Deleting Users
8.2. Authenticating Users with Zend_Auth
8.2.1. Creating the User Landing Page
8.2.2. Creating the User Login
8.2.3. Logging Users Out
8.2.4. Adding User Controls to the Main CMS Interface
8.3. Controlling Access with Zend_Acl
8.3.1. Using Zend_Acl
8.4. Securing Your CMS Project
8.5. Summary
9. Searching and Sharing Content
9.1. Working with the Lucene Search Engine
9.1.1. Creating a Search Index
9.1.2. Documents and Fields
9.2. Implementing Site Search
9.2.1. Securing Site Search
9.2.2. Creating the Search Index
9.2.2.1. The Build Action
9.2.2.2. The Build Search View
9.2.3. Searching the Site
9.2.3.1. The Search Form
9.2.3.2. Adding the Search Form to the Site
9.2.3.3. Processing a Search Request
9.2.3.4. Rendering Search Results
9.2.3.5. Testing Site Search
9.3. Working with Zend Feed
9.3.1. Creating the What's New Feed
9.3.2. Securing the Feeds
9.3.3. Building and Rendering the Feed
9.3.4. Adding the Feed to the Site
9.4. Web Services and Zend Framework
9.4.1. Working with Existing Services
9.4.2. Creating an API for your CMS with Zend REST
9.4.2.1. The Base Class
9.4.2.2. Securing the API
9.4.2.3. Searching Pages
9.4.2.4. Creating Pages
9.4.2.5. Updating Pages
9.4.2.6. Deleting Pages
9.4.3. Creating the API Server
9.4.4. Testing the API
9.4.4.1. Testing Searching
9.4.4.2. Testing Creating a Page
9.4.4.3. Updating the Page
9.4.4.4. Deleting the Page
9.5. Summary
10. Extending Your CMS
10.1. Creating the Module
10.2. Configuring Your Application to Load Modules
10.3. Rendering the Contact Form
10.4. Processing the Contact Form
10.5. Sending Mail with Zend_Mail
10.5.1. Creating the Mail Template
10.5.2. Rendering and Sending the HTML Message
10.5.3. The Confirmation Message
10.6. Securing the Form with Captcha
10.7. Using SMTP Mail Transport
10.8. File Attachments
10.8.1. Uploading the File
10.8.2. Attaching the File to Your Message
10.9. Summary
11. Advanced Topics
11.1. Performance Tuning
11.1.1. About Zend_Db_Profiler
11.1.2. Testing Your Application
11.1.2.1. Creating the Profiler View Script
11.1.2.2. Adding the Profiler Script to the Site
11.1.2.3. Optimizing the CMS_Content_Item_Page Class
11.2. Caching
11.2.1. Implementing Cache
11.2.1.1. Configuring the Cache
11.2.1.2. Creating the Cache Application Resource
11.2.2. Caching Menu Data
11.2.3. Updating the Cached Menus
11.2.4. Caching Content Items
11.3. Internationalization
11.3.1. Getting Started with Zend_Translate
11.3.2. Zend_Translate_Adapters
11.3.3. Integrating Zend_Translate with Your Project
11.4. Other Hidden Gems
11.5. Summary
12. Installing and Managing a Site with Your CMS
12.1. Creating the Database
12.2. Installing the Application
12.2.1. Alternate Installations
12.2.2. Sharing One Common Library
12.2.3. Configuring Your CMS
12.3. Managing Users
12.3.1. Creating a User
12.3.2. Updating a User
12.3.3. Deleting a User
12.4. Managing Content
12.4.1. Creating a Page
12.4.2. Updating a Page
12.4.3. Deleting a Page
12.5. Navigating Between Pages
12.5.1. Adding a Menu Item
12.5.2. Sorting Menu Items
12.5.3. Updating Menu Items
12.5.4. Deleting Menu Items
12.6. The Next Steps
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Preface
Next
Next Chapter
About the Technical Reviewers
About the Author
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset