Date post: | 21-Jun-2015 |
Category: |
Technology |
Upload: | eduardomg23 |
View: | 504 times |
Download: | 0 times |
An Architectural Model for An Architectural Model for Adapting Domain-Specific Adapting Domain-Specific
AOM ApplicationsAOM Applications
Patricia MatsumotoPatricia MatsumotoEduardo GuerraEduardo Guerra
Understanding
AOM
The domain model flexibility is an essencial requirement in the context of some applications.
health insurance
defense communications
archeology
AOMAdaptive Object Models
An architectural style where classes, attributes, relationships and behaviors
are represented at runtime as instances using metadata.
Type Object
Properties
Type Square
AOM Patterns
Basic AOM Structure
http://adaptiveobjectmodel.com/
Problems inUsing 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.
AOM ModelApplicationDomain
Persistence
Graphical Interface
Domainspecific!
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 SolutionProposed Solution
Aplication AOM Model
Generic AOM Model
MetadataMapping
ApplicationDomain
Has some domain-specific characteristics and contains only enough flexibility.
Independent of application domain
and is used by the components.
metadata mapping
Generic AOM Model
Aplication AOM Model
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 HandlingA 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
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.
AOM Model Adapters
Provide a hotspot for persistence components for model and instances.
Model Manager
Has an internal map to avoid to have duplication in the model.
Entity types are identified by name and package, entities by the framework.
Has an internal map to avoid to have duplication in the model.
A Visitor is used by frameworks to build the entities and entity types.
Og
hma
Mod
elTa
lk
Esfin
ge
Not coupled to a domain
Make AOM development easy
Allow domain-specific AOM
Integrate external frameworksFrameworks can be reused by different AOM models
Validation
Application
Domain-specific AOM Model
Generic AOM Model Adapters
MongoDBPersistenceFramework
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 However there are still many challenges in the many challenges in the AOM domain and for the AOM domain and for the
Esfinge AOM Role Mapper!Esfinge AOM Role Mapper!
Thank You!