Forum OpenACS Development: Re: Admin abilities, handled on the same page, or on different pages?

There have been some good arguments for the new ad_form method of doing things. I think three top reasons are:

  • New and Update data go through the same validation, since they are handled the same way.
  • Easy to get a basic form up and going.
  • Consistency of look/feel.

    I think usage of ad_form is increasing. If you take the time to learn it, it will probably save you lots of time in developing.

    Personally, I have taken a different approach. I have the feeling that building a form is difficult. There are a million different ways you can format forms, and it is hard to substitute tcl code for html. So as of yet, I haven't tried to generate forms through tcl code.

    What I have done to simplify development is to handle the easier problem of inserting/updating/deleting data, that is the *-2 pages. My model allows you to design forms to handle any number of objects and to insert/update/delete in one step. Once setup, all that is required it to write the form with the correctly named inputs, and submit the form to a generic form processing script.

    My approach is essentially undocumented, but it provides a different model for development.

  • Is this your query-writer approach, or something else?