Forum OpenACS Development: Response to What do we do with db_multirow and template::multirow?

I just saw your ticket, and ugh ... what can I say?  That's a rather lame assumption made by the regsub (that no variable in the code block will contain the multirow identifier as its first N chars.  I don't like this one bit ...

Yes, separate db_multirow and multirow procs makes sense and yes, I think we're on the same wavelength because it's not the existence of template::multirow that's annoying, just its different API style.

Is this really "geography in the code" or just "Karl in the code", that's always been something I've wondered about. :)

I didn't know you and Jon wrote a templating system...

I also agree that I pretty much like the way the templating system works, just not the way it is implemented.

On another tangent since we're having a nice, public design discussion ... was there any thought at aD to having ad_page_contract get smart about building and verifying forms?  It seems that integration with the template formbuilder would be nice and while perhaps a bit tricky to define (ad_page_contract wants to be simple from the user point of view) not impossible.

Using the "self-submit" style which the form builder is meant to encourage involves a bunch of rote stuff: lots of "element" calls each time to build or validate the form as necessary, an optional validation block, a "request" block (which often does little or nothing but build context bars and the like) and a "valid submission" block.

In other words proper use of the form builder implies that you'll build pages with a stereotyped structure and that stereotyped structure could be partially supported by ad_page_contract.  In particular taking form element name, type and default argument args and issuing template "form" commands automatically (or otherwise duplicating the behavior).

I haven't thought a lot about this but it seems that building forms could be made a *lot* easier.  Right now you have to drop the convenient and extremely readable ad_page_contract-style of page param declarations if you want the nice, in-form error messages built by the form builder (rather than ad_page_contract's separate "you screwed up, hit 'back' and try not to screw up again" error page).