An Architectural Model for
Adapting Domain-Specific
    AOM Applications


   Patricia Matsumoto
    Eduardo Guerra
Understanding
   AOM
The domain model flexibility
is an essencial requirement in
the context of some
applications.
health      insurance   archeology




  defense        communications
AOM
   Adaptive Object Models
 An architectural style where classes,
attributes, relationships and behaviors
     are represented at runtime as
       instances using metadata.
AOM
Type Object
                            Patterns

              Properties




                           Type Square
Basic AOM
                     Structure



http://adaptiveobjectmodel.com/
Problems in
 Using AOM
But it is very complicated to
   implement an AOM system,
 because I need to implement all
the model and all the components
          that handle it.
Persistence




Application               AOM Model
 Domain


              Domain                   Graphical
              specific!                Interface
An application usually creates an
 AOM specific to their domain,
and this fact make difficult the
   creation of more general
          frameworks!


   The components
   are stuck to their
       domain!
But the flexibility of an
AOM should be only
enough! We don't want a
new programming
language!
                   It is good to have the
              domain model close to our
               domain, because that can
                improve code readability
                   on the business rules.
How we can create domain-specific
AOM models and allow the reuse of
the components that deals with it?




              ?
Proposed Solution
Metadata
      Mapping




                               Generic
                              AOM Model




Application      Aplication
 Domain          AOM Model
metadata
                    mapping
    Aplication                      Generic
    AOM Model                      AOM Model




Has some domain-               Independent of
specific characteristics   application domain
and contains only           and is used by the
enough flexibility.              components.
Integration Model
Metadata is used to map
the roles of each element to
the AOM generic model.

AOM generic model is used
to adapt the domain-
specific AOM model.

Frameworks only depends
on the generic model and
can be reused.
AOM Role Mapper
http://esfinge.sf.net
Metadata Handling
  A Metadata Descriptor is used to
  represent metadata at runtime.

  A Metadata Reader is used to read
  annotations, but others can be
  implemented.

  A Metadata Repository is used
  to avoid unnecessary readings.
@EntityType
@Entity
@PropertyType
@EntityProperties
@EntityProperty
@PropertyTypeType
@PropertyValue
@CreateEntityMethod
@Entity
public class Account {

    @EntityType
    private AccountType accountType;
    …

    public AccountType getAccountType() {
       return accountType;
    }

    public void setAccountType(AccountType accountType) {
       this.accountType = accountType;
    }
}
Solution
Example
Solution Example
AOM Model Adapters
   Fixed properties on classes can be
   mapped to AOM properties.

   Relationships are mapped using a
   different property implementation.

   The AOM objects can be created
   using factories that instatiate the
   appropriate classes.
Model Manager
Provide a hotspot for persistence
components for model and instances.

Has an internal map to avoid to have
duplication in the model.

Entity types are identified by name and
package, entities by the framework.

A Visitor is used by frameworks to build
the entities and entity types.
ModelTalk

                                                    Esfinge
                                Oghma
Not coupled to a domain
Make AOM development easy
Allow domain-specific AOM
Integrate external frameworks
Frameworks can be reused by
different AOM models
Validation
Application

                  Domain-specific
                    AOM Model
                 Generic AOM
                Model Adapters




  Persistence
  Framework      MongoDB
Two different AOM models were developed
   and mapped using the framework.
Application
MongoDB
Modularity Analysis
Domain only depends on the annotations
Frameworks depends on the AOM model
Applications depends on the API and AOM model
It is evaluated that
with this model is
possible to decouple
the application AOM
model from the
AOM frameworks
allowing their reuse.
However there are still
 many challenges in the
 AOM domain and for the
Esfinge AOM Role Mapper!
Thank You!

An Architectural Model for Adapting Domain-Specific AOM Applications

  • 1.
    An Architectural Modelfor Adapting Domain-Specific AOM Applications Patricia Matsumoto Eduardo Guerra
  • 2.
  • 3.
    The domain modelflexibility is an essencial requirement in the context of some applications.
  • 4.
    health insurance archeology defense communications
  • 5.
    AOM Adaptive Object Models An architectural style where classes, attributes, relationships and behaviors are represented at runtime as instances using metadata.
  • 6.
    AOM Type Object Patterns Properties Type Square
  • 7.
    Basic AOM Structure http://adaptiveobjectmodel.com/
  • 8.
  • 9.
    But it isvery complicated to implement an AOM system, because I need to implement all the model and all the components that handle it.
  • 10.
    Persistence Application AOM Model Domain Domain Graphical specific! Interface
  • 12.
    An application usuallycreates an AOM specific to their domain, and this fact make difficult the creation of more general frameworks! The components are stuck to their domain!
  • 13.
    But the flexibilityof an AOM should be only enough! We don't want a new programming language! It is good to have the domain model close to our domain, because that can improve code readability on the business rules.
  • 14.
    How we cancreate domain-specific AOM models and allow the reuse of the components that deals with it? ?
  • 15.
  • 16.
    Metadata Mapping Generic AOM Model Application Aplication Domain AOM Model
  • 17.
    metadata mapping Aplication Generic AOM Model AOM Model Has some domain- Independent of specific characteristics application domain and contains only and is used by the enough flexibility. components.
  • 18.
  • 19.
    Metadata is usedto map the roles of each element to the AOM generic model. AOM generic model is used to adapt the domain- specific AOM model. Frameworks only depends on the generic model and can be reused.
  • 20.
  • 21.
    Metadata Handling A Metadata Descriptor is used to represent metadata at runtime. A Metadata Reader is used to read annotations, but others can be implemented. A Metadata Repository is used to avoid unnecessary readings.
  • 22.
  • 23.
    @Entity public class Account{ @EntityType private AccountType accountType; … public AccountType getAccountType() { return accountType; } public void setAccountType(AccountType accountType) { this.accountType = accountType; } }
  • 24.
  • 25.
  • 26.
    AOM Model Adapters Fixed properties on classes can be mapped to AOM properties. Relationships are mapped using a different property implementation. The AOM objects can be created using factories that instatiate the appropriate classes.
  • 27.
    Model Manager Provide ahotspot for persistence components for model and instances. Has an internal map to avoid to have duplication in the model. Entity types are identified by name and package, entities by the framework. A Visitor is used by frameworks to build the entities and entity types.
  • 28.
    ModelTalk Esfinge Oghma Not coupled to a domain Make AOM development easy Allow domain-specific AOM Integrate external frameworks Frameworks can be reused by different AOM models
  • 29.
  • 30.
    Application Domain-specific AOM Model Generic AOM Model Adapters Persistence Framework MongoDB
  • 31.
    Two different AOMmodels were developed and mapped using the framework.
  • 32.
  • 33.
  • 34.
  • 35.
    Domain only dependson the annotations
  • 36.
    Frameworks depends onthe AOM model
  • 37.
    Applications depends onthe API and AOM model
  • 38.
    It is evaluatedthat with this model is possible to decouple the application AOM model from the AOM frameworks allowing their reuse.
  • 39.
    However there arestill many challenges in the AOM domain and for the Esfinge AOM Role Mapper!
  • 40.