How we did it:
For any feedback, any questions, any notes or just for chat - feel free to follow us on social networks
Michael C. Feathers
The average book on Agile software development describes a fairyland of greenfield projects, with wall-to-wall tests that run after every few edits, and clean & simple source code.
The average software project, in our industry, was written under some aspect of code-and-fix, and without automated unit tests. And we can't just throw this code away; it represents a significant effort debugging and maintaining. It contains many latent requirements decisions. Just as Agile processes are incremental, Agile adoption must be incremental too. No more throwing away code just because it looked at us funny.
Mike begins his book with a very diplomatic definition of "Legacy". I'l skip ahead to the undiplomatic version: Legacy code is code without unit tests.
Before cleaning that code up, and before adding new features and removing bugs, such code must be de-legacified. It needs unit tests.
To add unit tests, you must change the code. To change the code, you need unit tests to show how safe your change was.
The core of the book is a cookbook of recipes to conduct various careful attacks. Each presents a particular problem, and a relatively safe way to migrate the code towards tests.
Code undergoing this migration will begin to experience the benefits of unit tests, and these benefits will incrementally make new tests easier to write. These efforts will make aspects of a legacy codebase easy to change.
It's an unfortunate commentary on the state of our programming industry how much we need this book.
This volume is a handbook for enterprise system developers, guiding them through the intricacies and lessons learned in enterprise application development. It provides proven solutions to the everyday problems facing information systems developers.
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. Table of Contents PHP: Design and Management PHP and Objects Object Basics Advanced Features Object Tools Objects and Design What Are Design Patterns? Why Use Them? Some Pattern Principles Generating Objects Patterns for Flexible Object Programming Performing and Representing Tasks Enterprise Patterns Database Patterns Good (and Bad) Practice An Introduction to PEAR and Pyrus Generating Documentation with phpDocumentor Version Control with Subversion Testing with PHPUnit Automated Build with Phing Continuous Integration Objects, Patterns, Practice
Sebastian Bergmann, Stefan Priebsch
Using real case studies from well-known companies and their PHP experts, the book presents the planning, execution, and automation of tests for the different layers and tiers of a Web software architecture, the measuring of software quality by means of software metrics, as well as establishing successful development processes and methods such as continuous integration, all in real-world scenarios. Different opinions are offered on how problems are solved to give the readers not "one single truth" but provide different approaches to problems and views on issues. There are three types of case study chapters: Enterprise Case Studies (How does company X implement their QA process?)Digg, OXID eSales, studiVZ, swoodoo Open Source Project Case Studies (How does project Y implement their QA process?) Typo3, eZ Components, Symfony, Zend Framework Case Studies that explain the implementation of a certain process or usage of a tool: Unit Testing Bad Practices, Performance Testing, Testing Database Interaction, Continuous Integration with phpUnderControl Experts presenting the case studies include: Brian Shire, Facebook's lead for PHP Internals and a developer for the Alternative PHP Cache Michel Lively, Jr. Lead PHP Developer for Selling Source, LLC. Robert Lemke and Kaarsten Dambekalns, core developers of TYPO3 and FLOW3 Fabien Potencier, CEO of Sensio and lead developer of Symfony Matthew Weir O'Phinney, Project Lead for the Zend Framework
The Zend Framework is a truly amazing PHP–based web application development framework and platform that is breathing new life into PHP development. One of the most common uses for a framework such as this is to build content–driven web sites. Pro Zend Framework Techniques offers: A structured guide for PHP developers, ultimately helping you to create more flexible software much more quickly Clear guidance through the entire process of building a custom content management system (CMS) with the Zend Framework The ideal example project, building a CMS, to illustrate how to use the many different aspects of the framework What you’ll learn How to structure a real Zend Framework application top to bottom using a CMS application How to work with abstract (flexible) data structures How to add security, access control, and authentication with the Zend Framework How to build a custom, modular CMS How to integrate web services and RSS with a Zend Framework application How to do performance tuning, graceful error handling, internationalization, and more... Who this book is for This book is for intermediate–level PHP developers who want to build custom content–driven web sites. Secondly, this book serves as a very readable reference with real–world examples of many of the core Zend Framework components. Table of Contents Getting Started Designing Your Site Building and Processing Web Forms with Zend_Form Managing Data with Zend Framework Working with CMS Data Managing Content Creating the Site Navigation Handling Security in a Zend Framework Project Searching and Sharing Content Extending Your CMS Advanced Topics Installing and Managing a Site with Your CMS
The existing books on design patterns take a catalog approach, where they show the individual design patterns in isolation. This approach is fundamentally flawed, because you can't see how the design patterns actually function in the real world. Most programmers learn by looking at computer programs. Holub on Patterns: Learning Design Patterns by Looking at Code teaches you design patterns in exactly this way: by looking at computer programs and analyzing them in terms of the patterns that they use. Consequently, you learn how the patterns actually occur in the real world and how to apply the patterns to solve real problems. This book also looks at the broader context of object-oriented (OO) design and how patterns solve commonplace OO design problems. It covers many of the principles of OO design—principles not covered by most books on Java—and shows you how to apply these principles to make your code easier to maintain and debug.
The Zend Framework is one of today's most popular PHP–based web application development frameworks. Beginning Zend Framework is a beginner's guide to learning and using the Zend Framework. It covers everything from the installation to the various features of the framework to get the reader up and running quickly.
This is a step-by-step tutorial for developing web applications using Yii. This book follows the test-first, incremental, and iterative approach to software development while developing a project task management application called "TrackStar". If you are a PHP programmer with knowledge of object oriented programming and want to rapidly develop modern, sophisticated web applications, then this book is for you. No prior knowledge of Yii is required to read this book.