Alvaro has put together a post that lays out some of the design patterns that the Symfony framework uses to get the job done:
Much hasbeensaid this days about how modern web frameworks interpret the MVC architectural pattern. I'm my case those articles made me rethink how I use a framework, specially Symfony. This lead me to start a study on which patterns come into play while we develop a Symfony application. So while adding new features or refactoring existing ones I will know which class is in charge off doing the job.
Some of the design patterns mentioned include the Front Controller, Contaxt Object, Helper Object, Active Record and Single Table Inheritance. He includes brief examples of each of them in use (no code but plenty of description).
Justin Carmony recently put together a blog post looking at the biggest database design oversights that PHP developers can make in their applications.
I've thought of some of the biggest oversights I've had when working with PHP and MySQL and put them in a list. This is my personal list, and I'm sure some people can think of some other oversights that belong on the list as well. This list is just for PHP & MySQL, not PHP and any database. I know many people like using software like Doctrine to allow switching between different database types. That is beyond the scope of this article.
He includes a list of five - not having a data access layer, designing for only one database connection, not including developer logging, having queries written in procedural code and no separation of reads and writes to the database.
The O'Reilly School of Technology now offers a series of PHP certification classes developers can attend to learn more about PHP and SQL on a variety of projects.
The PHP/SQL Programming Certificate Series is comprised of four courses covering beginning to advanced PHP programming, beginning to advanced database programming using the SQL language, database theory, and integrated Web 2.0 programming using PHP and SQL on the Unix/Linux mySQL platform.
Another class will be released in December 2008 - PHP/SQL 3: Seamless Web 2.0 Integration . The classes come it at a bit under $400 USD and include access to an online sandbox for testing (complete with web server, unix-shell and database installations). Completion of all four courses earns the student a certification from the University of Illinois's Professional Development department.
Following up on their introduction to design patterns, the PHP Freaks have posted tutorials covering three of the more popular patterns - strategy/bridge, value object and singleton.
Strategy and Bridge - The Strategy and Bridge patterns provide solutions to apply polymorphism in more flexible way than you can accomplish with only inheritance.
Value Object - The Value Object pattern has, just like the Singleton, to do with referencing and instances. In a way, the Value Object is the opposite of the Singleton: it's goal is to ensure NOT to use the same instance, under certain conditions.
Singleton and Singleton Registry - The Singleton pattern ensures that you are always dealing with the same, single instance, wherever in your application. The Registry pattern usually utilizes the Singleton pattern (hence "Singleton Registry") to make the same 'globalness' apply to objects who's classes weren't necessarily designed to
The PHP Freaks website has a new tutorial posted today thats an introduction to design patterns - what they are and which were the ideas of the "Gang of Four".
Implementing Design Patterns is gradually getting more common in the PHP world. The hype around Ruby on Rails, which is based on the Model-View-Controller architectural pattern, has spawned a generation of PHP based frameworks which embrace this pattern also, paving the way for others to embrace design patterns in general in their PHP applications.
Design patterns are just a standardized way of doing something (like a Factory where, when you request an object, if one already exists you get that one instead of a new one). They illustrate the design pattern concept with a database abstraction system (UML) and a configuration setup where the main class inherits from the child type-specific ones.
In a recent post to his blog Daniel Cousineau take a look at the ImagePlane image editor just released by Net Perspective and some thoughts he has with the PHP demo included with documentation.
He mentions considerations of things that the tool does like the base64 posting of the image and the possible need for more than one kind of backend image manipulation library. He outlines his interface with four functions (loading, transparency, output quality and saving) and implements it in a sample class and some example usage code.
From the DotNetButchering blog there's a recent post looking at design patterns, more specifically ones you might be using and you don't even know it.
Rise your hands if time ago (or even now) you stood literally in trance listening to your friends or colleagues talking about design patterns. [...] Anyway I felt better (and also my ego did) when I found those Design Patterns were no more than ways to solve common programming problems, and as I was programming since 2 or 3 years, I had already discovered some of them myself.
He points out two patterns - the strategy and factory patterns - and gives code examples (and UML diagrams) to show how they work.
A recent post from Francois Zaninotto has been getting a lot of attention recently. It's his look at what would be needed to design a complete CMS and the full architecture behind it.
When faced with the alternative between an off-the-shelf CMS or a custom development, many companies pick solutions like ezPublish or Drupal. In addition to being free, these CMS seem to fulfill all possible requirements. But while choosing an open-source solution is a great idea, going for a full-featured CMS may prove more expensive than designing and developing your own Custom Management System.
He breaks it up into sections that look at the hidden costs behind custom development, what components it takes, the environment to build in and some of the fundamental questions you need to ask before even getting started.
A while back the PHPClasses.org website announced that it would be changing its look a bit and allowing visitors to set up and configure their own look and feel as they chose. The editor to make these changes has finally been released and is ready for use.
The site is launching an editor that allows designs to propose new site design themes. This is the initial beta version of the site design editor, but it already allows any designer to try different presentation designs.
You can access the editor from here and it'll require a login to get in (to create your own custom layout). The system uses simple tag-based templating to wrap the content of the site in your look/feel of choice. You can even try it out on different sized resolutions to give you an idea of the template's flexibility.
In this recent tutorial from the NETTUTS website, they show how to "build a better blogroll" by combining the client-side power of jQuery with the simplicity of the SimplePie aggregation tool.
A traditional blogroll is a simple list of other sites, often in the sidebar, that are related, owned by, or otherwise friendly to the home site. Blogrolls are a great idea and on-point with the spirit of blogging, but how is a casual reader to know if any of these sites are truly of interest? Let's improve upon the concept of a blogroll by not just listing sites, but dynamically pulling recent headlines from them, and using some fun jQuery animation.
Their code (demo here) uses a CSS-based layout and simple pagination to switch between multiple groupings of RSS feed content.