Page 2 of 2

Re: Zend front controller and getInstance()

Posted: Mon Feb 23, 2009 3:47 pm
by Christopher
Theory? wrote:How does Skeleton handle it by default?
1) Everything accessed via the Registry, 2) there is a separate class that holds/calculates the paths and names for Actions, etc. to use (so no dependency on the FC object at all), and 3) the Registry object is injected into Action constructors/methods so no static calls required. It makes it lighter and everything replaceable, but that is it own set of design trade-offs -- hence the arguments about the lack of concrete interfaces, etc. You just can't win design discussions. ;)

Re: Zend front controller and getInstance()

Posted: Mon Feb 23, 2009 6:20 pm
by josh
arborint wrote:. You just can't win design discussions. ;)
Exactly, I could argue that its so simple to replace the static call in the ZF context with an object registry, its the temptation static calls gives you to design bad that is the danger, you've just gone out of your way to do what most are too lazy to do. Even so the FC should still be a singleton, not a Singleton tho ( or the other way around, you get my point ). http://www.thekua.com/atwork/2009/01/si ... -instance/ sums it up concisely