1. Trang chủ
  2. » Công Nghệ Thông Tin

zend framework 1 8 web application development

379 304 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 379
Dung lượng 3,84 MB

Nội dung

Zend Framework 1.8 Web Application Development Design, develop, and deploy feature-rich PHP web applications with this MVC framework Keith Pope BIRMINGHAM - MUMBAI This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009 6352 108th St, , Forest Hills, , 11375 Zend Framework 1.8 Web Application Development Copyright © 2009 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: September 2009 Production Reference: 1160909 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-847194-22-0 www.packtpub.com Cover Image by Vinayak Chittar (vinayak.chittar@gmail.com) This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009 6352 108th St, , Forest Hills, , 11375 Download at WoweBook.Com Credits Author Keith Pope Reviewers Wenbert Del Rosario Md. Mahmud Ahsan Acquisition Editor Rashmi Phadnis Development Editor Ved Prakash Jha Technical Editor Pallavi Kachare Copy Editor Leonard D'Silva Indexer Hemangini Bari Editorial Team Leader Akshara Aware Project Team Leader Lata Basantani Project Coordinator Rajashree Hamine Proofreader Lynda Sliwosk Jeff Orloff Graphics Nilesh Mohite Production Coordinator Shantanu Zagade Cover Work Shantanu Zagade This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009 6352 108th St, , Forest Hills, , 11375 Download at WoweBook.Com About the Author 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 rst preview release, using it in many of his work and personal projects. I would like to thank my wife; without her support and patience, this book would not have been possible. I would also like to thank Matthew Weier O'Phinney who has been instrumental in the success of the Zend Framework project as well as giving lots of time to the mailing lists, answering both mine and others questions. The rest of the Zend team for all their hard work while creating a great framework that I could write about. Rob Allen and Alex Mace for general help and support. The technical reviewers and the team at Packt for their hard work in getting everything together. Derek Au for his bug reports. Big thanks to my family, the Adkins family, Phil Dunsford, Martin Williams, Tom Hoddell, Sally Hoddell, the Allpay team, Francesca Oliveri, Lucy Hughes-Martin, and Rob Whittle; you all supported me in various ways. This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009 6352 108th St, , Forest Hills, , 11375 Download at WoweBook.Com About the Reviewers Wenbert Del Rosario is from Cebu, Philippines. He started his career as a web developer in college, learning PHP and Adobe Photoshop. He works with open source technologies—Zend Framework, Code Igniter, MySQL, and jQuery are some of the tools he has under his sleeve. He likes to keep it simple and believes that being mindful of best practices in software development can be more effective than adopting every latest technology. In his free time, he loves to work on personal projects using PHP, Javascript, and MySQL. He also does some freelance jobs and consulting from time to time. All in all, he is very passionate about what he does and is a big fan of open source software. Wenbert has worked for Lexmark Research and Development Corporation in Cebu. He develops in-house web-based applications using Apache, PHP, MySQL, and Linux. Some of his web applications are used in different geographc regions (USA, Europe, and Asia Pacic) by Lexmark employees, while other small but signicant ones are used locally by Lexmark Cebu employees. I would like to thank my family. My mother, Wenia, who is always very supportive and understanding. My brothers, Andrew, John, and Alberto. And my sister Jonina Mae. To my father, Luis, who passed away a few years ago and to God. This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009 6352 108th St, , Forest Hills, , 11375 Download at WoweBook.Com Md. Mahmud Ahsan is a freelance consultant currently working as a software engineer in Berkeley-based i2we, inc. Mahmud received a Bachelor's degree in Computer Science and Engineering from the International Islamic University Chittagong, in Bangladesh. He is also a Zend Certied Engineer. He has about four years of experience in the world of PHP. He has extensively worked on small and large scale social networking web applications developed in PHP and Zend Framework. I'm grateful to my parents and Hasin Hayder (author at Packt Publishing). I would also like to thank my wife Jinat Jahan for her consistent support. This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009 6352 108th St, , Forest Hills, , 11375 Download at WoweBook.Com This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009 6352 108th St, , Forest Hills, , 11375 Download at WoweBook.Com This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009 6352 108th St, , Forest Hills, , 11375 Download at WoweBook.Com I would like to dedicate this book to my wife, Michelle This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009 6352 108th St, , Forest Hills, , 11375 Download at WoweBook.Com This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009 6352 108th St, , Forest Hills, , 11375 Download at WoweBook.Com [...]... installation 10 2 10 4 10 4 Introducing Zend_ Db 10 7 Logging and debugging Zend_ Debug Zend_ Log 10 8 10 9 10 9 Summary 11 4 Product table ProductImage table Category table The user table 10 5 10 6 10 6 10 7 Adding Zend_ Db to the Storefront 10 8 Adding Zend_ Log to the Storefront Using the logger Database profiling with Zend_ Log 10 9 11 1 11 3 Chapter 4: Storefront Models 11 5 Models in the Zend Framework Model design The application. .. Summary 18 0 18 2 Zend_ Db_Table Model Resource Items 13 8 14 0 Model Resource interfaces Model Resource implementation 14 3 14 6 Action Stack Front Controller Plugin 16 4 View Helper creation Creating the Catalog View Helpers Chapter 6: Implementing User Accounts Creating the user model and resources User model User Model Resources Creating the Customer Controller Zend_ Form 17 6 17 7 18 3 18 3 18 4 18 8 19 0 19 4 [... design The application stack Fat Model Skinny Controller 11 5 11 6 11 6 11 7 Fat Controller Fat Model 11 7 11 8 Model design strategies 12 0 Direct inheritance Has-a relationship (composition) Domain Model 12 0 12 2 12 3 Further reading Storefront Models Model Resources Managing Model Resources Model Resource data sources 12 4 12 5 12 5 12 6 12 6 [ iii ] Download at WoweBook.Com This material is copyright and is licensed... Chapter 1: Creating a Basic MVC Application 1 9 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 10 10 11 11 13 14 14 16 17 18 19 Your first view View directories Creating a view View Helpers 30 31 31 35... Forest Hills, , 11 375 Table of Contents 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 83 83 84 85 85 86 88 94 96 10 0 10 0 A little task for you 10 2 Building the... Controller 267 267 267 2 68 269 270 2 71 273 273 274 275 280 2 81 Securing the administration area ACL action helper 282 283 Catalog Model ACL Summary 286 288 Securing the Admin functions 286 Chapter 10 : Storefront Roundup 289 Using multiple modules Setup Configuring Zend_ Application Bootstrapping modules Module specific configuration 289 289 290 290 293 [ vi ] Download at WoweBook.Com This material is... realpath (APPLICATION_ PATH '/ /library'), get_include_path(), ))); [ 14 ] Download at WoweBook.Com This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009 6352 10 8th St, , Forest Hills, , 11 375 Chapter 1 /** Zend_ Application */ require_once 'Zend/ Application. php'; // Create application, bootstrap, and run $application = new Zend_ Application( APPLICATION_ENV, APPLICATION_ PATH... 13 3 13 3 13 4 13 4 13 5 13 6 Catalog Model Resources 13 7 Implementing the Catalog Model 14 3 Catalog Model Loading Models and other assets Configuring the Autoloader The Zend_ Db_Table bug Creating the Catalog Controllers CategoryController 15 6 16 0 16 0 16 2 16 3 16 3 CatalogController Storefront routes Creating the Catalog Views Category views Catalog views Catalog View Helpers 16 7 17 0 17 2 17 2 17 3 17 5 Building... 6352 10 8th St, , Forest Hills, , 11 375 Table of Contents Model Resource Items Resource Item business logic 12 7 12 7 Loading Models and Resources Zend_ Loader_Autoloader_Resource 12 9 12 9 The SF Library Summary 13 1 13 2 Resource Autoloading Chapter 5: Implementing the Catalog Getting started Creating the Catalog Model and Resources Catalog model skeleton Naming conventions Catalog methods 12 9 13 3 13 3 13 4 13 4... 19 0 19 4 [ iv ] Download at WoweBook.Com This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009 6352 10 8th St, , Forest Hills, , 11 375 Table of Contents Basic forms 19 4 Customizing Zend_ Form's output 19 8 The User forms 204 What is a Form? Creating a Form 19 5 19 6 The Decorator pattern Zend_ Form's Decorators Fixing the login forms HTML 19 8 200 202 A Typical Form element

Ngày đăng: 23/06/2014, 13:01

TỪ KHÓA LIÊN QUAN

w