Design Patterns in PHP

The Zend Developer Zone has an excellent series on how to follow design patterns when programming in PHP5.

It starts off with an introduction to the topic, and then presents three pattern until now, Observer, Composite and Visitor. Each article is split into two parts and goes step-by-step from theoretical background over class models to real PHP code.

Zend Framework goes public

On March 3rd, a first preview version of Zend Framework has been released to public.

Zend Framework is a high quality and open source framework for developing Web Applications and Web Services.

Built in the true PHP spirit, the Zend Framework delivers ease-of-use and powerful functionality. It provides solutions for building modern, robust, and secure websites.

Ivo Jansch has already looked at it and written a short review, but is in doubt that the Zend Framework is really a framework. Some insights into the licensing around it gives Stuart Herbert.

A no-framework MVC approach in PHP

Rasmus Lerdorf, original creator of PHP and now working for Yahoo, does not like complex, feature-blown MVC frameworks fpr creating web applications. He has written a new Tutorial, creating a “no-framework PHP MVC framework” using only PHP5, JSON and the Yahoo! UI Library, suitable for creating the next fancy Web 2.0 site.

Many frameworks may look very appealing at first glance because they seem to reduce web application development to a couple of trivial steps leading to some code generation and often automatic schema detection, but these same shortcuts are likely to be your bottlenecks as well since they achieve this simplicity by sacrifizing flexibility and performance. Nothing is going to build your application for you, no matter what it promises. You are going to have to build it yourself. Instead of starting by fixing the mistakes in some foreign framework and refactoring all the things that don’t apply to your environment spend your time building a lean and reusable pattern that fits your requirements directly. In the end I think you will find that your homegrown small framework has saved you time and aggravation and you end up with a better product.

Rasmus provides a step-by-step tutorial from defining the goals of his project, explaining why and how to do the MVC method and showing the actual code, and also provides an example application.

(found in SitePoint’s PHP blog)