Forum OpenACS Development: Re: Re: Rich internet apps on OpenACS

Collapse
Posted by Alfred Werner on
Don - the original proposal /discussion <b>EXACTLY</b> what you are saying. The only thing discussed in adding to the xql files were two things - a permissions attribute (so the coder knows what the intentions are - ultimately that would be enforced by the page) and 'demo data' - sort of the lorem ipsum of database queries, so a UI person could work on pages in 'artist mode' which would not execute actual queries, but only return sample data. The original suggestion was to add a datasrc flag to the adp tag libarary (and to extend the tag library) and go DIRECTLY to the query without intermediate tcl code, since the tags are really tcl code anyway. example (without looking at real xql syntax or permssions naming): <xql><query name="onethread">select topic, poster, posting_date from forum</query> <permissions>public</permissions> <data><topic>Re: Re: Rich internet apps on OpenACS</topic><poster>Alfred Werner</poster><posting_date>12/10/04 12:16 AM</posting_date> </xql> You can then use a tag in your adp page : <multiple datasrc="onethread" paginate=yes perpage=25> @stuff@ </multiple> Since there is a date field, you might decide to use a calendar widget instead: <calendar datasrc="onethread" defaultview="month"> @stuff@ </calendar> That's the general idea ... Main focus will be to identify a core set of tags and their semantics, and to eliminate the middle tcl layer unless necesary for customizations.
Collapse
Posted by Alfred Werner on
doh - bad formatting choice!

I'll post a cleaner example at some point.

Main idea -

xql has the query and a name.

in the pages:

<mutltiple datasrc="forums" paginate="yes" perpage=25>
@stuff@
</multiple>

you switch to a calendar view:
<calendar datasrc="forums" datefield="posting_date" label="topic">
@stuff@
</calendar>

In most cases, you shouldn't have to put a tcl layer between the adp and xql to use this ...