1 A Pattern Language for Adaptive Object Models: Part I - Rendering Patterns León Welicki ONO (Cableuropa S.A.) lwelicki@acm.org Joseph W. Yoder The Refactory, Inc. joe@refactory.com Rebecca Wirfs-Brock Wirfs-Brock Associates rebecca@wirfs-brock.com Introduction An Adaptive Object-Model is a system that represents user-defined classes, attributes, relationships, and behavior as metadata [YBJ01; YJ02]. The system is a model based on instances rather than classes. Users change the metadata (object model) to reflect changes in the domain. These changes modify the system’s behavior. In other words, an AOM stores its Object Model in a database and interprets it. Consequently, the object model is adaptable; when the descriptive information is modified, the system immediately reflects those changes similar to a UML Virtual Machine described by Riehle et. al [RFBO01]. The design of Adaptive Object-Models differ from most object-oriented designs. Normally, object-oriented design would have classes for describing the different types of business entities and associates attributes and methods with them. The classes model the business, so a change in the business causes a change to the code, which leads to a new version of the application. An Adaptive Object-Model does not model these business entities as classes. Rather, they are modeled by descriptions (metadata) that are interpreted at run-time. Thus, whenever a business change is needed, these descriptions are changed which are then immediately reflected in the running application. So in a sense, what we normally would model as a class is now being modeled by metadata which is being interpreted by the AOM. Adaptive Object-Model architectures are usually made up of several smaller patterns. TypeObject [JW98] provides a way to dynamically define new business entities for the system. TypeObject is used to separate an Entity from an EntityType. Entities have Attributes, which are implemented with the Property pattern [FY98]. The TypeObject pattern is used a second time in order to define the legal types of Attributes, called AttributeTypes. This core set of patterns working together is very common to most AOM architectures as described by Dynamic Object Models [RTJ05]. These Entities and Properties with their valid types are what the user thinks of. So if the user is selling products, the AOM will describe different types of Entities to represent their different types of products. Non-AOM systems would model these with different product classes. As is common in Entity-Relationship modeling, an Adaptive Object-Model usually separates attributes from relationships. In usual OO design relationships are implemented through an attribute as a pointer or direct reference to the related objects and methods are used to implement any rules about the relationship. However in AOMs these relationships are reified thus enabling a way to describe new types of relationships