Frameworks
Over the years I’ve written a number of web applications basically from scratch. I almost always use PEAR and other libraries, but for the most part I’ve always used my own code as the basic framework. Last year I started building a number of modules for Drupal, including some that automate business processes (such as inventory and producing PDF documents for brochures based on live business data). This is convenient because these modules fit nicely into larger intranet type sites for the organizations that use them. But Drupal isn’t really designed to be an application framework. Since it isn’t intended to be that, they apparently feel free to completely redesign key parts of the API between versions, which really makes upgrading expensive.
So more recently I’ve been looking again at a couple of the frameworks that are available for PHP, this time Solar and Zend Framework. I’ve looked at these before, along with Cake. I didn’t care for Cake, and ZF and Solar weren’t ready yet last time I looked.
Solar and ZF are much closer to ready for real use now than they were last time I looked closely at them. Over the weekend I built a few simple prototype level things from both Solar and ZF. The short of it is that I really like Solar. It is very easy, and I found it very intuitive. I shouldn’t be surprised, Paul M Jones has a history of writing good stuff. I had a site running in very short order with Solar.
I think that the main problem with Solar is the size of the community. I need a number of the features that Zend Framework provides, but aren’t available for Solar yet, like SOAP, XMLRPC, RSS, support for MS SQL server connections (I’d rather not need that, but I do), and others. I could write them for Solar, but most of what I need is already available from ZF.
Zend Framework doesn’t have the conceptual consistency and elegance of Solar, and I’m having a hard time piecing together the bits of it that I need. Its sort of like building your own Linux from scratch, maybe something every Linux geek should do at least a couple of times but not something you want to do when all you need is a working computer to get stuff done. When you just need to get work done you want a Ubuntu or OpenSuse to package it for you so you can just get to work.
In the end, ZF is more like PEAR on steroids than it is the framework I want to save me time in piecing something together. Still, I think its the closest to what I need, and it has the momentum and support behind it to have a rosier future. So I guess the best approach would be to build my own blank application from the pieces I will commonly use, with all of the components I commonly will need bundled in already, and archive that as an application template.
Or maybe I’ll try Solar some more.
Or maybe I’ll just keep cooking my own.
You may already be aware of this, but as one of the original developers of ZF, Paul has had some influence over the direction ZF has taken. It’s not so surprising, then, that Zend Framework and Solar are similar in many ways.
I’m wondering if you really have to choose between the two, however. Certainly Solar and ZF components play well together, and I don’t see any reason you can’t take the best components from each. I understand that this setup might not provide the consistency of code that you find in Solar, but that’s one area that we hope to address in 2.0 on the ZF side and we’ll definitely be looking at Paul’s work to see what has served Solar well.
If you do try integrating the two together for any project, I’d love to hear about your experiences.
,Wil