Forum OpenACS Q&A: Re: E-commerce 'category-browse-subcategory.tcl'

Collapse
Posted by Richard Hamilton on
Torben,

Thank you very mmuch for your reply. I think we can safely conclude that we are singing from the same hymn sheet!

There is really only one issue that jumps out at me from your post, and I think it may be rooted in misconception.

"I conceptually understand how ad_form works, but have never gotten one to work ..not even the example notes package. I believe that using ad_form could significantly decrease the qualified labor base, should a company want to hire help to make changes. ad_form has it's own meta language space different than tcl, sql, and adp/html."

I don't agree - here's why......

As I understand it, ad_form is a core proc that is at the heart of the OpenACS forms API. Its facilities are most conveniently accessed using template::form which implements a declarative syntax for form generation. It is easy to use, intuitive, and concise, and is conceptually similar to the way that you would think about manipulating a browser's DOM using javascript. It eliminates repetitive code and provides consistent structure.

The syntax is standard tcl and it no more has its own language space than any API library anywhere. OpenACS is a toolkit , and this is one of the best tools in the kit! 😊

"ad_form has the limitation of requiring no more than one form per page."

This is not so. I don't believe that any code with such a major limitation would ever make it into OpenACS core.

I have knocked up a demo which I have posted the code for below. I have put it up on a server for you to look at but will not post the url here as it will be temporary (there's no point posting a link that will be dead in a week). I'll mail it to you.

The forms API is really easy to use and very elegant. I will be very disappointed if I can't pursuade you to use it in ec-G2!

Regards
Richard

Collapse
Posted by Dave Bauer on
template::form is the original core code and ad_form is built on top of it. Either way, you should not have forms that don't use one of those.

If you don't like ad_form the acs-templating forms API is just as powerful just much more verbose.

In fact there are some things the ad_form apis can't do and when that happens you can just apply the acs-templating forms api where needed.

Collapse
Posted by Torben Brosten on
Yep, thanks Dave. ecks-forms will use template::form