Zend Framework Q&A

Posted 15:34, 9/5/2008, in Web

Last week Zend held a Q&A for the Zend Framework, which gave a good insight into the areas they're working on and the direction the framework is heading. Audio is now available (direct mp3 link) - there were a few technical issues (varying microphone levels etc.), but it's an interesting listen.

PHP version compatibility

One thing discussed was ZF's compatibility with previous versions of PHP. The framework is already a little unusual in that it requires PHP 5.x - most PHP frameworks work with PHP4, but this allows them to take advantage of the OO improvements that came with PHP5.

Backward compatibility has been both a blessing and a curse for PHP. The PHP team have done pretty well to ensure that for the most part, new releases of PHP don't break any existing scripts. I have plenty of scripts written back in the days of PHP3 that still work perfectly well.

For this reason, it's been easy for open source projects to ensure their scripts are compatible with older versions, and the majority list PHP 4.3 as their minimum requirement. Unfortunately this has greatly slowed the adoption of new PHP releases - hosts have few reasons to spend the time upgrading if existing scripts that work perfectly well don't use any of the new features.

There were some figures released recently about the adoption rate of PHP5, and they're really quite scary. 5.0 came out in July 2004, that's almost 4 years ago; but the majority of hosts (I think it was about 70%) are still running 4.x, which will no longer be supported after this summer.

It's a vicious circle that will only be broken if either the new PHP releases contain massive performance increases to tempt web hosts, or some amazing new features to tempt the big open source projects.

ZF's take on this was that they will continue to take advantage of features in new PHP releases where appropriate, but at the same time they can't just update their minimum version requirement whenever a new version of PHP is released, as vendors (Red Hat was given as an example) tend to lag behind the official releases somewhat.

In many ways it seems the development of the framework is driving updates to PHP itself. Some of the features upcoming in the next releases (PHP 5.3) such as namespaces and late static binding, have clear uses in the framework, and the team have said they will take advantage of these.

Performance evaluation

Also discussed was performance of the framework. I agree with the sentiment that hardware is cheap, developer time is not; and so spending ages trying to tweak the performance of an application before it becomes a problem can be a waste of time. This is certainly something I've been guiltly of in the past. However I'd also say that in general, performance of a framework should be more of a priority than with a typical web app, since any applications built on top of the framework can only be as fast as the framework itself.

The team are planning a performance review at some point in the future, and they'll be using the same tools developed for testing the performance of PHP itself, so it'll be interesting to see any tweaks made as a result.

Overall the team seem to be looking at the right areas and making the right decisions, and so the future of the framework is looking bright.

Comments (0)

Layered PNGs in GIMP

Posted 21:16, 6/5/2008, in Ubuntu

I quite often get website creative supplied in PNG format, particularly from our main designer who uses Macromedia Fireworks. Fireworks saves these by default with layers, which can be useful when converting layouts into HTML/CSS, but I never understood why these layers were gone when I opened the file in the GIMP.

It turns out, the reason is because... the PNG format doesn't support layers! The format does allow for files to contain some extra data, which is apparently where Macromedia stores the layer data (in an apparently closed format nothing else can read). So much for the 'portable' network graphics format.

Comments (0)

Setting up PDT 1.x, Eclipse 3.3 on Ubuntu Hardy

Posted 13:03, 3/5/2008, in Ubuntu

Not quite convinced by PHP under Netbeans, I decided to go back to the PDT plugin for Eclipse for my PHP development. Unfortunately setting this all up is much more complicated than it should be, since the current release version of PDT requires Eclipse 3.3+, but the latest version in the Ubuntu repositories is 3.2.2.

There are alternative ways to install this of course, the PDT site offers an all-in-one package, or you can download Eclipse 3.3 from eclipse.org, and go from there. However I've never had too much luck with these.

So here's how to get it working:

  1. Install the latest version of Eclipse from the repositories (you can do this either via. Applications > Add/Remove, via. Synaptic or via. the command line).
  2. Update Eclipse to 3.3.x using its own build-in auto-update function. To do this:
    1. Open a terminal window and run Eclipse as root - sudo eclipse (this is important as otherwise your update will fail when it tries to overwrite some of the root-owned core files)
    2. Add some new update sites which contain the 3.3 features (I used the list in this blog post), you can either add them manually or import from the from the supplied XML file.
    3. Select the most recent Eclipse 3.3.x version and then follow all of the installation instructions (will take a few mins).
    4. Exit Eclipse
  3. Install PDT. Run Eclipse normally (not via. sudo), you should get the 'Europa' splash screen, which will confirm that you're running version 3.3.x. Help > Find and install updates etc. Select PDT and its dependencies, and install.

et. voila.

Hopefully the next Ubuntu release will include an Eclipse update, which will make this process a lot easier.

Comments (0)

Search this site
Login
(or login/signup the old fashioned way)
Elsewhere

External URLs/articles that may be of interest:

PHP - Architecture, Scalability, and Security

Slides from Rasmus' OSCON talk, once again some interesting ways of tweaking server performance to get the most out of PHP apps.

New Rails documentation site

Lack of a decent manual has always been a big problem for Rails (an API reference is not a manual!) A number of projects have sprung up in the last year or so trying to make up for this, this new one is the best I've seen so far, so hopefully it will gain some traction.

bbc.co.uk moving to Zend Framework

The BBC are updating their perl/SSI based backend to a platform using Java for the backend and Zend Framework for the frontend.

Stock image search engine

Free text search for a number of different stock photo sites, results include thumbnails, dimensions and license info. The advanced search option allows you to, among other things, restrict results to only photos with a particular license (e.g. "public domain").