Archive for June 21st, 2006
PHP Developer - June 21st, 2006
In his latest post, Bertrand Mansion offers a suggestion to developers out there - “Stop stealing, innovate”.
Today I saw this proposal for the Zend Framework. I wouldn’t be surprised if this proposal was accepted. Zend Framework seems to be unable to propose anything innovative to PHP developers. The examples provided on this page look like they are copy/pasted from code available in PEAR that already is 5 years old.
He also comments that he thinks a lot of the innovation issues that are evident in that porposal are mirrored in both PHP, the language, and Zend as a company.
Continue Reading ·
PHP Developer - June 21st, 2006
Ryan from Scarletlullaby.com has posted a new item today looking at the process he followed to refactor a Rails MVC application into PHP.
Most of my work of late has involved refactoring and rewriting insanely large and out of control programs so that it’s easier to add features, follow program flow, etc. Since I’ve been using Rails so much in my personal projects, I tend to refactor things in a way that makes them resemble Rails in a funny, PHP-molested way.
I’ve come up with fairly decent and clean ways to implement most of the functionality available in Rails; basically, the PHP apps are set up using a frontcontroller, which delegates to instances of page controllers.
He looks at some of the “strange thoughts” he’s had in the process, including issues dealing with POST/GET values, session data, and difficulty surrounding the fact that PHP dosen’t support multiple inheritance.
Continue Reading ·
PHP Developer - June 21st, 2006
As the CakePHP framework grows in popularity, more and more tutorials are show up for it, including this quick and handy one from Graham Bird. In it, he explains the use of “slugs” instead of IDs to make URLs simpler to use and remember.
In this tutorial you will learn how to use words rather than IDs in your Cake URLs. These words are known as “slugs” in Wordpress so I decided to call them slugs too.
Cake’s normal URLs look like this: www.example.com/stories/read/123245221
and we are going to make them look like this: www.example.com/stories/read/sleepingbeauty
Thanks to the simplicity of the framework, the tutorial is pretty short, using one of CakePHP’s “magic functions” to help cross-match the slug given with a table in the database with a slug/title relationship. There’s not much code to it and he provides a demo</a. if you’d like to check it out first.
Continue Reading ·
PHP Developer - June 21st, 2006
For those who have yet to make the leap over from PHP4 to PHP5, it’d be worth your time to check out this new article from PHPBuilder.com detailing some of the object-oriented features that are new to this more advanced version.
With the release of PHP 5 in 2004 there was plenty of room for improv- ing PHP’s OO capabilities. At this point, Java, the most popular OO language to date, had already been around for almost 10 years. Why did it take PHP so long to become a full-fledged OO language? The short answer is because PHP is principally a web development language and the pressures of web development have only recently pushed it in this direction.
Their “long answer” goes through each of the changes that have been made (like access modifiers, built-in classes, web services, and reflection classes) explaining them in the context of comparing them back to PHP4. They also include a “where to go from here” section to advise on how to take that first step to PHP5-ness.
Continue Reading ·