The Manager's primary advantage is to hold multiple configurations on tap in an 
easily accessible way. It's a middle road of sorts since caches are heavily 
context based.

It's easily adapted to lazy loading but then are we not entering DI territory 
anyway?

Paddy

Sent from my iPhone

On 15 Oct 2010, at 15:26, Jurian Sluiman <[email protected]> wrote:

> On Friday 15 Oct 2010 12:45:12 Matthew Weier O'Phinney wrote:
>> The design of Zend_Application was to initialize resources needed on
>> each request, plain and simple.
>> 
>> What you describe is more of a Service Container and/or DI Container.
>> You can actually use these _with_ Zend_Application to augment it -- a
>> number of folks have injected the Symfony DI Container into
>> Zend_Application in order to achieve similar results:
> 
> This is not completely true in the case of Zend_Cache_Manager. The manger is 
> accompanied by Zend_Application_Resource_Cachemanger and the behaviour could 
> also be copied to other resources.
> 
> Although the first advantage of the cache manager is not the lazy loading, it 
> is mentioned in the proposal as "second advantage". This principle could be 
> used for other resources like database and logs.
> 
> Regards, Jurian
> -- 
> Jurian Sluiman
> CTO Soflomo V.O.F.
> http://soflomo.com

Reply via email to