The eZ Components project has release their latest stable version - 2008.2 - for public consumption today:
The development team is happy to announce the release of the seventh
major version of eZ Components: version 2008.2. The main new development of this release is focused on the MvcTools (and
accompanying) components.
The MvcTools component implements the tools for a framework, providing a dispatcher, request parsers, routing, view support and a response writer. Examples of its use can be found in the subversion repository for the project. You can see the full Changlog for the release here and you can download the latest release here.
Derick Rethans has posted just a few of the reasons why the "shut-up operator" (the @ symbol) should be avoided at all costs in your PHP applications.
The @-operator is often used to silence errors in noisy PHP functions'"functions that generate warnings that can not be easily prevented. [...] In those cases, there is no way how to check up-front whether the function call will not issue a warning when being called.
There are side effects to using the operator, however, including hiding legitimate errors and making debugging that much more difficult. To back up his point, he includes four other reasons to avoid the operator's use (besides the debugging issues):
It's slow (part 1)
It's slow (part 2)
It's slow (part 3: It generates crappier code)
Apfelstrudels were harmed (related to the strudel_token in the C code for the operator)
Since the Seven Things meme has been charging its way through the members of the PHP community (and some outside it), it's hard to keep track of who is tagging who and if those people have posted their "seven things" and tagged others. Michelangelo van Dam has tried to make things easier with his "Who Tagged Who" map mini-application that crawls through the posts looking for others who were tagged.
Trying to get a bit of overview of all people who have put up their "Seven Things" list, I created a little map that shows who tagged who with an overview of the most tagged persons.
You can also grab the XML source file if you'd like to manipulate it yourself.
Ian Selby has posted a new tutorial today looking at something that can be very handy in the right situations - dynamically adding new functions to an already defined PHP class.
I've gotten a lot of great suggestions for features [for PHP Thumbnailer], and have wanted to add them, but at the same time don't as I would prefer not to bloat the class with all sorts of functionality. So I started thinking about how I could provide certain functionality for people that want it, without either simply making it a part of the class (and making it more bloated as a result), or coming up with all sorts of extended classes to maintain and distribute.
His solution was to add functionality dynamically to the class as plugins. Each plugin is defined as its own class (to keep things standardized) and will be included/executed by a base controller class. He includes some sample code showing how to create a basic user object that can store the first and last names of the user in question.
Sameer has posted the first article in his "Refactoring" series today - a look at boiling down conditional expressions to only the logic that are really needed (and maybe replacing it all together).
Many times you see a group of conditionals where the returned values are the same. To make the code cleaner you can group the conditionals together using the '&&' or the '||' operators and then extract the code into a separate function. This also has the added benefit that you can reuse the extracted method in other places where the required conditional goes.
He shows how abstracting out a file upload permissions check to another function makes it easier to reuse and simpler to understand (an "if" versus multiple "return" statements).
In an effort to dispel some of the rumors and myths around the CakePHP framework (as presented most recently by a different blogger) Chris Hartjes has made a new "mythbuster" post to his blog today with a rebuttal to the points from the other article.
I ran across an article comparing CakePHP and Symfony and found that the writer had a number of preconceived ideas about CakePHP. These same ideas keep popping up everywhere, used by people looking to get their hate on about CakePHP. I sent a very well-reasoned email to the writer clearing up some of those misconceptions [...] So, in the interest of clarifying things about CakePHP I thought I would share that email, slightly rewritten for this blog posting, but the content is roughly the same.
The post/email covers a few different topics some might have misconceptions about concerning the framework:
Lack of Documentation
Scaffolding
Models are tied to controllers in a 1:1 relationship
Cake's Ajax and Javascript helpers do not support graceful degradation
The PHP::Impact blog has a new post looking at how to run PHP on a Jetty (Java) web server using Quercus.
Tomcat and Jetty are very similar. Jetty can be invoked and installed as a stand alone application server. It has a flexible component based architecture that allows it to be easily deployed and integrated in a diverse range of instances. The project is supported by a growing community. The Jetty team has a history of being responsive to innovations and changing requirements.
They walk you through the "quick install" version of Jetty, getting it running, installing Quercus and configuring the Jetty web server to work with it.
Ever wanted to know more about the individuals in the PHP community around you? You're in luck! The "Seven Things" meme has been zipping its way through the PHP community with some great results. I've tried to get together a list of the posts made so far - it's not going to get them all, but its a start. Those linked in the top list are ones tagged and with a blog post. The normal list at the bottom are those that are tagged but haven't gotten around to writing their Things:
If you're one of the ones that hasn't posted yet and you get around to it or if I've left someone's post out of the list, let me know and I'll update the list.
Lorna Mitchell has posted a review she's done of the Packt Publishing book "RESTful PHP Web Services" (by Samisa Abeysinghe).
Overall it was well-written (with only as many spelling mistakes as any other PHP book) and clearly organised. [...] Very few services that claim to be RESTful actually are, which makes writing anything along these lines very tricky, however I did feel the author could have been clearer about why having a single URL and a parameter for which action should be performed, doesn't fit well. We do get a sense of excitement about services as ways to "glue together" bits of data on the net, and the possibilities of exposing and consuming information in this way.
She talks about the quality of the technical content (including the "very thorough" non-framework examples and Zend Framework example) and some of the extra baggage she felt it could do without - specifically the overhead that adding the Zend Framework could add.