Why ZF? WHy?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Why ZF? WHy?

Post 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.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Why ZF? WHy?

Post by VladSun »

I thought we all do this? What would be the alternative?
There are 10 types of people in this world, those who understand binary and those who don't
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Why ZF? WHy?

Post 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.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Re: Why ZF? WHy?

Post 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)
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Why ZF? WHy?

Post 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)
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Why ZF? WHy?

Post by alex.barylski »

I ask myself the the same thing every day: Why ZF...why... :P
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Why ZF? WHy?

Post by josh »

Most of their stuff is good, this is just a minor annoyance
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Why ZF? WHy?

Post 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
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Why ZF? WHy?

Post by josh »

Which parts of the router are over-engineered in your opinion?
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Why ZF? WHy?

Post 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
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Why ZF? WHy?

Post 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.
Post Reply