The present invention relates generally to object-oriented programming and object models, and more particularly to validation of object models.
Object-oriented software is typically built on top of an object model. The object model provides a definition of entities in the system and their associations to each other. Unified Modeling Language (UML) is a modeling system that provides a means to specify, construct, document and visualize an object model. For example, UML diagrams are typically used to represent and document object models. The diagrams rendered in the display provide the user with a visual feedback that allows the user to simply and easily understand the model paradigm being created or implemented. However, UML is not powerful enough to define complex validation rules and constraints that fully describe a consistent object model.
Traditionally validation of objects is achieved by incorporating the validation logic into the programming logic responsible for maintaining the data in the system. Validation rules in this case are “hard-coded” into the APIs (Application Programming Interfaces) and it is usually not possible to alter the behavior of such logic once the APIs have been developed.
Another approach is to formalize the definition of constraints on the object model by using Object Constraint Language (OCL). With this approach, the defined constraints are meant to be always satisfied, thus not allowing incorrect and incomplete data to be created. While satisfying the goal of having consistent data in the system, this approach is very inflexible for the developers of application logic because the specific methodology must be followed to create objects that do not violate system constraints.
Thus, there is a need for new systems and methods for describing and enforcing validation rules for an object model. Such systems and methods should also allow for flexibility in designing objects and in determining when validation processes are invoked.