Dippy the Dispatcher

36 views
Skip to first unread message

Gary Mort

unread,
Dec 21, 2012, 12:00:59 PM12/21/12
to joomla-de...@googlegroups.com
To give my brain a break from codespace, I wrote up a quick little humorous[at least I find it a little funny] description of how the Joomla Plugin system works in story format, starring Dippy the Dispatcher - an unpaid intern at a local branch of OSM International.

Instead of using code, I discuss how the system works by pretending instead that it is being used by real people at an office to handle incoming calls and visitors to the building.  It's a fun little jaunt[at least it was fun for me]


Note: My site is a work in progress...at the moment I'm playing around with various defconf extensions for google analytics, so there are cookies for analytics and stuff on the site.

Donald Gilbert

unread,
Dec 21, 2012, 12:10:35 PM12/21/12
to joomla-de...@googlegroups.com
Bookmarked for when I have more time during vacation - looks interesting!


--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/kc5iIhLHq_wJ.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

Glenn Arkell

unread,
Dec 21, 2012, 3:16:29 PM12/21/12
to joomla-de...@googlegroups.com
Very entertaining... well done.

Samuel Moffatt

unread,
Dec 22, 2012, 12:45:16 AM12/22/12
to Joomla! General Development
I don't think your section on "Does not photocopy" is an entirely
correct statement about the Joomla plugin system. While there is a
chain of command pattern in some places (the authentication system)
which was specifically designed to both facilitate altering the
original message and breaking out early, JDispatcher does not use that
pattern and in it's design doesn't take an opinion on the matter. It
really actually depends on the calling class and how it constructed
the arguments. If an object is being passed around then it will be
capable of being modified and this will be passed along, however if an
array of primitives is being passed then I don't see how these could
be altered.

Apart from that an interesting way of re-casting the system in
hopefully more familiar terms.

Cheers,

Sam

Niv Froehlich

unread,
Dec 22, 2012, 12:32:51 PM12/22/12
to joomla-de...@googlegroups.com
love the idea of it!!!!!

what a great way to teach and learn ;-)

"The Dubious Adventures of Dippy the Dispatcher and his Posse in the Land of Joomla!" or something like that could take a beginner all the way through Joomla, conceptually, focusing on job functions, purposes etc. 

you ever publish it, mark me down as a buyer :-)

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.

Gary Mort

unread,
Dec 22, 2012, 7:32:44 PM12/22/12
to joomla-de...@googlegroups.com


On Saturday, December 22, 2012 12:45:16 AM UTC-5, Samuel Moffatt wrote:
I don't think your section on "Does not photocopy" is an entirely
correct statement about the Joomla plugin system.


You could be right, I have not made a full survey of every possible CMS event to check whether any of them use primitives as well as objects.

I know I personally have gotten bitten by things like trying to replace the content in a content plugin with some new content - building it all up in a temp variable and then doing a swap at the end:
$content = $newcontent

Only to have it be ignored because you have to replace the data IN $content in order for it to be brought back out.

I'll make sure to review plugins a bit more now that I've got my profile plugin ready for preview...  The last bit of pain was setting up a method to dynamically regenerate the defines.php file in the root directory so that it doesn't get destroyed - just augmented - and then packaging up 2 plugins and 2 libraries into 1 install...  it seemed to work locally - but something broke when I uploded it to my test server - so once I figure out what is breaking I can release it and move on to more fun with Joomla Plugins.

Sam Moffatt

unread,
Dec 22, 2012, 10:15:47 PM12/22/12
to joomla-de...@googlegroups.com
It's one of those YMMV things. I know the onUserLogin casts the object to an array which makes it impossible to change later. As I said, it depends on what how it is called.

Cheers,

Sam

--
Sam Moffatt
Note: I'm not at my desk, responses may be delayed
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/CvFVQ36QBvAJ.
Reply all
Reply to author
Forward
0 new messages