April 2008
Monthly Archive
Wed 30 Apr 2008
DevShed has posted the second article in their series looking at benchmarking your PHP scripts. This time they look at the use of “timers” to check on script execution length.
Since you already know how to create timer functions and classes, in this tutorial, I’ll create some concrete examples that show where these timing mechanisms can be applied in order to evaluate the performance of certain PHP applications.
They create a few classes that connect to a database and pull out rows (handing it off to a Result class). They use these classes in two examples - one with compression (output buffering) and one without using their Timer class to evaluate the differences.
Wed 30 Apr 2008
As was mentioned on the Zend Developer Zone, a Dutch PHP TestFest has been announced by Stefan Koopmanschap in a recent blog entry:
(from the ZDZ translation):
We are very proud that testing guru Sebastian Bergmann will be present at the meeting! Sebastian is the man behind Unit the test framework PHPUnit, and is seen as the authority in the field of tests and quality control in the PHP community.
The event will be happening on May 10th starting at about noon and going until around 4:30 in the afternoon. You can get more details from Stefan’s blog entry including a link to register for the event.
Wed 30 Apr 2008
In a recent blog entry Stefan Priebsch shows how to take an error thrown by your script and turn it into an exception (to make things like catchable fatal errors).
While I would personally prefer an exception to be thrown in the first place, it is pretty easy to convert errors to exceptions in PHP.
His example is pretty simple - you set a custom error handler in your script that pulls in the error information and tosses an exception based on the error number the handler is given. Then you can use the try/catch method to see if your script has tossed an exception of the fatal error type. Nice simple solution to handle an interesting little problem.
Wed 30 Apr 2008
As Ivo Jansch mentions, the speaker list for this year’s Dutch PHP conference has been finalized:
Based on feedback from the ‘call for ideas’ we have added a session on security. It will be presented by Johann-Peter Hartmann, the CTO of Mayflower. Also, we are happy to announce that Terry Chay, a well-known blogger in the PHP community and informally called the ‘PHP terrorist’, will deliver the closing keynote.
You can check out the rest of the presentations (5 tutorials and 12 sessions) on the conference’s schedule page and, if you haven’t already yet, you can still register to reserve your spot to enjoy this great event (talks only, tutorials are sold out).
Wed 30 Apr 2008
Tony Bibbs has posted about the upcoming DC PHP Conference (happening June 2nd through the 4th in Washington, DC) and his talk “Fed Up of Framework Hype?”
For those of you that occasionally browse these pages you may recall a prior post on the subject. Given there was a bit of interest in that post I turned it into a talk for this conference.
He includes the abstract for his talk that covers the Framework of the Day that seems to be happening in PHP and what really lies behind each new release. He will talk on how to evaluate a framework for your use and how to not get wowed by the Next Big Thing that comes along and claims to do it all better and simpler than any before.
You can find out more about the DC PHP Conference from their website and registration is still open for those that want to reserve their spot.
Wed 30 Apr 2008
Padraic Brady has posted part four today detailing his development process for a piece of blogging software with the Zend Framework. This part focuses on the design stage of the application.
In this article we’re going to take a stab at setting up a default blog style, using some filler content, and finally capturing the design with a Zend_View template to be consumed by Zend_Layout as a common HTML Layout for the entire future blog.
He uses the Blueprint CSS framework for his projects, a simple system that helps you lay out pages it a bit more sensible fashion without having to worry about the underlying CSS so much. He shows how to integrate the library into his project and gives some sample HTML to style with it. Then, with a little help from the Zend_Layout component, he splits it up into a layout that can be used over the entire website (code included).
Wed 30 Apr 2008
This year’s PHP Unconference (in Hamburg) has finished up and server in the community have posted their summaries of this year’s event including:
You can check out the conference homepage for more on what went on.
Wed 30 Apr 2008
In a new article from PHPBuilder.com.au today, they talk about the “powerhouse of web services”, SOAP, and how to get started working with it in PHP.
You’ve tried your hand at building mashups, experimented with a few RESTful Web services, maybe even started your own. Sure, you’ve got data sharing working. But how do you make your Web applications really talk to each other? In this tutorial, I’ll show you how to take your Web applications to the next level with SOAP.
They opt to go with the NuSOAP method to consume another service and create your own simple one. They include a few code examples for either side and a (very) brief look at doing some debugging with what NuSOAP has to offer. One thing to note - if you have PHP5’s SOAP extension compiled in and working, NuSOAP will throw an error about redeclaring a class name. This is because of a conflict between the naming of the SOAP extension’s methods and NuSOAP.
Wed 30 Apr 2008
The Zend Developer Zone has posted their latest episode of the ZendCon Sessions podcast series - a talk from Christopher Jones on performance in Oracle.
Welcome to The ZendCon Sessions. This episode of The ZendCon Sessions was recorded live at ZendCon 2007 in Burlingame, CA. We hope you enjoy today’s session as we listen to Christopher Jones present “Performance Tuning for PHP with Oracle Databases”.
You can get at it three different ways - either through just downloading the mp3, using the in page player or by subscribing to their feed to get this and other great recorded sessions from last year’s ZendCon.
Tue 29 Apr 2008
Marco Tabini has posted his list of what he considers five features of PHP5 that you “can’t afford to ignore” when doing your development work:
Despite the fact that you may not have a choice in the matter, upgrading comes with a number of bonus new features that can help you write better code and gain access to new functionality that required a fair amount of hacking in previous version. Here’s a quick list of 5 personal favourites.
The feature to make his list are SimpleXML, JSON/SOAP, PDO, the Standard PHP Library and SQLite. Each has their own bonus feature(s) included too for a little extra incentive to check them out.
Next Page »