Saturday, February 23, 2008

API cleanup

I'm 1/4th done a major API cleanup.

First, there's just too much casting happening. By adding a bunch of methods which throw UnsupportedOperationException to CommonObject this can be avoided. But avoiding casting is not the major benifit. As the DRM also extends CommonObject, we need only use the same method signatures for Rolonic Element classes and ElementModel classes and we've significantly reduced the size of the API.

Second, by also providing a ICommonObject interface we can then have common interfaces for classes like Rolon and RolonModel. This will help a great deal when extending the RoleML script to work with queries.

But gosh, it is a lot of work, even with a good IDE. I've almost completed refactoring CowDB, but there's still some work left and I've not yet had a chance to test it.

0 Comments:

Post a Comment

<< Home