Page 1 of 1

Why ZF? WHy?

Posted: Thu Dec 10, 2009 3:10 am
by josh
Why must Zend Framework use pipe characters to indicate multiple return types in doc blocks

@return Zend_View_Interface|SOme_Other_interface

I think they did it so only Zend Studio works well with it.

Re: Why ZF? WHy?

Posted: Thu Dec 10, 2009 7:45 am
by VladSun
I thought we all do this? What would be the alternative?

Re: Why ZF? WHy?

Posted: Thu Dec 10, 2009 1:53 pm
by josh
@param Zend_View | Whatever
not
@param Zend_View|Whatever

If they just put an extra space I could at least jump to Zend_View in my code complete

This way my code complete at least would show me "mixed" instead of me staring at the screen for 30 seconds trying to control click a method before I realize they broke my code complete. When this happened I finally "got" what they meant about zend studio + zf integration, for a while I was like, what IDE wouldn't be considered "integrated". I bet thats the integration though.

Re: Why ZF? WHy?

Posted: Thu Dec 10, 2009 2:46 pm
by daedalus__
hows zend framework doing these days? is it stable enough to use in production? i remember them breaking things every other update or so (i thought)

Re: Why ZF? WHy?

Posted: Thu Dec 10, 2009 3:33 pm
by josh
Never heard of them breaking stuff, last I heard its been 100% forwards compatible for over a year and a half. I include the head development revision in my svn:externals personally, so I get new code updates like every 20 minutes it seems like (sometimes just updates to the documentation)

Re: Why ZF? WHy?

Posted: Thu Dec 10, 2009 9:36 pm
by alex.barylski
I ask myself the the same thing every day: Why ZF...why... :P

Re: Why ZF? WHy?

Posted: Fri Dec 11, 2009 3:40 am
by josh
Most of their stuff is good, this is just a minor annoyance

Re: Why ZF? WHy?

Posted: Sat Dec 12, 2009 4:11 pm
by alex.barylski
Most of their stuff is good, this is just a minor annoyance
Admittedly it's a pretty stellar library of code. I use it more like a library for personal projects and the whole enchillda for professional projects for clients.

I have a serious concern about the controller architecture though, it's way over-engineered, routing requires a degree in rocket science and some assumptions made are just WTF. :P

But all in all Zend is pretty freakin awesome, especially when things "just work" and it saves me hours in my work day/week/month. :)

Cheers,
Alex

Re: Why ZF? WHy?

Posted: Sat Dec 12, 2009 4:38 pm
by josh
Which parts of the router are over-engineered in your opinion?

Re: Why ZF? WHy?

Posted: Sun Dec 13, 2009 1:40 pm
by alex.barylski
Not just the router, but the entire controller architecture. The API for the front controller, action controllers, routing & dispatching...my own controller architecture is implemented in the fraction of the code and far simpler API with way less indirection but I achieve the same amount of flexibility and decoupling. Relying strictly on autoloading really helped simplify the design as there was no need to manage controller directories, etc.

The only thing Zend offers which I might not have implemented, is action chaining, which until last Friday I never had a need to implement. That might add a bit more code to my controller sub-system.

The default dependencies and configurations complicate things too IMO, like the error handler, view renderer, request object, etc.

My own implementation favors a DI approach, so as a client developer I am required to instantiate the router, etc and provide the wiring. Any of the assumptions Zend makes do not exist, most choices are left to the client developer, which simplifies my job when designing the framework.

http://framework.zend.com/manual/en/fig ... basics.png

That diagram is crazy... :p

Cheers,
Alex

Re: Why ZF? WHy?

Posted: Sun Dec 13, 2009 3:56 pm
by josh
I don't think so, I "got" the framework right away when I saw that framework. It made me finally realize the power of "hooks" and get why AOP is all the rage these days. Can I look at your framework though?

But yeah I wouldn't consider LOC of a good heuristic in any way, also can you honestly say your framework does *everything* ZF does? The error controller is one of the neater ideas that came from Zend IMO, and its only a 20 line or so controller plugin (which you don't have to use). I think its great for handling 404 errors and permission denied type stuff.