Make the DispatcherInterface standalone

61 views
Skip to first unread message

George Wilson

unread,
May 31, 2014, 10:17:07 AM5/31/14
to joomla-dev...@googlegroups.com
So last night I was looking at the session package dependency on the event package (because currently application loads session which loads event)

And I realised all that was actually needed was an instance of the dispatcher interface (hence PR: https://github.com/joomla-framework/session/pull/6). However it got me thinking that actually all we need there is the interface for dispatcher and also the same in the application if we wanted to go back to triggering events there (I know we removed it - but just say for the sake of argument).

So I want to propose that we make the DispatcherInterface into a standalone repo. It means if any repo we want to trigger an event all we need is the interface and we don't need to pull in the full package. It also makes it supereasy for anyone downstream who wants to replace the Joomla events package with their own custom events package to create something that implements said package without having to import a full extra set of classes they have intention of using. It's also a massive +1 for inter-operability in my opinion

Kind Regards,
George

Don Gilbert

unread,
May 31, 2014, 8:29:30 PM5/31/14
to joomla-dev...@googlegroups.com
It would require more than the interface to be truly interoperable, especially if we're TypeHinting a required parameter. It would be good to have like a NullDispatcher be the default if one isn't injected, that way we get the flexibility and everything but also provide a dummy concrete implementation.

For more info on this, just google Null Object pattern. 

Sent from my iPhone
--
Framework source code: https://github.com/joomla/joomla-framework
Visit http://developer.joomla.org for more information about developing with Joomla!
---
You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-frame...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-framework.

George Wilson

unread,
Jun 1, 2014, 1:19:29 PM6/1/14
to joomla-dev...@googlegroups.com
Yeah I built this https://github.com/joomla-framework/event/pull/2 based on the NullLogger implementation in PSR3. What do you think?

Kind Regards,
George
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-framework+unsub...@googlegroups.com.

Don Gilbert

unread,
Jun 1, 2014, 4:49:26 PM6/1/14
to joomla-dev...@googlegroups.com
I commented on the pr. 

Sent from my iPhone
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-frame...@googlegroups.com.

George Wilson

unread,
Jun 1, 2014, 8:33:42 PM6/1/14
to joomla-dev...@googlegroups.com
Thanks for reviewing it so fast :) Doc block change made

Kind Regards,
George

George Wilson

unread,
Aug 25, 2014, 11:18:44 AM8/25/14
to joomla-dev...@googlegroups.com
Any updates on this? Even if it's just committing it to a 2.x branch or whatever?

Kind Regards,
George
Reply all
Reply to author
Forward
0 new messages