The Developer Day | Staying Curious

Archive for December 2007



Zend Framework pros and cons

Generally I dislike most PHP frameworks. Especially after the Ruby on Rails fashion wave after which a lot of PHP frameworks have been born with ActiveRecord implementations, scaffolding and so on. It makes you creep after watching yet another Blog development screencast in 15mins “using the best new framework”!

Not so long ago Zend Framework released a stable release and today I’ve spent my time at work watching screencasts and webinars to take a closer look at it.

And I LOVED IT :) Here’s why:

  • Whole framework is just one directory of classes that you don’t ever care about with no predefined application structure and design by default.
  • It stands behind a respectable and well known company ZEND that has a lot of to do with PHP.
  • It has an outstanding team of professional contributors with a lot of brain power and experience.
  • Lots of well developed components following actual design patterns.
  • 80% > unit test coverage
  • A useful documentation that most others are missing.
  • MVC components, controller plugins, helpers.
  • A possibility to develop a modular application where each module has it’s own views, controllers, models that can easily be removed by anyone in seconds while other frameworks force me to split MVC components to other directories and making it hard to separate from hundreds of others.
  • It does not have ActiveRecord and Scaffolding :)

Though there are some issues people might spot:

  • Zend_Controller_Helper_Abstract. Class names lack namespaces. Though there were no namespaces available while Zend Framework has been actively developed and does it really matter?
  • You need to understand a few design patterns and OOP to use full Zend framework’s potential. And that does not only requires time spent learning but also experience working with it.
  • It is big, it is heavy, it eats memory and it has a lot of includes. Though I usually tend to agree with the “hardware is cheaper than development” theory ..

All in all I find Zend Framework the best PHP framework there is. In the past I looked at CakePHP, symfony, code ignite. I’m going to give Zend Framework a try at work and implement a not so very important project with it. If it works out well I might start migrating all our frameworkless applications to it.

, , , , Hide



Fastest PHP template engine

Recently a colleague of mine found a PHP C extension Blitz used for templating.

Syntax looks a bit odd compared to Smarty but all in all super fast and a little crazy. I’ve also found a few template engine benchmarks to compare. Though benchmarks are still benchmarks and they sometimes tend to lie.

Over the years Smarty has became the standard PHP templating engine. It’s a bit rusty. But it’s clear syntax, plugin based system, template compilation is quite good for most cases.

I’ve also heard good things about DWOO. For it’s similarity to Smarty and OOP based approach.

, , Hide



Javascript Radio Group Value Tip Using Prototype

A simple tip how to find out radio group value with prototype:

var value;
Form.getInputs(this.form, 'radio').each( function(input) { if (input.checked) { value = input.value }; });

, , , Hide

Find it!

Theme Design by