[geeklog-devtalk] geeklog-devel digest, Vol 1 #217 - 5 msgs
geeklog-devel-request at lists.geeklog.net
geeklog-devel-request at lists.geeklog.net
Sat Nov 1 13:00:10 EST 2003
Send geeklog-devel mailing list submissions to
geeklog-devel at lists.geeklog.net
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.geeklog.net/listinfo/geeklog-devel
or, via email, send a message with subject or body 'help' to
geeklog-devel-request at lists.geeklog.net
You can reach the person managing the list at
geeklog-devel-admin at lists.geeklog.net
When replying, please edit your Subject line so it is more specific
than "Re: Contents of geeklog-devel digest..."
Today's Topics:
1. Re: Quick overview of GL2 and what we have so far
and how it relates to the API (Vincent Furia)
2. Re: Quick overview of GL2 and what we have so far and how it relates to the API (Blaine Lang)
3. Re: Quick overview of GL2 and what we have so far
and how it relates to the API (Tony Bibbs)
--__--__--
Message: 1
Date: Fri, 31 Oct 2003 11:43:34 -0800
From: Vincent Furia <vmf at abtech.org>
To: geeklog-devel at lists.geeklog.net
Subject: Re: [geeklog-devel] Quick overview of GL2 and what we have so far
and how it relates to the API
Reply-To: geeklog-devel at lists.geeklog.net
A couple comments I wanted to add about plugins and other GL2 stuff.
First, I think that we should consider making some of the 'core'
functionality into plugins instead. Specifically I'm referring to the
comment engine, the (potential) ratings engine, and the messaging system
(maybe even the logging system?). This would allow users to replace the
functionality provided by these plugins. A good example of this might
be replacing a standard comment system with a forum-like comment
system. I think doing so would give GL2 even more flexibility.
I know Tony didn't mean the core feautre list to be exhaustive, but one
item I didn't see (but would like to see) was a configuration utility.
I think, with GL2, we should get away from forcing GL administrators
from editing config.php by hand and move to a fully web based
configuration utility that can be used by the plugins as well being used
for core feautres.
On that subject I think it's time to start putting together a document
that shows what core functionality GL2 will provide and any information
we have on how it will provide that. Something like a design document.
It's something that I'd be willing to work on, but I'd need a lot of
information and support, especially from Tony. Maybe this is something
that would best be done in a Wiki format?
Finally, I have a few comments about event handling system and a few
comments on plugins in general. If we do this well, and efficiently, we
could have a really flexible, extensible system that will beat out every
other open source system I've seen. For that reason I think its
important to focus, briefly on how the plugin event calls might work in
GL2. This is just a rough idea, and I'd really like to see input on
what you all think of this.
Each plugin should be able to register the fact it wants to be called
when certain events occur:
registerEventCallback(plugin registering callback, plugin raising
event, event)
Then, a plugin can notify GL2 that event has occurred with:
raiseEvent(plugin raising event, event, parameters) // parameters:
array of values
Upon being notified that an event occurred, GL2 can call the plugin API
for all plugins registered to recieve the event:
onEvent(plugin raising event, event, parameters)
Also plugins need to be able to invoke an event/function in another plugin:
invokeEvent(plugin providing function, event, parameters)
I'm still thinking about possible ways raiseEvent and invokeEvent can
handle returned values. One possibility, at least for invokeEvent, is
the functions could be required to return a small object containing
status (-1, failure; 0, plugin function not found; 1, success; etc.) and
the results of the call:
$P = invokeEvent(plugin, event, parameters);
if ($P->status > 0) {
echo $P->result;
}
Of course all this leads to a question if we should have a severely
simplified API where even core functionality such as the moderation
fuctions, comment functions, etc should all be called through this event
API (with a plugin name = 'core'). One advantage to doing it this way
would allow us to extend plugin functionality in later releases without
affecting the plugin API (which would prevent plugin obsolesence to an
extent).
Another issue I think we should start talking about is plugin
dependency, and how to handle it gracefully. Obviously plugins will
support, to one extent or another, the use of other plugins. This could
run the gambit from a plugin being dependent on another plugin to work,
to a plugin using another plugin in a non dependent way (i.e. the plugin
isn't required for operation, just for extended functionality).
I think that is more than enough to digest in one sitting. If anyone
would like to chat with me I'll try to be available in #geeklog. Of
couse, email discourse is always welcome as well.
-Vinny
Who is already having fun...
--__--__--
Message: 2
From: "Blaine Lang" <geeklog at langfamily.ca>
To: <geeklog-devel at lists.geeklog.net>
Subject: Re: [geeklog-devel] Quick overview of GL2 and what we have so far and how it relates to the API
Date: Fri, 31 Oct 2003 16:34:25 -0500
Reply-To: geeklog-devel at lists.geeklog.net
Vincent,
I've just been reading up on the PostNuke API as I have a module that I need
to develop for a client. This is not Nuke but a totally separate development
effort (for those that are not aware). A lot of what you raise was raising
the same ideas for me as I was reading their module developer and API
documents.
http://noc.postnuke.com/docman/view.php/5/10/pnAPI.htm
Their API is still in development but already has some of the ideas you
presented.
There are a lot of other API's here that we use COM functions or Globals
for. In GL2, we will not be relying on globals so there will be a need for
some of these API or functions to be exposed.
I expect GL2 will be if not 100% OO - very close and I believe PostNuke (
next step for me is to look at their code) is all OO. So this API reference
may be helpfull.
http://noc.postnuke.com/docman/view.php/5/10/pnAPI.html#id2758765
Blaine
----- Original Message -----
From: "Vincent Furia" <vmf at abtech.org>
To: <geeklog-devel at lists.geeklog.net>
Sent: Friday, October 31, 2003 2:43 PM
Subject: Re: [geeklog-devel] Quick overview of GL2 and what we have so far
and how it relates to the API
> A couple comments I wanted to add about plugins and other GL2 stuff.
> First, I think that we should consider making some of the 'core'
> functionality into plugins instead. Specifically I'm referring to the
> comment engine, the (potential) ratings engine, and the messaging system
> (maybe even the logging system?). This would allow users to replace the
> functionality provided by these plugins. A good example of this might
> be replacing a standard comment system with a forum-like comment
> system. I think doing so would give GL2 even more flexibility.
>
> I know Tony didn't mean the core feautre list to be exhaustive, but one
> item I didn't see (but would like to see) was a configuration utility.
> I think, with GL2, we should get away from forcing GL administrators
> from editing config.php by hand and move to a fully web based
> configuration utility that can be used by the plugins as well being used
> for core feautres.
>
> On that subject I think it's time to start putting together a document
> that shows what core functionality GL2 will provide and any information
> we have on how it will provide that. Something like a design document.
> It's something that I'd be willing to work on, but I'd need a lot of
> information and support, especially from Tony. Maybe this is something
> that would best be done in a Wiki format?
>
> Finally, I have a few comments about event handling system and a few
> comments on plugins in general. If we do this well, and efficiently, we
> could have a really flexible, extensible system that will beat out every
> other open source system I've seen. For that reason I think its
> important to focus, briefly on how the plugin event calls might work in
> GL2. This is just a rough idea, and I'd really like to see input on
> what you all think of this.
>
> Each plugin should be able to register the fact it wants to be called
> when certain events occur:
> registerEventCallback(plugin registering callback, plugin raising
> event, event)
>
> Then, a plugin can notify GL2 that event has occurred with:
> raiseEvent(plugin raising event, event, parameters) // parameters:
> array of values
>
> Upon being notified that an event occurred, GL2 can call the plugin API
> for all plugins registered to recieve the event:
> onEvent(plugin raising event, event, parameters)
>
> Also plugins need to be able to invoke an event/function in another
plugin:
> invokeEvent(plugin providing function, event, parameters)
>
> I'm still thinking about possible ways raiseEvent and invokeEvent can
> handle returned values. One possibility, at least for invokeEvent, is
> the functions could be required to return a small object containing
> status (-1, failure; 0, plugin function not found; 1, success; etc.) and
> the results of the call:
> $P = invokeEvent(plugin, event, parameters);
> if ($P->status > 0) {
> echo $P->result;
> }
>
> Of course all this leads to a question if we should have a severely
> simplified API where even core functionality such as the moderation
> fuctions, comment functions, etc should all be called through this event
> API (with a plugin name = 'core'). One advantage to doing it this way
> would allow us to extend plugin functionality in later releases without
> affecting the plugin API (which would prevent plugin obsolesence to an
> extent).
>
> Another issue I think we should start talking about is plugin
> dependency, and how to handle it gracefully. Obviously plugins will
> support, to one extent or another, the use of other plugins. This could
> run the gambit from a plugin being dependent on another plugin to work,
> to a plugin using another plugin in a non dependent way (i.e. the plugin
> isn't required for operation, just for extended functionality).
>
> I think that is more than enough to digest in one sitting. If anyone
> would like to chat with me I'll try to be available in #geeklog. Of
> couse, email discourse is always welcome as well.
>
> -Vinny
> Who is already having fun...
>
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://lists.geeklog.net/listinfo/geeklog-devel
--__--__--
Message: 3
Date: Fri, 31 Oct 2003 16:06:12 -0600
From: Tony Bibbs <tony at tonybibbs.com>
To: geeklog-devel at lists.geeklog.net
Subject: Re: [geeklog-devel] Quick overview of GL2 and what we have so far
and how it relates to the API
Reply-To: geeklog-devel at lists.geeklog.net
I need more time to digest this but one quick note about your approach
to event handling. If I read it right, your method requires trip(s) to
the database to be able to determine which modules wanted to be
triggered when an event occurs. I would like to see us implement this
in a way that would avoid that overhead and I think we can do it. For
example, a module will know when it is shipped which modules it will try
to interact with. Here is a snippet that I think can handle this:
/**
* This calls an event on any module
*
* NOTE: this is just a stub in the API
*
* @param string $eventName Name of the event that was fired
* @param string $module Name of the module that triggered an event
* @param array $args Array of arguments for the handler
*
*/
function handleEvent($eventName, $module, $args)
{
}
For example purposes let's assume the following is the API
implementation of the function above for the forum module:
/**
* Proxies events to the appropriate non-API event handlers
*
*
* @param string $eventName Name of the event that was fired
* @param string $module Name of the module that triggered an event
* @param array $args Array of arguments for the handler
*
*/
function handleEvent($eventName, $module, $args)
{
switch ($module) {
'Geeklog':
// Call local non-API method to handle Messaging event
return handleGeeklogEvent($eventName);
'Messaging':
// Call local non-API method to handle Messaging event
return handleMessagingEvent($eventName);
'Stories':
// Call local non-API method to handle Story event
return handleStoryEvent($eventName);
default:
// For all other modules we don't care so bail
return false;
}
}
Though you can see the trend, here is what you would have in one of the
event handlers. Let's assume this is the forum's event handler for
messaging:
function handleMessagingEvent($eventName)
{
switch ($eventName) {
'onPMSent':
return ForumEventHandler::hand
EventHandler::
}
In this way you don't need to register events in a database. You may be
able to condense this a bit by using is_callable() or method_exists() to
avoid too many levels of event handling proxies but this demonstrates my
idea. Again, I think we should trim GL2 down to essential DB calls and
if we can avoid them here I'd like to. I'm sure there may be arguments
for doing it in the DB which is fine, just let me know what they are
(i.e. I'm not married to any decision yet).
Thoughts or concerns?
--Tony
Vincent Furia wrote:
> A couple comments I wanted to add about plugins and other GL2 stuff.
> First, I think that we should consider making some of the 'core'
> functionality into plugins instead. Specifically I'm referring to the
> comment engine, the (potential) ratings engine, and the messaging system
> (maybe even the logging system?). This would allow users to replace the
> functionality provided by these plugins. A good example of this might
> be replacing a standard comment system with a forum-like comment
> system. I think doing so would give GL2 even more flexibility.
>
> I know Tony didn't mean the core feautre list to be exhaustive, but one
> item I didn't see (but would like to see) was a configuration utility.
> I think, with GL2, we should get away from forcing GL administrators
> from editing config.php by hand and move to a fully web based
> configuration utility that can be used by the plugins as well being used
> for core feautres.
>
> On that subject I think it's time to start putting together a document
> that shows what core functionality GL2 will provide and any information
> we have on how it will provide that. Something like a design document.
> It's something that I'd be willing to work on, but I'd need a lot of
> information and support, especially from Tony. Maybe this is something
> that would best be done in a Wiki format?
>
> Finally, I have a few comments about event handling system and a few
> comments on plugins in general. If we do this well, and efficiently, we
> could have a really flexible, extensible system that will beat out every
> other open source system I've seen. For that reason I think its
> important to focus, briefly on how the plugin event calls might work in
> GL2. This is just a rough idea, and I'd really like to see input on
> what you all think of this.
>
> Each plugin should be able to register the fact it wants to be called
> when certain events occur:
> registerEventCallback(plugin registering callback, plugin raising
> event, event)
>
> Then, a plugin can notify GL2 that event has occurred with:
> raiseEvent(plugin raising event, event, parameters) // parameters:
> array of values
>
> Upon being notified that an event occurred, GL2 can call the plugin API
> for all plugins registered to recieve the event:
> onEvent(plugin raising event, event, parameters)
>
> Also plugins need to be able to invoke an event/function in another plugin:
> invokeEvent(plugin providing function, event, parameters)
>
> I'm still thinking about possible ways raiseEvent and invokeEvent can
> handle returned values. One possibility, at least for invokeEvent, is
> the functions could be required to return a small object containing
> status (-1, failure; 0, plugin function not found; 1, success; etc.) and
> the results of the call:
> $P = invokeEvent(plugin, event, parameters);
> if ($P->status > 0) {
> echo $P->result;
> }
>
> Of course all this leads to a question if we should have a severely
> simplified API where even core functionality such as the moderation
> fuctions, comment functions, etc should all be called through this event
> API (with a plugin name = 'core'). One advantage to doing it this way
> would allow us to extend plugin functionality in later releases without
> affecting the plugin API (which would prevent plugin obsolesence to an
> extent).
>
> Another issue I think we should start talking about is plugin
> dependency, and how to handle it gracefully. Obviously plugins will
> support, to one extent or another, the use of other plugins. This could
> run the gambit from a plugin being dependent on another plugin to work,
> to a plugin using another plugin in a non dependent way (i.e. the plugin
> isn't required for operation, just for extended functionality).
>
> I think that is more than enough to digest in one sitting. If anyone
> would like to chat with me I'll try to be available in #geeklog. Of
> couse, email discourse is always welcome as well.
>
> -Vinny
> Who is already having fun...
>
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://lists.geeklog.net/listinfo/geeklog-devel
--
+----------------------------------------------------------------------+
|Tony Bibbs |[R]egardless of what you may think of our penal |
|tony at tonybibbs.com |system, the fact is that every man in jail is one |
| |less potential fisherman to clutter up your |
| |favorite pool or pond. --Ed Zern |
+----------------------------------------------------------------------+
--__--__--
_______________________________________________
geeklog-devel mailing list
geeklog-devel at lists.geeklog.net
http://lists.geeklog.net/listinfo/geeklog-devel
End of geeklog-devel Digest
More information about the geeklog-devtalk
mailing list