OT: A Bit Wet

21st July 2007

An off topic post for this blog, but I thought I should mention that it was a bit wet yesterday and it took me 4 hours to do my usual 30 min commute from work back to home!

A couple of pictures show it better:

Just after I'd left work:
Just left work

Joining the M50:
Joining the M50 at J2

I got home easily enough - mainly it was a case of taking it easy which wasn't difficult as the traffic was very slow!

Today we stayed in…

Russian and Polish Zend Framework Tutorial

21st July 2007

A couple of new translations of my Zend Framework tutorial have crossed my desk in the last week.

Kubek Bartosz has very kindly created a new up to date Polish version of my Zend Framework tutorial.

Alex Musayev has created a Russian translation too.

I say this a lot, but I really am still amazed that people think that my little tutorial is worth the effort of translating.

Thank you very much guys. I'm sure that you will have helped some of your fellow PHPers understand ZF a little bit better.

Two-Step view in Zend Framework 1.0.0

11th July 2007

Paulo Nei wrote an email to fw-general which is, I suspect a very common issue that people are going to run into:


Hi,

I wanna put header & footer in all view templates.

But with ZF I don't got an easy way to do it


At the moment, the Zend Framework doesn't have an "officially blessed" solution, so there are multiple approaches being used:

1. Front Controller plug-in.
http://www.nabble.com/Controller-and-View-Question-tf3462561.html

2. Zend_Layout proposal.
http://framework.zend.com/wiki/display/ZFPROP/Zend_Layout

3. Zend_View Enhanced proposal.
http://framework.zend.com/wiki/pages/viewpage.action?pageId=33071

4. Extend ViewRenderer directly.
http://akrabat.com/2007/06/02/extending-viewrenderer-for-layouts/

The wiki is down again, so I could have got the links to 2 and 3 wrong!

At the moment, I'm using (4) as it's simple. It does introduce problems if you want to use _forward() though, so if you are an _forward() person, then 1, 2 or 3 are better choices.

Update (04/Sep/2007): Also: http://www.spotsec.com/blogs/archive/the-basics-of-zend_layout-ahem-xend_layout.html

Zend Framework 1.0 Released

2nd July 2007

No doubt everyone who reads this blog already knows that Zend Framework 1.0 has been released.

My code contribution isn't very large, but I am nevertheless very happy that Zend_Config "just works" for loading and reading configuration data.

The MVC system within Zend Framework has come on by leaps and bounds since the first public release and is now flexible, robust and easy to use. One part of the MVC jigsaw that is missing is an "official" way to do two-step or layout views using multiple templates to make up the final page. This isn't a show-stopper, as it's easy enough to roll your own or adopt the Padraic's "Zend_View Enhanced" or Ralph's "Zend_Layout". Similarly, within the DB layer, further work is required on allowing more flexibility when selecting "dependant" data, especially to allow sorting and filtering. Bill has promised to look at this post 1.0 too :)

All in all, a very exciting time if you use Zend Framework and if you don't now is a good time to consider using it!