[jifty-devel] Improving our plugin system to make things like ::Login easier

John Peacock jpeacock at rowman.com
Mon Dec 11 09:26:44 EST 2006

Jesse Vincent wrote:
> Jifty ends up handing the actions for the plugin off to:
> Jifty::Plugin::Login::Action::CreateUser
> Jifty::Plugin::Login::Action::SearchUser
> Jifty::Plugin::Login::Action::UpdateUser
> Jifty::Plugin::Login::Action::DeleteUser

The actions /should/ be (at least how I tried to make them work):


which are just trivial wrappers around the corresponding base classes. 
My testing seems to suggest that this part is working (at least it seems 
like it from the "...dispatching..." debug statements).

The problem is that the Login base classes are currently hard-coded for 
the fields in the base model class, so either we expose a method that 
the child class can override to validate the input fields or we make the 
validator method use the correct database schema to build the validation 
on the fly (the latter being my current preferred method).  This would 
mean we could still use the normal Perl inheritance model (but see below).

Sadly, I'm in the midst of a somewhat failed system upgrade (my root 
partition got corrupted), so I'm unable to do anything constructive 
until I have that sorted out.  Computers suck sometimes... :(

> An alternate vision is brewing in my head. I'm thinking of doing 
> something like allowing plugins to manipulate the inheritance tree of 
> application classes.

But how does that inheritance happen in practice?  I'm not sure I see 
how this would be any more flexible than the on-the-fly subclassing that 
  the Jifty::Plugin::ClassLoader already does.

> Does this sound like a sane design? I think it would somewhat simplify 
> our conceptual model and be a lot more flexible. But thoughts are much 
> appreciated.

I *think* we can already get this as long as we can get the field 
validation stuff worked out.


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