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.

Looking For More Than Just Zend Framework

Looking For More Than Just Zend Framework

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.

Bookmark and Share

Related Posts

4 Comments

  1. hanadaddy says:

    Thanks for sharing your experience. Once I had studied the Zend framework but have given up due to its complexity. I guess people are using or trying to learn Zend framework because it was created and maintained by Zend. Isn’t it something like people trying to get Java certification from Sun? Zend is considered to be authoritative when it comes to PHP.

  2. dave says:

    Th problem I see with the zend framework is it tries to do everything when it should only really do certain things. Do you really need a class to render a form element? A framework should not be how someone makes a program but to facilitate making the program easier.

    • Eric Lamb says:

      Hi dave,

      At the moment (my position seems to be changing daily) I think the problem is that ZF is too abstract and complicated for what it’s trying to do.

      I understand that abstraction is good and objects are a tried and true concept but sometimes it seems like there’s abstraction for abstractions sake. Some of the modules (gData for example) have over a hundred files which just makes working with it a complicated pain. From my high and might podium it seems wasteful and more an exercise in standards than practical implementation.

      As a side note; I actually like having classes for my forms. I do think it’s ridiculous to have a class for EVERY element of a form but I do like having the form nonsense handled. Personally, I really like HTML_QuickForm over Zend_Form but Zend_Form is the new and shiny unkown while I’ve been working with HTML_QuickForm for years so I’m a little biased.

  3. David Joly says:

    Hi Eric,

    I just started programming again with PHP in April 09 after a five-year programming hiatus (don’t ask). PHP for the most part is stupid easy. Making simple applications are a piece of cake. However, I believe that the complex applications benefit tremendously from the Zend_Application MVC structure. I have been playing with Zend 1.8 and 1.9 since May and still have a ton to learn. I agree with you that it does appear to abstract things for abstractions sake. I remember reading through some of the terse documentation that an understanding of the underlying working of the MVC were unnecessary. Not true. The documentation is minimal at best. That leaves neophytes like myself the task of doing whatever it takes to learn what the heck is going on. I have had to read through code multiple times to see what was happening myself simply because the documentation was so terse. Thankfully, I can actually use the framework now and should have a few nice site to show employers in a few months. Given time, I think the framework will grow into a much easier-to-use and well-documented solution.

    I would say that the lack of documentation and complexity of the Framework is actually an opportunity for the programmers willing to take the time and learn it. Zend Certified Engineer anyone?

Leave a Reply