I asked this question on zfforums, but maybe I will get an answer here.
So, the Zend Framework is a versatile, flexible, loosely coupled high-quality infrastructure. However, I find some parts of MVC inconsistent and overly complex. Hopefully some of you can justify some zf design decisions and answer some questions:
General questions / comments
Why doesn't zend mvc obey the same naming conventions as other zend components? For example, mvc uses lower case, multiple directory names and class names do not have a prefix with directory information, so they cannot be easily downloaded.
I would like to add the root directory of the module. This way, I would not need to explicitly configure the dispatcher by adding controller / module directories. I could go into the module and get it right away.
Why is there a difference between view and action helpers? Helpers are not currently intended for code sharing, and there are inconsistent methods for loading and accessing helpers. Other frameworks allow you to use the same helpers anywhere in your code. I do not see the need to specialize and violate DRY.
Questions about Zend View
Why do views use "$ this" to access resources? I do not see the need for additional typing. Some other frameworks extract () an array of view variables and allow you to load global functions or autoload static helpers from a view: myHelper :: someMethod ();
Why do viewers allow only one function for each class? This leads to many classes and related maintenance. I would prefer static classes with any number of methods, as already mentioned.
source
share