Forum OpenACS Q&A: Response to A Template-Based ACS

Collapse
Posted by Val Paussa on
Hi,

I think what you're looking for here is an application generator with enough juice to generate the ACS from a specification. That way, you could port the ACS to any platform by altering the generator code. This would also have the benefit of standardizing the database access, page display etc. methodologies that have been cobbled together over time in the ACS.

I've gone over the work that Karl has done on the templating system for the ACS. It's very good. The purpose of that system is to allow a programmer to write a text document using an XML formatted schema. That document would describe the application in question. Looping, if and other constructs are then made available to the web designer that allow the web designer to fold the input and output fields of the application into the page in any way he or she wishes.

I looked at that and thought "Hmmmmm, if this XML structure was replicated as database tables, then we could throw some reusability in here." (Well, sort of, I'd already started on my design when I found Karl's stuff)

I believe that Karl and Philip have gone back and forth on whether the specification should be in the database or in XML. The XML approach is good because you can represent complex structures that are hard to represent in a database. The database approach is good because you can edit it online and have background processes that check your work.

I've got some sort of a database application generator running right now. It generates the pages but they aren't intelligently linked to each other. I'll have added the navigation components fairly soon. The basic idea behind it is that there aren't that many ways in which data is displayed. So, I write a display generator for each method. So far, I've written generators for List, View, Edit, and Add. Once I get those up and running, I think I'll stop and try to generate either Wimpy Point or the Ticket Tracker. (The ticket tracker is probably the candidate because Wimpy Point needs a linked list viewer and an archiver.)

The generator expects to find the description information it needs in the database when called. If the description information is there, it generates a page of code. If you want to add another field to the database, you describe and generate it. If you want to add a method to the application, you describe and generate. Anyway, that's the theory.