Few days ago I have launched a news & community website for Zend Framework developers – Zend Framework University. The goals is to create a community of PHP and Zend Framework developers helping each other, sharing their experiences and publishing news, tutorials and other articles about the framework.
If you ask why I have decided to create such page my answer is short and simple. Because there is no such website. I develop in Zend Framework since it’s early days, first official announcement and whenever I am looking for something about particular component my first step is manual, of course. And in most cases I don’t find answers there.
One might say that the manual should be better, but I can not fully agree. Manual is good enough to familiarize with Zend Framework and it’s components. If you want to dig into details, you won’t find much in the manual. Basically Zend Framework is top huge and too flexible to describe everything in the manual and keep it up to date.
Fortunately there are many interesting articles on the internet, very often published by author of particular component. I’ve found this, and browsing the source code, the best way to learn many interesting tricks about the framework. To share this knowledge, I’ve made Zend Framework University website.
The idea is to make it a community website, having not only one author. So if you think your have decent knowledge of Zend Framework and you would like to write something from time to time, join the community and contact with me to get Publisher privileges. Let’s promote Zend Framework together!
Last Friday Zend Framework team released new version of the framework, 1.9. It brings few new features and round 700 bugfixes. Since you can read official release note on devzone.zend.com, I will only comment things that are most interesting for me.
Most usefull and awaited by me is new component Zend_Test_PHPUnit_DB. I am big testing and quality assurance in general evangelist, so having another tool to simplify working with tests is what I like most. Since today I can drop my own classes adding database testing support to Zend_Test_PHPUnit_ControllerTestCase. No more hackery. With new database testing component you can setup database connection and state before each test in simple and clean manner. Actually in some cases you don’t have to even connect to database . You can instantiate DB Adapter that requires no database (Zend_Test_DbAdapter) and acts as SQL and result stack. Pretty handy.
Working with test data sets is much simplified comparing to original database test case form PHPUnit. You can use xml fixture files as initial data set as well, as expected results data set. The only thing I am missing is using multiple files to define initial data. I am used to having one fixture file per one table plus some special cases fixtures, like data for specific bug. It gives me greater control over data I use in tests, flexibility I need for complex applications. But it would not be Zend Framewok if you couldn’t do anything about it. Using PHPUnit I had to 3 new classes to do that and it was not so straight forward solution. Here I have simple to extend API. Looks like I’ll spend next few days on migrating tests I have in project I just begun.
Many people, including me, are very happy to see new component in Zend Framework, Zend_Queue. It’s name should stand for itself. It is common API for interacting with queues. Whether you are using some industry standard queues, like ActiveMQ or MemcacheQ, or you were always implementing your own (most people use database to queue some operations and data), Zend_Queue will be huge improvement in your work. If you don’t know how you could use it, image a situation where you have more task to perform than available resources at the moment. You can queue tasks and perform them one by one. Zend_Queue gives you such opportunity, and it can use different backend to store actual tasks (or rather messages).
Last but not least is support for plurals in Zend_Translate. I could not believe that initial version of Zend_Translate does not support plurals. It’s annoying enough that very popular internationalization and localization library, gettext, does not support gender inflection. In previous Zend Framework releases it did not support plurals too. Now it does. For me it means less trickery with translations.
There are much more changes in Zend Framework 1.9. Some of them might be more useful for some people, but these three give me immediate benefits. In each project I was involved in past few years we had some queues, tests using database and data sets and queues. And each time we were re-inventing the wheel. Thanks to new Zend Framework these features are simpler to implement now, flexible and we have common API.
Recently I took the lead of preparing Zend_Chart component proposal. The goal of Zend_Chart component is to provide flexible solution for drawing charts as a part of Zend Framework. It will support wide range of chart types as well as number of output types – regular images, SVG etc. Proposal development progress can be monitored at official Zend_Chart component proposal page. There is also unofficial wiki and repository for brainstorming. If you would like to help in component development and get access to brainstorming area please drop me a message. Up to date contact details are on Zend_Chart proposal page.