Forum OpenACS Development: Re: Why XML for .xql query dispatcher files?

Collapse
Posted by Don Baccus on
Ben wrote it, an xml parser was available, he decided to use it.  That's most of it.  Dan and I were busy on other basic tasks, my first work on it was to teach the boostrap controller to automatically determine which db is being used, Dan jumped into porting the kernel datamodel.

We each worked independently.  That was Ben's piece of the foundation work, using XML seemed as good as any other idea, and after some public discussion he implemented it.

Also we had the notion of scoped searches for queries matching a name and that scoping wouldn't fit with a "define a Tcl proc for each query" approach.  Of course while scoped query searching is implemented we haven't taken advantage of it - queries get duplicated across various scripts and procs and that's probably OK.

We didn't know parsing the query files would be as expensive as it is.  With OpenACS 5.0/.LRN 2.0 we'll also be parsing catalog files, and while Peter's written that as a scheduled proc that doesn't block startup, it takes a lot longer to parse than the query files (it looks like we at least partially support a *lot* of languages.)  We'll want to go to lazy loading of the message catalog for this reason.  But lazy loading of queries isn't practical with the current implementation of the query dispatcher ...