Michael Peters wrote:
Cees Hek wrote:I appreciate the effort and thought you have put into this, but I honestly think you guys are complicating a very simple process. Now I wouldn't consider myself an expert on these matters, and would appreciate some more input from others on the list, but I like the simplicity of how C::A::ValidateRM and C::A::Session work right now...
That was actually one of my fears; that we were making this too complicated. I agree that simplicity is the key.
The main reason I thought we needed to solve the namespace issue was so that we don't clobber stuff that's being stored inside of C::A (in the application object's internal hash) since this is where each of the currently available plugins puts stuff.
Maybe it could be as simple as a naming convention that is respected by C::A and every other plugin. If we reserve and element of that internal hash (say $self->{_Plugins}) and each plugin uses an element of that has (say $self->{_Plugins}->{'Config::Simple'} for my C::A::P::Config::Simple plugin) then no one would ever overrite someone else's data. We would also have to ask Jesse to not use the '_Plugins' internal hash for C::A.
I don't think we can use $self->{_Plugins}->{moniker} using UNIVERSAL::moniker (like we've said before) since someone could write a plugin for Config::Simple and CGI::Simple that should be able to coexist.
This would also allow other plugins to not only access the methods of other plugins, but the objects directly. So you Auth plugin could use $self->session or $self0->{_Plugins}->{'CGI::Session'}
I hope that's a little better on the simple side.
I won't have much time in the next little while to work on this stuff, so feel free to continue on and refine, and even implement your ideas. It might make things clearer to actually see an implementation of your system to see how it will work in practice.
Let me know what you (and everyone else on this list) thinks of the above ideas and then I'll try and take a crack at it in the next few days.
Okay, I took a little bit of time to try these ideas out. I updated Cees's CGI::Application::Plugin. All I really did was add some documentation telling plugin writers to where to put there stuff. I've also updated my CGI::Application::Plugin::Config::Simple module to reflect these conventions.
I see these conventions as solving the namespace issue without having to do anything complex for either plugin writers or plugin users.
http://people.plusthree.com/~mpeters/dist/cgi_app_plugin.patch http://people.plusthree.com/~mpeters/dist/CGI-Application-Plugin-0.02.tar.gz http://people.plusthree.com/~mpeters/dist/CGI-Application-Plugin-Config-Simple-0.02.tar.gz
-- Michael Peters Developer Plus Three, LP
--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
