You have probably heard about a PHP framework called Zend Framework. If you haven’t, you break my heart.
It is the coolest thing on the block. Already it has been around for a couple of years and has proven its value in almost all enterprise applications World Wide. Some use it as a component library, others use the full stack MVC implementation. If you still not know what I am talking about you have probably booked a one way ticket to the moon and lost all connectivity (despite your smartphone).
What is more is that Zend Framework will be releasing a 2.0 version in the first half of next year (2011). That means within a few months. You will need some guidance because the changes are huge! A complete new MVC implementation, autoloading and plugin broker system, namespaces, Exception handling, backward compatibility breaks and so on. Well, that guidance will be available with a book that will be published shortly after the version 2.0 release.
I proudly present to you the “Zend Framework 2.0 Cookbook”
You will be able to pick it up at all major bookstores near you and of course on Amazon.
The book is being written by me in close relationship with some high key Zend Framework profiles. Every one of us contributes and takes a very close look at the 2.0 framework which should make it THE reference for the 2.0 branch.
Because it is a cookbook it is more targeted to the developer who wants to know how to get something done quickly instead of building an entire application before actually understanding it. You can use it to start
building a ZF application but the target is the developer who already has some knowledge with version 1 and wants to know how to do it in zf2. It tries to fill the gaps in the official documentation and thus works closely
together with that resource. Providing a quick reference and plenty of example codes should help the beginning zf developer as well as the more advanced.
If you want to keep updated on the release of this book, follow me on Twitter, Facebook or this blog.
Soon I will start to publish short tips from the book, already helping you to better understand Zend Framework 2.0
Have fun with Zend Framework 2.0, its release is closer than you think,
On Thursday June 11th 2009 I attended a workshop on the very (dare I say the most) popular PHP framework: Zend Framework (ZF).
I will share my experience in this entry and try to give you a quick overview on the tips I found most interesting.
If you follow Matthew Weier O’phinney’s blog and career you already know he is a real authority in his field. Today it is the Zend Framework. As the project leader at Zend Technologies, he is doing development and coaching his team towards an ever expanding and more stable framework. The workshop itself was not really a workshop at all but an extended presentation lapping several hours. This means that during this presentation no real hands-on coding was done by the attendees.
Matthew gave a high level presentation on the most common (and some new) components. Whenever an attendee had a question he was more than willing to explain it to a deeper detail. This makes him very
approachable and someone who is eager to help.
Matthew discussed the new components Zend_Application and Zend_Tool. Both new in Zend Framework 1.8 and both seem to offer when understood completely an entire new user experience on how you setup your ZF projects. Zend_Application offers you a way to do bootstrapping on a more uniform way and Zend_Tool offers you tools to do the scaffolding for you. If you want more info on both of them please visit the official documentation or take a look at the presentation which I included at the end of this entry. Of course Zend_Auth and Zend_Acl were also discussed and in such a matter that it deviated from the way it was best practice in ZF 1.6 as described in the marvelous Zend Framework In Action book by Rob Allen. If you do not yet own this book hop over to Rob Allens webpage, Amazon or wherever you can get your hands on it. At the moment it is still one of the best books about ZF and offers some very valuable tips on the subject. The deviation illustrates that a framework like every other piece of code is organic and has the tendency to lead its own life. Which is actually a good thing, “grow or die” remember?
One of the main tips I got from the presentation was the use of the DAO (Data Access Object) principle.
Instead of adding your data access directly into your model you should add a DAO as a layer between your model and data resource (database, xml, csv, …). This way if you want to switch from a database to a webservice (think of scalability), you do not have to rewrite every single model but only the DAOs. If you want to know more about scalability I will be doing an entry on this based on the incredible presentation done by Eli White, PHP Community Manager & DevZone Editor-in-Chief at Zend Technologies.
Zend_Form was also covered and Matthew explained that it would be in the project it’s best interest to set the decorators in the view instead of the controllers/models. Decorators are a part of the display and thus should be handled in the view. He showed a practical example of how to style and display form elements separately in the view instead of doing the <?php echo $this->form; ?>. This is done by simply accessing the form element through the properties of the form. <?php echo $this->form->username; ?>
Of course other useful tips were shared in this presentation and I stronlgly encourage you to attend one of these whenever and wherever you have the chance to attend one. Because of the purpose of this entry I am not going any deeper into the subject. You can find Matthews presentation online .
I hoped you enjoyed reading this entry as much as I wrote it. I surely would recommend adopting a framework to your skills. ZF is a smart choice and the community is very very strong. In todays world if you do not know one or 2 of the major players out there like ZF or Symfony you are sure to run into trouble sooner or later regarding employment. For a more direct access to the community attend workshops like the one I just described or visit the #zftalk irc channel on irc.freenode.net
But I have something important to tell the PHP community. Upcoming Saturday 08 November 2008 it is Bug hunting day. This BHD is organized by phpBelgium and phpGG, and sponsored by Zend, iBuildings and ServerGrove. If you would like to learn more about Zend Framework this is the day to do it. As this is the framework that will be worked on that day.
This makes it a great opportunity for beginners and experts in the field to sharpen their skills. Everybody has used a program that had bugs and those were very annoying. You hoped those would be fixed in the next release. Well we are going to open up Zend Framework and look at all the bugs that were committed to Zend and try to solve them. This means digging into the code and learning how everything works from the inside out. What a great opportunity!! We always need pratical uses to make studying pleasant and this is surely one of them. So take out your agenda and reserve this Saturday for a trip to Hotel de Goderie at Roosendaal between 11:00h and 17:00h. You would not only work on your favorite framework but also help the community.
It is free so please confirm your participation at Upcoming or at the website of phpBelgium or phpGG.
What to bring:
Money or a prepared lunch as this is not included in the day for people who have not registered. It has been provided by the Sponsors.
Another PHP Enthusiast
I will be joining this day, so I hope to see you then.
Today I am gonna introduce you to the wonders of SlideShare
SlideShare is the world’s largest community for sharing presentations & slideshows. You can upload your PowerPoint, OpenOffice, Keynote or PDF files, tag them, embed them into your blog or website, browse others’ presentations, and comment on individual slides.
It offers endless possibilities. You ever wanted to give presentations, seminars, stand in front of a class or just put whatever you know online? Well it can.
And because the community is so big, you can find lots and lots of easy to read and follow presentations. The other day one of my dear friends Michelangelo van Dam put a slideshow online giving an introduction to a great feature of Zend Framework: Zend_Form.
It goes in depth on how to automatically create a registration, login and reset password form by the use of one xml file. I know I will be using this feature on my upcoming website. The flexibility and the ease of implementation had me stunned.
If you haven’t clicked through to the slide, I suggest you do it now!