[zendframework] Is ZF becoming too insanely complicated?
Michael Hernandez
mhernandez at techally.com
Fri May 15 11:31:50 EDT 2009
On Fri, 2009-05-15 at 11:11 -0400, David Mintz wrote:
>
>
> On Fri, May 15, 2009 at 10:00 AM, Michael Hernandez
> <mhernandez at techally.com> wrote:
> On Fri, 2009-05-15 at 09:34 -0400, David Mintz wrote:
> > (Just wondering.)
> >
> > --
>
> [...]
>
> What's got you going crazy?
>
>
> Well, the complexity. Maybe I am trying to hard to follow the official
> list. Since 1.8 I see a bazillion messages with people confused about
> autoloading this and bootstrapping that... I myself am just starting
> to play with a multi-module app and Zend_Application in 1.8.1 and it
> took me considerable research and tweaking to get it going.
<snip>
The autoloader changed a bit with 1.8 so that did cause some confusion.
When you used to be able to say:
require_once "Zend/Loader.php";
Zend_Loader::registerAutoload();
Now you have to...
require_once 'Zend/Loader/Autoloader.php';
$loader = Zend_Loader_Autoloader::getInstance();
And then register your namespaces with calls to registerNamespace()
It's a minor code change really, and it's worth it especially
considering the increased flexibility of the new autoloader, but if you
have a <1.8 app and you try to run it with 1.8 library code, you get
yelled at. Actually in 1.8.0 you got yelled at too much so they scaled
it back to 1 warning in 1.8.1.
Now as for Zend_Tool and Zend_Application... totally not necessary, and
in fact I found that after looking at the docs for those, I could spend
X amount of time trying to grok those new additions, or I could leave my
application-in-progress as is, and continue work as I was before. Right
now I am revamping my ACL, and I really don't have time to consider
redoing the way my app bootstraps, or learning how to make Zend_Tool
write code for me.
As far as I can tell, the parts you aren't so happy about are Zend_Tool
and Zend_Application... the framework itself hasn't gotten more complex
really. It's just got a couple of brand new components that (in my case
anyway) would make my job harder and not easier (easier work... isn't
that the point of the framework anyway? haha).
FWIW, your application bootstrap might not need to be complex and object
oriented like Zend_Application. In fact, my bootstrapping is done in a
few lines, to load my config file and set up the auto loader, that's
pretty much it. Aside from my main application I have a ZF XML-RPC
server and that entire thing including the bootstrap (but not including
the class containing the actual methods that are called) is about 15-20
lines. Sure, it's not the most flexible bootstrapping, but it works and
there's no reason for me to change it right now - Zend_Application
being released is definitely not a reason for me to break everything by
trying to shoehorn it in :)
Don't get caught up in the hype of new components, and the framework's
benefits will shine through.
--Mike H
PS it's great to see some traffic on this SIG list :)
More information about the zendframework
mailing list