ebook img

Zend Enterprise PHP Patterns PDF

282 Pages·2009·5.28 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Zend Enterprise PHP Patterns

CYAN YELLOW MAGENTA BLACK PANTONE 123 C BOOKS FOR PROFESSIONALS BY PROFESSIONALS® THE EXPERT’S VOICE® IN PHP Companion eBook Available Zend Enterprise PHP Patterns Z Dear Reader, e As the Senior Architect for Zend Global Services during the first three years of n the group’s existence, I had the opportunity to work with some of the largest PHP d applications on the planet and solve many interesting challenges around perfor- mance, security, and architecture. At the time there was little in the way of tools E or standards to accomplish these tasks, and the group often had to create the Author of solutions to our customers’ problems from scratch. The fruit of these efforts has n Zend Enterprise PHP 5 Unleashed largely been captured in this book—a compilation of techniques around perfor- t mance, architecture, security, and more taken directly from my experiences. e Thankfully, a lot has changed since 2004, and now extensive tools and tech- r niques exist to solve more effectively many of the issues we struggled with. From p powerful open source frameworks such as Zend Framework to the advanced r tools provided by Zend Studio for Eclipse and Zend Platform, it is now easier to i diagnose and address issues than it has ever been. That said, there are still many s PHP Patterns things that require the touch of a knowledgeable engineer, and it is my sincere e hope that you will find this book a useful insight into how these tools, with some key knowledge, can help you solve many of the common problems faced in P world-class PHP applications today. H The Web and its challenges are always going to be moving targets, changing nearly daily as technology evolves. The goal of this book is not only to teach you P the practical solutions for some of the common problems for today but also to give you insight that I hope will help you solve the problems of tomorrow. Enjoy! P a Regards, t t John Coggeshall e Performance, architecture, and analysis r of PHP applications n Companion eBook s THEAPRESS ROADMAP PHP Objects, Patterns, and Practice, Second Edition Beginning PHP 5 and Zend Enterprise See last page for details MySQL,Third Edition Pro PHP PHPPatterns on $10 eBook version PracticalWeb 2.0 Applications with PHP C o SOURCE CODE ONLINE g John Coggeshall g www.apress.com ISBN 978-1-4302-1974-3 e s www.zendenterprisephp.com 54699 h with Morgan Tocker a l l US $46.99 Foreword by Andi Gutmans, Shelve in Chief Executive Officer, Zend Technologies, Inc. PHP 9 781430 219743 User level: Intermediate–Advanced Advanced this print for content only—size & color not accurate spine = 0.625" 280 page count Download at WoWeBook.Com Zend Enterprise PHP Patterns John Coggeshall with Morgan Tocker Download at WoWeBook.Com Zend Enterprise PHP Patterns Copyright © 2009 by John Coggeshall All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-1974-3 ISBN-13 (electronic): 978-1-4302-1975-0 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Lead Editor: Matt Wade Technical Reviewer: Kevin Schroeder Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Tony Campbell, Gary Cornell, Jonathan Gennick, Jonathan Hassell, Michelle Lowman, Matthew Moodie, Jeffrey Pepper, Frank Pohlmann, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Project Managers: Sofia Marchant and Kylie Johnston Copy Editor: Hastings Hart Associate Production Director: Kari Brooks-Copony Production Editor: April Eddy Compositor: Lynn L’Heureux Proofreader: Liz Welch Indexer:BIM Indexing & Proofreading Services Artist: April Milne Cover Designer: Anna Ishchenko Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail (cid:107)(cid:110)(cid:96)(cid:97)(cid:110)(cid:111)(cid:41)(cid:106)(cid:117)(cid:60)(cid:111)(cid:108)(cid:110)(cid:101)(cid:106)(cid:99)(cid:97)(cid:110)(cid:41)(cid:111)(cid:94)(cid:105)(cid:42)(cid:95)(cid:107)(cid:105), or visit(cid:100)(cid:112)(cid:112)(cid:108)(cid:54)(cid:43)(cid:43)(cid:115)(cid:115)(cid:115)(cid:42)(cid:111)(cid:108)(cid:110)(cid:101)(cid:106)(cid:99)(cid:97)(cid:110)(cid:107)(cid:106)(cid:104)(cid:101)(cid:106)(cid:97)(cid:42)(cid:95)(cid:107)(cid:105). For information on translations, please contact Apress directly at 233 Spring Street, New York, NY 10013. E-mail(cid:101)(cid:106)(cid:98)(cid:107)(cid:60)(cid:93)(cid:108)(cid:110)(cid:97)(cid:111)(cid:111)(cid:42)(cid:95)(cid:107)(cid:105) or visit (cid:100)(cid:112)(cid:112)(cid:108)(cid:54)(cid:43)(cid:43)(cid:115)(cid:115)(cid:115)(cid:42)(cid:93)(cid:108)(cid:110)(cid:97)(cid:111)(cid:111)(cid:42)(cid:95)(cid:107)(cid:105). Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook Licensing web page at (cid:100)(cid:112)(cid:112)(cid:108)(cid:54)(cid:43)(cid:43)(cid:115)(cid:115)(cid:115)(cid:42)(cid:93)(cid:108)(cid:110)(cid:97)(cid:111)(cid:111)(cid:42)(cid:95)(cid:107)(cid:105)(cid:43)(cid:101)(cid:106)(cid:98)(cid:107)(cid:43)(cid:94)(cid:113)(cid:104)(cid:103)(cid:111)(cid:93)(cid:104)(cid:97)(cid:111). The information in this book is distributed on an “as is” basis, without warranty. Although every precau- tion has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indi- rectly by the information contained in this work. The source code for this book is available to readers at (cid:100)(cid:112)(cid:112)(cid:108)(cid:54)(cid:43)(cid:43)(cid:115)(cid:115)(cid:115)(cid:42)(cid:93)(cid:108)(cid:110)(cid:97)(cid:111)(cid:111)(cid:42)(cid:95)(cid:107)(cid:105). Download at WoWeBook.Com To my daughter, Diana Katheryn Coggeshall, who continues to be the single steadfast reason I have to do more and be more in my life John Coggeshall Download at WoWeBook.Com Download at WoWeBook.Com Contents at a Glance Foreword........................................................................xiii About the Authors................................................................. xv About the Technical Reviewer..................................................... xvii Acknowledgments................................................................xix Introduction......................................................................xxi CHAPTER1 Introduction to Zend Framework.................................1 CHAPTER2 Introduction to Zend Studio for Eclipse ..........................33 CHAPTER3 Web Application Performance and Analysis......................57 CHAPTER4 Data-Caching Strategies in PHP.................................71 CHAPTER5 Asynchronous Operations with PHP.............................93 CHAPTER6 Securing Your PHP Applications................................123 CHAPTER7 Monitoring Your Applications ..................................141 CHAPTER8 Web Services and Zend Framework............................167 CHAPTER9 Production Farms for PHP .....................................193 CHAPTER 10 The MySQL Database..........................................211 INDEX .......................................................................249 v Download at WoWeBook.Com Download at WoWeBook.Com Contents Foreword........................................................................xiii About the Authors................................................................. xv About the Technical Reviewer..................................................... xvii Acknowledgments................................................................xix Introduction......................................................................xxi CHAPTER1 Introduction to Zend Framework............................1 Introduction to Zend Framework Library.............................1 Zend Framework MVC ............................................3 Model, View, and Controller...................................3 “Hello World” in Zend Framework .............................9 Zend Framework Request/Response Objects and Error Handling.... 27 Conclusion .....................................................31 CHAPTER2 Introduction to Zend Studio for Eclipse ...................33 Getting Started Zend Studio for Eclipse.............................33 Creating Projects in Zend Studio for Eclipse....................36 Debugging in Zend Studio for Eclipse..........................38 Profiling in Zend Studio for Eclipse............................52 Conclusion .....................................................55 CHAPTER3 Web Application Performance and Analysis ..............57 Locating the Bottleneck ..........................................59 How Are You Bound?........................................59 Using vmstat...............................................59 Determining Whether You Are CPU-Bound .....................62 Determining Whether You Are Memory-Bound..................63 Determining Whether You Are I/O-Bound ......................65 vii Download at WoWeBook.Com viii (cid:78)CONTENTS Where to Start Looking...........................................66 CPU Bounding Influence.....................................66 Memory Bounding Influence .................................67 I/O Bounding Influence ......................................67 When the Bottleneck Is a Remote Procedure Call ...............68 Simulating Load to Identify Future Bottlenecks .................68 Conclusion .....................................................70 CHAPTER4 Data-Caching Strategies in PHP ...........................71 Opcode Caching.................................................71 The PHP Execution Cycle ....................................71 Full-Page Caching...............................................74 What Is Full-Page Caching?..................................74 Setting Up Full-Page Caching ................................76 Final Thoughts on Full-Page Caching..........................79 Semi-Full-Page Caching..........................................79 Programmatic Caching...........................................82 Components of Caching in Zend Framework ...................82 You Can (Almost) Always Cache Things........................83 Knowing Your Cache Effectiveness............................85 The Various Zend_Cache Back Ends ..........................85 Conclusion .....................................................92 CHAPTER5 Asynchronous Operations with PHP .......................93 Getting Started with Job Queue ...................................95 Advanced Job Queue Configuration................................97 Replacing Job Queue’s PHP with Your Own ....................97 Modifying the Configuration of Job Queue’s PHP................99 Controlling the Job Queue from the Command Line .............99 Using the Job Queue to Execute PHP Scripts.......................100 Creating Your First Job.....................................100 Searching for Existing Jobs.................................102 Using Input Parameters in Job Queue Scripts..................105 Creating Jobs Programmatically Using the Job Queue API.......108 Conclusion ....................................................121 Download at WoWeBook.Com

Description:
;Zend Enterprise PHP Patterns КНИГИ ; ПРОГРАММИНГ Автор:John Coggeshall Название: Zend Enterprise PHP Patterns Издательство: Apress Год: 2009 Формат: PDF Размер: 3.86 мб Для сайта: www.mirknig.comZend Enterprise PHP Patterns is the cu
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.