Handling "Types" in DLSs
What do I mean by types? In this case, things that are similar, but that have different attributes. For example, there are different types of screens (list, detail, form, etc.) requiring different attributes. Different types of properties (persisted, calculated, aggregate, etc.) also required different attributes. There are different types of service methods (based on getByFilter(), getByProperty(), etc) which also have their own unique attributes based on the different method signatures of the methods they are parameterizing and so on.
For a while I wasn't really sure how to capture and think about these variabilities, but the choice of XML as a concrete syntax gave me a good way of thinking about these. I'm adding a separate elements for each "type" and just putting them within a container element, so I might have a <screens> container element that could have 0..n <list>, <detail> and <form> tags.
This way I get the benefit of a nicely defined schema with the ability to clearly validate different types of things based on their different required and optional parameters.



There are no comments for this entry.
[Add Comment]