logo       

Re: Re: RFC - C::A::Plugin - abstract base class for plugins: msg#00031

Subject: Re: Re: RFC - C::A::Plugin - abstract base class for plugins
Cees,

So a plugin author would

use base CGI::Application::Plugin;

in their plugin, and that would be it?

Separately, how would a CGI::Application app author
get access to the plugin methods?  What makes the
Plugin available to the CGI::Application app -
CGI:Application (though you said no mod to C::A code)
or else the C::A app itself?

Thanks.

Bill

--- Cees Hek <cees@xxxxxxxxxxxxxxxx> wrote:

> Mark Stosberg wrote:
> >>It simplifies and standardizes the way a plugin
> can be built for 
> >>CGI::Application, and it works completely outside
> of the 
> >>CGI::Application codebase (ie no patches
> necesary).  It avoids the 
> >>annoyances of building a big inheritance tree for
> the plugins you want 
> >>to use by copying a given set of methods into the
> callers namespace.  No 
> >>exporting or name space munging needs to be done
> by the plugin modules, 
> >>as this is done automatically.
> > 
> > Thanks for contributing this. I'm not sure I "get
> it", though. It looks
> > like you have re-invented a way for some methods
> in a plugin module to
> > be exported, while others are not. 
> > 
> > Without this framework, CGI::App::Session worked
> fine and was as easy to
> > use as I hoped a plug-in would be. What's the
> additional value that this
> > framework provides over the techniques used for
> that? 
> 
> You are correct in seeing that
> CGI::Application::Session does not gain 
> any new and magical functionality by using the
> plugin module.  The users 
> of the module won't notice any difference.
> 
> What this does provide though is a standardized
> mechanism for building 
> plugins for CGI::Application.  Currently it is up to
> the plugin author 
> to decide how to deal with the implementation.  Here
> are some of the 
> methods that are currently being used:
> 
> - CGI::Application::Session uses a 'package
> CGI::Application;' directive 
> in the code that writes several methods directly
> into the 
> CGI::Application namespace (ugly)
> - CGI::Application::TT (not yet released, but
> previewed) uses the old 
> inheritance trick (only practical when using a small
> number of plugin 
> modules)
> - CGI::Application::ValidateRM uses Exporter to
> export it's methods (Works)
> 
> So there are three plugin modules that each
> accomplish the same task in 
> a different way.  The task is to get some methods
> added to the class 
> that is using the plugin.
> 
> All the C::A::Plugin module does is try to provide a
> standard method of 
> writing a plugin class for CGI::App, and it does it
> in a way that makes 
> it very easy for the plugin writer (no need to worry
> about namespaces or 
> using Exporter, it is all handled for you).
> 
> So the benefit is for the plugin writer, not the
> plugin user.
> 
> Cheers,
> 
> Cees
> 
>
---------------------------------------------------------------------
> Web Archive: 
>
http://www.mail-archive.com/cgiapp@xxxxxxxxxxxxxxxxx/
>              
> http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
> To unsubscribe, e-mail:
> cgiapp-unsubscribe@xxxxxxxxxxxxxxxxx
> For additional commands, e-mail:
> cgiapp-help@xxxxxxxxxxxxxxxxx
> 
> 


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@xxxxxxxxxxxxxxxxx/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: cgiapp-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: cgiapp-help@xxxxxxxxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe