Archive for December 8th, 2006
PHP Developer - December 8th, 2006
On the Bakery (the CakePHP site), there’s a new entry talking about how to keep bindModel and unbindModel (create/destroy associations) out of your Controller and banishing them back to where they belong.
Here I show you how to add a simple method to your Model classes that allows your controllers to specify binds directly, in a cleaner, more proper way.
They start with a simple modification to the AppModel class before implementing the associations in another class, Title, extending the new and improved AppModel. They follow with with a clean, bindModel-free Controller that sets values and reads from the associated model data.
Continue Reading ·
PHP Developer - December 8th, 2006
In his latest blog post, Wolfgang Drews is pointing out a training class his other site, DynamicWebPages.de, is doing for the Zend Framework.
Just a short shameless Plug for all who it may concern: Dynamic Web Pages holds a free information webinar about the new php5-certification in german language next week wednesday, 13th of december at 3 p.m.
Christian Wenz with be the facilitator and you can get complete information and sign up on phpzertifizierung.eu.
Continue Reading ·
PHP Developer - December 8th, 2006
On the O’Reilly OnLamp.com blog, chromatic voices some concerns about the latest PHP statistics being released.
It’s been three months since PHP Versions in the Wild. What does Nexen report about PHP version adoption statistics for November? […] Nexen’s PHP Adoption Stats for November 2006 show that PHP 4.4 has surpassed PHP 4.3. PHP 5 is in the double-digits, but it’s still a fraction of PHP 4’s popularity, despite its climb.
He also comments that, for those working towards a PHP6 release, it “must be frustrating” to see PHP5 adoption having taken such a long time to really get a foothold.
Developers and users alike were comfortable in their PHP4 world and didn’t want to branch out to this newfangled thing that is PHP5. They hear stories of how it breaks things and only causes trouble and don’t want to make the move. But finally, some brave souls put their feet in the water, saw that there were no piranhas in sight and dove right in. Thankfully, more and more have followed them hearing the success and ease with which PHP5 has made things in their applications.
So, what’s your excuse? Why haven’t you made the switch? And will you follow those leader’s example and dive right into PHP6 when it comes around?
Continue Reading ·
PHP Developer - December 8th, 2006
On the “start up web 2.0″ blog today, there’s a set of benchmarks comparing two popular PHP frameworks - CakePHP and CodeIgniter - and how the fare in the standard “Hello World” sort of test.
After reading How fast is your framework I was rather intrigued to compare CakePHP and CodeIgniter. […] Each framework is required to have the output “HelloWorld!” produced from a view and a controllers will obviously have to be created.
He ran the tests with the Apache benchmark tool (ab) and the simple code he provides with the results leaning towards CodeIgniter (by a good bit). Overall, it had a faster response time than CakePHP by about half.
Check out his results and grab the code and run it for yourself - see what kind of results you get and how they compare.
Continue Reading ·
PHP Developer - December 8th, 2006
In a new tutorial from PHPBuilder.com today, they introduce you to a very handy bit of functionality that can help make working with content on your site a much simpler process - Ajax Edit-in-Place (using Prototype).
Edit in place, like many other Ajax functions, uses the XmlHttpRequest Object to call an external page to send and receive information.
They start with the planning, the layout of how the mini application would work before even getting into the code. They assume that you already know how to work with a MySQL database and have an abstraction layer in place before starting in with the Javascript - echoing out the records (print_records), switching from a div to a textarea (changeClass), putting the content back into the database (save), and updating the page with the new information (update_page).
By the end you’re left with a simple, clean edit-in-place that you can drop into any page that uses divs to contain the content.
Continue Reading ·