This book takes you beyond the PHP basics to the enterprise development practices used by professional programmers. Updated for PHP 5.3 with new sections on closures, namespaces, and continuous integration, this edition will teach you about object features such as abstract classes, reflection, interfaces, and error handling. You’ll also discover object tools to help you learn more about your classes, objects, and methods. Then you’ll move into design patterns and the principles that make patterns powerful. You’ll learn both classic design patterns and enterprise and database patterns with easy-to-follow examples. Finally, you’ll discover how to put it all into practice to help turn great code into successful projects. You’ll learn how to manage multiple developers with Subversion, and how to build and install using Phing and PEAR. You’ll also learn strategies for automated testing and building, including continuous integration. Taken together, these three elements—object fundamentals, design principles, and best practices—will help you develop elegant and rock-solid systems. What you’ll learn - Learn to work with object fundamentals: writing classes and methods, instantiating objects, and creating powerful class hierarchies using inheritance. - Master advanced object-oriented features, including static methods and properties. - Learn how to manage error conditions with exceptions, and create abstract classes and interfaces. - Understand and use design principles to deploy objects and classes effectively in your projects. - Learn about design patterns, their purpose and structure, and the underlying principles that govern them. - Discover a set of powerful patterns that you can deploy in your own projects. - Learn about the tools and practices that can guarantee a successful project including unit testing, version control, build, installation, and package management, and continuous integration. Who this book is for This book is suitable for anyone with at least a basic knowledge of PHP who wants to use its object-oriented features in their projects. Those who already know their interfaces from their abstracts may well still find it hard to use these features in their projects. These users will benefit from the book’s emphasis on design. They will learn how to choose and combine the participants of a system, how to read design patterns, and how to use them in their code. Finally, this book is for PHP coders who want to learn about the practices and tools (version control, testing, continuous integration, etc.) that can make projects safe, elegant, and stable.
If you are a web programmer, you need to know modern PHP. This book presents with many new areas in which PHP plays a large role. If you want to write a mobile application using geo-location data, Pro PHP Programming will show you how. Additionally, if you need to make sure that you can write a multilingual indexing application using Sphinx, this book will help you avoid the pitfalls. Of course, Pro PHP Programming gives a thorough survey of PHP post-5.3. You'll begin by working through an informative survey and clear guide to object-oriented PHP. Then, you'll be set for the core of the book on modern PHP applications. Now, you'll be able to start with the chapter on PHP for mobile programming and move on to sampling social media applications. You'll also be guided through new PHP programming language features like closures and namespaces. Pro PHP Programming deals with filtering data from users and databases next, so you'll be well prepared for relational and NoSQL databases. Of course, you can also learn about data retrieval from other sources, like OCR libraries or websites. Then the question of how to format and present data arises, and in Pro PHP Programming, you'll find solutions via JSON, AJAX and XML. What you’ll learn - PHP 5.3 object-oriented programming and new PHP features - Writing programs talking to SQL-based and NoSQL-based databases alike - Using modern PHP programmer's tools - Writing social media applications - Investigating NoSQL datastores - Writing PHP programs for a cloud ecology Who this book is for This book is for intermediate and advanced PHP programmers, as well as programmers coming from other languages such as Python, Perl, C/C++. It can also be utilized by programmers with knowledge of a previous PHP version who want to return to PHP.
Pro PHP Security is one of the first books devoted solely to PHP security. It will serve as your complete guide for taking defensive and proactive security measures within your PHP applications. The methods discussed are compatible with PHP versions 3, 4, and 5.The knowledge you’ll gain from this comprehensive guide will help you prevent attackers from potentially disrupting site operation or destroying data. And you’ll learn about various security measures, for example, creating and deploying "captchas," validating e-mail, fending off SQL injection attacks, and preventing cross-site scripting attempts.
What would happen if you optimized a data store for the operations application developers actually use? You’d arrive at MongoDB, the reliable document-oriented database. With this concise guide, you’ll learn how to build elegant database applications with MongoDB and PHP.Written by the Chief Solutions Architect at 10gen—the company that develops and supports this open source database—this book takes you through MongoDB basics such as queries, read-write operations, and administration, and then dives into MapReduce, sharding, and other advanced topics. Get out of the relational database rut, and take advantage of a high-performing system optimized for operations and scale.- Learn step-by-step the tools you need to build PHP applications with MongoDB- Perform Create, Read, Update, and Delete (CRUD) operations, and learn how to perform queries to retrieve data- Administer your database, and access and manipulate data with the MongoDB Shell- Use functions to work with sets, arrays, and multiple documents to perform synchronous, asynchronous, and atomic operations- Discover PHP’s community tools and libraries, and why they’re valuable- Work with regular expressions, aggregation, MapReduce, replication, and sharding
- Build a flexible e-commerce framework using PHP, which can be extended and modified for the purposes of any e-commerce site - Enable customer retention and more business by creating rich user experiences - Develop a suitable structure for your framework and create a registry to store core objects - Promote your e-commerce site using techniques with APIs such as Google Products or Amazon web services, SEO, marketing, and customer satisfaction The popularity of online shopping has increased dramatically over the past few years. There are plenty of options available if you not are planning to build your own e-commerce solution but sometimes it's better to use your own solutions. It may be easy to find an e-commerce system but when it comes to extending it or using it you might come across a lot of difficulties. This book will show you how to create your own PHP framework that can be extended and used with ease, particularly for e-commerce sites. Using this framework you will be able to display and manage products, customize products, create wish-lists, make recommendations to customers based on previous purchases, send email notifications when certain products are in stock, rate the products online, and much more. This book helps you build a Model-View-Controller style framework, which is then used to put together an e-commerce application. The framework contains template management, database management, and user authentication management. With core functionality in place, e-commerce-focused features are gradually added to the framework including products, categories, customizable products with different variations and customer input, wish-lists, recommendations, the shopping basket, and a complete order process. At the end of the book, you will have an e-commerce architecture that will take you from viewing or searching for products, and adding them to your basket, through the checkout process and making payment for your order, to your order being dispatched. Focus is placed on flexibility, so that the framework can be extended as the needs of a particular store change, as illustrated by one of the appendices, which goes through the process of modifying the store to sell downloadable products, as well as physical ones. Supplementary information, such as how to market and promote an online store, as well as take regular backups and perform maintenance is also covered, ensuring you have every chance of success with you own e-commerce framework backed store. Add dynamism to your e-commerce site for better prospects with your business using PHP What you will learn from this book : - Plan and develop a flexible, scalable PHP framework with emphasis on e-commerce - Implement the Model-View-Controller architecture within the framework and learn how to use the registry design pattern to centralize core features - Allow customers to customize their purchase by selecting product attributes, uploading files, and supplying custom text - Offer attractive incentives to your customers in the form of discount codes - Protect your e-commerce framework by keeping and maintaining regular backups - Structure an extendable framework to build a custom e-commerce web site - Add features such as product ratings and reviews from customers to enhance user experience - Maintain your site using campaign monitor and CAPTCHA tools - Create a shopping basket, manage its contents, structure the checkout and order process - Filled with useful marketing, Search Engine Optimization, and customer retention tips - Create a PHP framework to power your web site with a range of e-commerce features Who this book is written for If you are a web developer, or anyone looking to increase your understanding of e-commerce site development, this book is for you. Primarily aimed at PHP developers, it is suitable for any web developer interested in enhancing their e-commerce knowledge, or developers looking to move towards PHP. Intermediate knowledge of PHP development and object-oriented programming is assumed, and basic knowledge of e-commerce principles will be of benefit too.
Readers can take their PHP skills to the next level with this fully revised and updated PHP Advanced: Visual QuickPro Guide, Third Edition! Filled with fourteen chapters of step-by-step content and written by bestselling author and PHP programmer Larry Ullman, this guide teaches specific topics in direct, focused segments, shows how PHP is used in real-world applications. The book teaches developing web applications using advanced PHP techniques and advanced database concepts, and this edition offers several chapters devoted to object-oriented programming and all-new chapters on debugging, testing, and performance and using the Zend framework. Author hosts a popular companion website at www.larryullman.com, where readers can freely download code used in the book, access a user forum and book updates, and get advice directly from the author.