[jifty-devel] Re: [Jifty-commit] r1951 - in jifty/trunk: plugins/Login/share/web/templates

John Peacock jpeacock at rowman.com
Mon Sep 11 13:01:55 EDT 2006


Jesse Vincent wrote:
> *nod* I'm finding it a bit difficult to drop the plugin into a new
> application.  It feels like I need to customize all of the templates and
> all of the actions. And at that point, well, the point of having a
> plugin is sort of defeated.  

I understand completely.  We need to get to the point where the plugin 
only provides actions iif they don't already exist in the application 
already, but with Perl's object model, you can't strictly have a 
"provides" interface.  There is going to have to be some inheritance 
involved, AFAICT.

Of course, another way to go about it is to add, to the core, another 
path for action resolution which checks to see if a plugin has 
registered that action.  So you have:

       does the application handle this action?
       does any loaded plugin handle this action?
       does the core handle this action?
else  throw an error

On the subject of *templates*, I think they should be considered merely 
examples, since this is much more likely to be something closely tied to 
the application itself.  I was noticing just last night that I didn't 
provide _any_ POD for the Login.pm file itself, so I can add some to 
describe how to implement the plugin for an app (if I can figure out how 
to do that myself). ;-)

> The biggest thing is that I really, really
> don't want to have my model class inheriting from the plugin. Have you
> pondered ways around this?

If you don't want to have inheritance, the only way I can think of to 
put the methods into your class is via namespace games, which is 
normally much more action-at-a-distance than I like to go (ignoring the 
version.pm mess, which by design has to be profoundly evil).

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748


More information about the jifty-devel mailing list