Chris Hartjes has started up a new series on his blog about converting legacy applications over to shiny, new CakePHP framework versions.
In my rapidly dwidling spare time I have been working on a project to convert an existing site for a legal services company over to PHP. I'm *this* close to being done, so I thought I'd share what I went through to get to where I am right now. [...] So after giving the code review I was asked to do the rewrite. The client realized that they had some serious maintenance issues on their hands and were in the process of creating a new look-and-feel for the site. Being the framework guy that I am, I indicated that porting the code over to a framework would be the best way to reduce maintenance issues going forward.
The series will document the process he followed to convert the application over. In part two he'll get into the meat of things - reworking the database structure.
On the Debuggable blog Tim Koschutzki has a new post showing how to get CakePHP to play nicely with a HABTM query and pagination.
The problem is that a user inputs some search criteria into a form, the resultset exceeds 30 rows for example and the user must be able to browse through the resultset via different pages. [...] This problem itself is in fact not much of a problem. We just need to store the form conditions somewhere and then hack it together. So what we are going to do is that we raise the difficulty bar a lot more by trying to get the pagination work over a HABTM relation.
Code is included for the model and controller to get the job done.
Douglas Clifton has taken some time to look at a group of the web application frameworks out there (not just PHP - Pearl, Python and Ruby too) and offer up some opinions on them. This new post is the result.
It just wouldn't be fair after my last post to ignore the tried-and-true server-side Web application frameworks. I am certainly familiar with all of them, though I haven't necessarily used every one in a production environment.
It's light weight, fast, and stays out of your way. There are any number of class modules to choose from, and you can discard what you don't need to lighten the load even more.
The SaniSoft group has announced a new event happening in the first part of December 2008 (in Buenos Aires, Argentina) - CakeFest.
Conferences are the forefronts of modern communications, more so when they are related to the FOSS world. Conferences and Open Source Fests are platforms where the developers meet, discuss, share and carry their work forward. [...]
SaniSoft is a sponsor for this year's event. CakeFest is a four day conference that gathers together the CakePHP community for networking and talks from speakers like Nate Abele, Garret Woodworth, Mariano Iglesias and Felix Geisendorfer. You can find out more information (as well as reserve your spot) on the main conference site. The Early Bird pricing of 50% off ends tomorrow, so hurry!
NETTUTS has posted the second part of their series looking at the basics of CakePHP and how you can get started developing.
In our last CakePHP tutorial we looked at setting up the CakePHP framework and introduced some of the framework's basic concepts and terminology [...] In the next set of tutorials we will build the blog application incrementally so that the basic CakePHP development process is laid out clearly instead of briefly mentioned as in other similar tutorials. In this tutorial we start with a basic authoring authentication component for the example blog application.
He's broken it down into a few steps - defining the goal of the application, creating the models to interface with the database, making the views to output the results and making the controllers to bind it all together.
In the latest episode of The Show, the CakePHP podcast, Laura Thomson is interviewed about everything Mozilla.
Laura has been working at Mozilla for over a year now, and has been leveraging the CakePHP framework in many high-visibility Mozilla projects, such as the Firefox Add-Ons portal, and their new single sign-on initiative. Laura is a prolific speaker and writer, as well as an active member of the Open Source community. She has co-written the top selling PHP/MySQL book in the world, "PHP & MySQL Web Development" (Sams, 4th Edition). Mozilla has the largest known installation of the CakePHP in the world.
You can either subscribe to their feed and get this and other great CakePHP-related content or you can just grab the mp3 by itself and start listening.
Gopal Vijayaraghavan has posted some opinions about the way that several of the popular PHP frameworks work internally, more specifically in their inclusion schemes.
In the development of things, there comes a point when it escapes the vision and control of one man/one mind. PHP frameworks are such ... beasts. But the simplicity a machine took away can be made to return. And such an attempt at zooming out of the complex file structure bureaucracy of most php projects was inclued.
He points to this image of the Zend Framework's structure as an example of the unneeded complexity several of the frameworks are guilty of (including CakePHP, Symfony and CodeIgniter).
He also includes a suggestion that could help keep the frameworks a bit more accountable:
Now, all that remains is a php-graphviz + svg mode which renders these in-browser as an iframe - or maybe someone can help me with the graph reduction to take a collection of the inclued dumps & create a "package".
On the NETTUTS site today there's a new tutorial, an introduction to the CakePHP framework.
CakePHP is an open-source framework for PHP intended to make developing, deploying and maintaining applications much easier. CakePHP offers many useful design patterns, such as the Model-View-Controller pattern, seen in other popular frameworks like Ruby On Rails. The CakePHP framework also provides a slew of valuable reusable libraries for dealing with common tasks. An example is "Inflector" (a routine that takes a string and handles pluralization).
They step you through the download, installation and configuration of the basic CakePHP setup. Included are definitions for some of the common parts of the framework like models, controllers, plugins and the vendors directories.
In this new post to his blog Chris Hartjes suggests a new way to judge frameworks - how easy they make it to write unit tests against them and their resulting applications.
As a project for work gets ready for an alpha release, I've managed to eliminate all the serious bugs and now have some time for what should've been part of the project from the beginning: writing tests. [...] Since I'm using Code Igniter instead of CakePHP for this project (did I mention that I inherited the project and couldn't switch?) I started looking into the culture of testing surrounding Code Igniter. It's weaker than a newborn baby.
He tried to find anything he could use to write tests against the CodeIgniter application and finding fooStack as an easy to use tool for the job. This was what made him wonder how other frameworks stack up in the "has good unit testing functionality" category. He briefly covers four of them - CodeIgniter, Zend Framework, CakePHP and Symfony.
So now when you start comparing frameworks to each other, I think it's important you also consider how much effort has gone into creating tests for the core functionality of that framework. A well tested framework should mean far less surprises when using it.