Monday, March 03, 2008

preliminary design for queries

The problem we face is that, where now we are using DSecs and DEnts in the interpreter, for queries we will be using DSec and DEnt model classes. So either the executable code on DSecs and DEnts needs to be duplicated on the model classes, or the code needs to be relocated. Now I've got nothing against duplicating the code, so long as it is minimal. But for the bulk of the code, we need to relocate it.

Generic code can be moved to the transaction. We create a new RTransaction class which JTransaction (and then QTransaction) will then subclass. That's the easy part, and I almost always do the easy part first as that often clarifies what remains. (You often learn something, or at least become more familiar with things, by doing the easy part first. Doing preliminary designs is also helpful.)

As for the non-generic code, we've been putting that in App classes. Instead, we need to create an extension which can be included in the composition of both the Descriptor elements and the descriptor model elements. This will be phase 2.

The third phase then is to implement RoleML-based queries. As usual, I prefer to put off the actual implementation until it has become trivial. (This never fails to drive my managers and coworkers crazy.)

0 Comments:

Post a Comment

<< Home