-- Giorgio Sironi <[email protected]> wrote
(on Thursday, 12 February 2009, 10:35 PM +0100):
> 2009/2/12 A.J. Brown <[email protected]>
> 
> 
>     On Thu, Feb 12, 2009 at 12:37 PM, william0275 <[email protected]> wrote:
> 
> 
>         I mean, I sincerely hope
>         Zend Framework achieves recognition with big companies and big
>         projects, and
>         the way to start is by being very serious with your OOP design. You've
>         got
>         Java and .NET out there which is now very robust in term of OOP
>         framework.
> 
> 
>     I'm sure they'll gladly implement the changes if you open a ticket and
>     submit a patch.  You, after all, are one of those knowledgeable OOP people
>     that could fix the problem, and part of the Open Source process includes
>     providing your own contributions whenever possible :)
> 
> 
> IMHO patches can solve some local bugs or strange behavior (if you have a CLA
> signed), but the architecture of the framework cannot be adjusted by some
> random patches.
> For example, the Zend_Controller_Front class is a singleton, 
> and the use of
> singleton is widely spread across the framework; this makes testing a mess...
> Reset view helpers, session handlers that goes wild... But if
> Zend_Controller_Front were not a singleton, many classes would cease to work,
> because their design does not ask for dependencies from router, helpers, etc.
> but pulls them from front controller with a ::getInstance() call. To fix
> various action/view helpers and plugins is very difficult without a overall
> vision, because of the dependencies. 

This is an area we've already identified for the 2.0 release. Search for
"Zend_Controller 2.0" in the wiki for more details. We're aware of the
issue, and while the design seemed reasonable originally, we've noted
that the singleton has caused more issues than benefits. (Testing is one
-- but that has been largely solved at this point.)

That said, it's not a trivial undertaking at all to change, as it
requires dependency injection throughout the entire MVC stack -- which
will mean a lot of new paradigms in the code. 

Yes, this sort of thing cannot be done with a patch alone -- but the
earlier examples likely could -- and I welcome you to do so.

-- 
Matthew Weier O'Phinney
Software Architect       | [email protected]
Zend Framework           | http://framework.zend.com/

Reply via email to