[Helma-user] Static Skins in prototype

Joshua Paine joshua at papercrown.org
Tue Jul 24 06:23:03 CEST 2007


Maksim Lin for technical support mailling lists wrote:
> The design pattern I have come up with is of always defining a _children
> for every prototype which is a collection of all the prototypes objects.
> 
> myProto/type.properties
> 
> _children = collection(myProto)
> ----
> 
> Root/type.properties
> 
> myprotos = mountPoint(myProto)

This is pretty good. *sigh* Looks like I can redo my user functionality 
*again*.

Only problem I see is that if we have /myprotos/add, that means that 
/myprotos/name_of_some_child/add will be defined as well, where it 
doesn't make any sense. Unless add.hac opens with:

if(this._parent && this._parent.prototype==this.prototype) 
res.redirect(this._parent.href(req.action));

But I sure do dislike boilerplate. Or did you already have a solution in 
mind for this?

Also, how does this help with scaffolding? You can define these things 
generically on hopobject, but you'd still have to make a skin with the 
form for each action of each prototype, right?

-Joshua


More information about the Helma-user mailing list