an extensibility issue, wrappers are the solution
I've not written the section entry class in COODBMS yet, and for good reason--I would need to duplicate a lot of code for each PObject to make it aware of the Rolon it is a part of. As it is, for each container used as a section (lists, large tables and now calendars) I've already had to duplicate a good chunk of code for each Section as well as for JUnit. There is a problem here.
The problem stems from Java's lack of inheritance. The answer it to employ wrappers. Doing this will increase CowDb's extensibility considerably. Implementing this can be done entirely transparently using the type code. We just create another map for mapping a wrapper's type to the base object that it wraps. Also, with wrappers it should be a lot easier to implement a range of base objects.
0 Comments:
Post a Comment
<< Home