On Tue, Mar 20, 2012 at 8:48 AM, Matthew Weier O'Phinney
<matt...@zend.com> wrote:
> I've fielded a large number of requests
> from ZF1 users who would like the functionality for their ZF1
> applications -- no more, no less.

I appreciate that, but I'm still concerned that significant changes to
the Event system will cause disruptions to the ZF1 implementation. The
late pull request for the SharedEventManager could be one such
example.

Anyhow I realize its also about choice.....


>
> I actually haven't been discussing retrieving event listeners from the
> DIC at all -- I _have_ been discussing injecting a "SharedEventManager"
> into EventManager instances, so we don't need to use the singleton
> StaticEventManager version.

Well this is the first ML post mentioning the SharedEventManager, and
my comment was based off a comment you made in another thread:

http://zend-framework-community.634137.n4.nabble.com/ZF2-speed-td4414795i20.html#a4428769

I actually then stumbled on Symfony2's ContainerAwareEventDispatcher
which lazy loads listeners from the DIC.


> StaticEventManager follows the design of Zeta Components' SignalSlot
> more than any other implementation. The purpose is, quite simply, to
> allow attaching listeners without having direct access to the EM
> instance and/or component composing the EM instance. This is a
> well-defined use case at this time.

At the time I ran into some documentation which looked like Java code.
Either way, the documentation did not elaborate very much on the best
practices of the static usage - which is my concern and potentially
now why there is the Shared instance instead. I don't see jumping
around the object graph as good practice.

> Additionally, as explained before, there are no ties between DIC and the
> EventManager; the only question is if there's a way to alter the EM to
> be more DI friendly with regards to shared event collections. Since we
> have no DIC in ZF1 -- and no plans to backport it, as it relies much too
> heavily on PHP 5.3-specific features -- I see no conflict here.

Thats another discussion I think, I don't want to come off overly
incorrect or harsh, so I'd rather wait to see how the ZF2 Definitions
evolve - but that doesn't mean it is impossible for ZF1 to have a
Container of some form.



Regards,

Greg

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com


Reply via email to