Looking For More From Zend Framework
After about a month of working with the Zend Framework I'm a little... bored with it. If this is what working with a framework is like I don't want it (thank you very much). I, naively, thought using a framework would increase my productivity and highlight some of the joy I feel when developing and learning but, so far, all I have is frustration and a pretty heavy headache.
Yup. Zend Framework has made my head hurt.
It's not like there's not a lot to love about it; Zend Framework really has the makings of the perfect offering. There's a really easy sample app walk through for newbies to become familiar with the program. The documentation is suberb and includes code samples of most class methods. Best of all: there's a bunch of sites out there with examples how to do pretty much everything I could think of with the framework (this was also one of the issues; more on that in a minute).
All that made me feel pretty encouraged and optimistic about Zend Framework when I initially decided on using it. Everything was going along smoothly for a while too; I had gotten past the ZF_Tool issues, introduction to Zend_Application and even developed a couple, basic CRUD, modules which gave me a good grounding in how the layout and structure of Zend Framework... ahem... worked.
Then, I got into the Auth functionality.
First, a few details about what I was trying to build:
This was to be a basic web app with member signup, login, forgot password, contact page (with form). I wanted to build a permission system using Zend_ACL and Zend_Auth and I needed to have complete control over form layouts. (I'm planning on building a full web framework base to help me when building my client sites. This was just to get up to speed with the Zend Framework.)
Anyway, yeah, once I started in on the Auth functionality everything came to a grinding halt. It looks like Zend changed how the Auth functionality works right around the time I got into the framework so all the tutorials and examples I found online were outdated and no longer applicable. The Zend documentation was up to date, which was nice, but I got so turned around from reading the wrong information that the documentation didn't help. Like, at all.
Let me touch on that point for a minute; Zend changed how the Auth component of the framework worked around version 1.8. There were all sorts of tutorials and example code out online, and some even on Zend itself, but Zend essentially made all of them obsolete through a minor update release.
It's not like this was a 1.0 to 2.0 release. This was a 1.7 to 1.8 release. It's always been my understanding and experience that you don't want to make large, sweeping, changes like that for a minor release.
Fuck, just think of all the code that had to be rewritten so the program would work with the latest version of the framework. Must have pissed off a bunch of people...
I struggled with the Auth functionality for a couple days. A couple full and long days. Understand, I'm not new; it's been a while since I've had any issue with php.
So, I did the only reasonable thing; I walked away. Not from the framework or the project, just the part I was working on. I decided to tackle the issue of form layout. Remember, I needed to have complete control over how the forms were structured. This, too, was an exercise in patience in frustration. This time it was all me just not knowing something; I eventually found my answer on Stack Overflow.
But, as I was working on the form question I noticed I wasn't having much fun working with the framework. This led me to give serious thought to my choice of Zend Framework. Why was it so popular? What was I missing? Why didn't I get that "joy!" everyone kept talking about when working with it? Hell, why was I even using it?
I don't think I did enough research. This is definitely my fault; I should have done more research into my options and try to find something I enjoyed working with instead of the one that was more compelling. Besides, I can still use individual Zend Framework components without using the framework as the core.
Looking at my alternatives I think my best options are going to be either Symphony, CakePHP or even CodeIgniter. I had used CakePHP a couple years ago and wasn't even a little impressed. This probably had more to do with my reluctance to use a framework than anything else. I hate to say it, because it's kind of a trite argument, but at the time a framework to me was a directory structure with a couple helper classes. I was not impressed.
The point is that I have to do some serious research and testing now. I have to put a critical eye on all those frameworks (even Cake; 2 years is a long time) and find the one that allows me the most control and gives me the most pleasure to work with. Something I should have done anyway.