Post on 06-May-2015
description
transcript
Trends in Adaptive Object Model ResearchFilipe Figueiredo Correia1,2 and Hugo Sereno Ferreira1,3
1 ParadigmaXis — Arquitectura e Engenharia de Software, S.A.,Avenida da Boavista, 1043, 4100-129 Porto, Portugal{filipe.correia,hugo.ferreira}@paradigmaxis.pt
http://www.paradigmaxis.pt/
2 FEUP — Faculdade de Engenharia da Universidade do Porto,Rua Dr. Roberto Frias, s/n 4200-465, Porto, Portugal
filipe.correia@fe.up.pthttp://www.fe.up.pt/
3 MAP-I Doctoral Programme in Computer Sciencehugo.ferreira@di.uminho.pthttp://www.map.edu.pt/i
2Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
Contents
Model Driven Engineering Adaptive Object Models (AOMs) The Design of AOMs The Oghma System Open Issues Future Work in Oghma Final Remarks
3Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
Model Driven Engineering
Abstracting business domains and technology Requirements Design and implementation
Different approaches to modeling Static – centred on documentation, or generative techniques Dynamic – runtime models
4Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
Adaptive Object Models
Dynamic metamodeling technique Several abstraction levels in play at runtime
A metamodel is seen as a firstclass model MOF could be used to handle the different levels
5Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
Adaptive Object Models
Many objectoriented information systems share an architectural style that emphasizes flexibility and runtime adaptability. Business rules are stored externally to the program such as in a database or XML files instead of in code. The object model that the user cares about is part of the database, and the object model of the code is just an interpreter of the users' object model. We call these systems "Adaptive ObjectModels", because the users' object model is interpreted at runtime and can be changed with immediate (but controlled) effects on the system interpreting it.
Joseph Yoder, et al. [11]
6Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Design of AOMs – Common Design
See references [4], [5] and [8].
7Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Design of AOMs – Design Patterns
CoreTypeSquare; TypeObject; Property; Accountability; ValueObject; NullObject; SmartVariable
CreationalBuilder; AOMBuilder; DynamicFactory; Bootstraping; DependencyInjection; VisualLanguage
BehavioralDynamicHooks; Strategy; RuleObject; RuleEngine; Typecube; Interpreter
GUIPropertyRenderer; EntentyView; DynamicView; Workflow
ProcessDomainSpecificAbstraction; SimpleSystem; ThreeExamples; WhiteBox, BlackBox; ComponentLibrary; Hotspots; PluggableObjects; FinedGrainedObjects; VisualBuilder; LanguageTools
InstrumentalContextObject; Versioning; History; Caching
Welicki et al. [14]
8Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Oghma System
Based on an AOM Heads towards a framework for information systems Is an adaptive system at several levels
Model Messages Addressing User interface Persistence
9Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Oghma System – OO Meta-Model Design
10Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Oghma System – What does it bring of new?
Has Oghma's approach something of new to add to AOM's already known and documented issues?
11Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Oghma System – Research fronts
Persistence Modeling Language Business Rules ClientServer architecture Queries Addressing scheme User Interfaces
12Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Oghma System – Persistence
Based on model transformation techniques Bijective transformations between relational and
object models (only at the instance level)
13Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Oghma System – Modeling Language
UMLbased, but does not cover all of UML's specification
Supports Interfaces, Associative Classes and Navigability
Finding the right level of expressiveness
14Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Oghma System – Modeling Language Example
<?xml version="1.0" encoding="UTF-8"?><model><data> (...) <entity id="computer" name="Computer" tostring="{brand} {model} (€{price})"> <list format="{brand} {model} | {price}" columns="{brand} {model} | {price}" /> <attr id="brand" name="Brand" domain="string" cardinality="1" /> <attr id="model" name="Model" domain="string" cardinality="1" /> <attr id="price" name="Price" domain="integer" cardinality="1" /> <attr id="yearbought" name="yearbought" domain="integer" cardinality="1" /> </entity> <entity id="desktop" name="Desktop" inherits="Computer"/> <entity id="laptop" name="Laptop" inherits="Computer"> <attr id="weight" name="Weight" domain="integer" cardinality="1" /> </entity> <entity id="part" name="Computer part"> <attr id="name" name="Name" domain="string" cardinality="1" /> <attr id="type" name="type" domain="enum" cardinality="1" /> </entity> <relationship id="rel_computer_part"> <node entity="computer" id="parts" name="Detalhes" cardinality="0..*" navigable="true" /> <node entity="part" id="computers" name="Dimensões" cardinality="0..*" navigable="false" /> </relationship> (...)</data></model>
15Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Oghma System – Business Rules
Defined in a declarative way, and part of the model Enforced on the server side (semantic integrity)
Enforced on the client side (inputs validation; rapid feedback)
Example<?xml version="1.0" encoding="UTF-8"?> (...) <entity id="book" name="Book" inherits="Document"> <attr id="title" name="Title" domain="string" /> <attr id="isbn" name="ISBN" domain="string" regex="^[0-9]{3}-[0-9]-[0-9]{2}-[0-9]{6}-[0-9]$" /> <attr id="author" name="Author" domain="string" cardinality="1..*" /> </entity> (...)
16Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Oghma System – Client-Server
Adaptive modelbased message schema Exchange of metalevel and operationallevel
elements REST/XML over HTTP (eased debugging, caching, authentication)
17Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Oghma System – Queries
Two querying metamodels Objectoriented (serializable/deserializable to a URLbased representation)
Relationaloriented (serializable to SQL)
Objectoriented query instances are transformed into relationaloriented query instances
18Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Oghma System – Addressing Scheme
Directly derives from the use of RESTfull resources Adaptive modelbased addressing
Examplehttp://oghma.paradigmaxis.pt/computer/laptop/@schema
http://oghma.paradigmaxis.pt/computer/laptop/4A3615F1-5A91-22E4-0B1D-1416F93D4412
http://oghma.paradigmaxis.pt/computer/laptop/4A3615F1-5A91-22E4-0B1D-1416F93D4412/parts
http://oghma.paradigmaxis.pt/computer/laptop[yearbought lt 2005]
19Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Oghma System – User Interfaces
Adaptive modelbased user interfaces Rendering of entities Rendering of value properties (attributes)
Rendering of instance properties (relations)
Renderers chosen according to model information Attribute types Cardinalities Navigability
20Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Oghma System – User Interfaces Example (1)
21Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The Oghma System – User Interfaces Example (2)
22Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
Open Issues in AOMs
Higher initial development cost Higher complexity than traditional systems
Harder to understand and maintain
Model maintenance Development of tools from scratch Model evolution
Need to assess the impact of AOMs on software quality metrics
23Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
Future Work in Oghma (1)
Metamodel transformations Monolithic vs rulebased
Model evolution Mapping elements from two different metamodels Leverage the concept of refactorings (metarefactorings?)
Develop tools that assist the migration process
24Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
Future Work in Oghma (2)
Ontology model A form of knowledge representation A possible replacement for the UMLoriented metamodel
Formalize this new knowledge as design patterns
25Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
Final Remarks
Use when domain models change at a fast rate Oghma was developed with little knowledge of the
existing research on AOMs It has now taken some benefit from this knowledge It possesses also some characteristics that haven't
been documented before in the context of AOMs
26Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
The End
or perhaps just the beginning...
http://flickr.com/photos/21443321@N06/2103626456/
27Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research
References
1. Schmidt, D., Schmidt, D.: Guest editor’s introduction: Modeldriven engineering. Computer 39 (2006) 25–312. Riehle, D., Fraleigh, S., BuckaLassen, D., Omorogbe, N.: The architecture of a UML virtual machine. In: OOPSLA ’01: Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, Tampa Bay, FL, USA, ACM (2001) 327–3413. Yoder, J.: Adaptive object models and metadata definition (2008) http://www.adaptiveobjectmodel.com/Define_Adaptive_Object_Models.html Accessed January 5, 2008.4. Revault, N., Yoder, J.W.: Adaptive objectmodels and metamodeling techniques.In: ECOOP ’01: Proceedings of the Workshops on ObjectOriented Technology,London, UK, SpringerVerlag (2002) 57–715. Yoder, J.W., Johnson, R.E.: The adaptive objectmodel architectural style. In: WICSA 3: Proceedings of the IFIP 17th World Computer Congress TC2 Stream / 3rd IEEE/IFIP Conference on Software Architecture, Kluwer, B.V (2002) 3–276. OMG: OMG’s metaobject facility (MOF) home page (2008) http://www.omg.org/mof/ Accessed January 5, 2008.7. Costa, F.M., Provensi, L.L., Vaz, F.F.: Using runtime models to unify and structure the handling of metainformation in reflective middleware. Volume 4364., Springer Berlin / Heidelberg (2006) 232–2418. Welicki, L., Lovelle, J.C., Aguilar, L.J.: Metaspecification and cataloging of software patterns with domain specific languages and adaptive object models. In:EuroPLoP, Irsee, Germany (2006)9. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns. AddisonWesley Professional (1995)10. Johnson, R., Woolf, B.: The type object pattern (1997)11. Yoder, J.W., Balaguer, F., Johnson, R.: Architecture and design of adaptive object models. ACM SIGPLAN Notices 36(12) (2001) 50–6012. Fowler, M.: Analysis patterns: reusable objects models. AddisonWesley Longman Publishing Co., Inc, Boston, MA, USA (1997)13. Arsanjani, A.: Rule object: A pattern language for adaptive and scalable business rule construction. (2000)14. Welicki, L., Yoder, J.W., WirfsBrock, R.: A pattern language for adaptive object models: Part i rendering patterns. In: PLoP 2007, Monticello, Illinois (2007)15. Welicki, L., Yoder, J.W., WirfsBrock, R., Johnson, R.E.: Towards a pattern language for adaptive object models, Montreal, Quebec, Canada, ACM (2007) 787–78816. Fowler, M.: Patterns of Enterprise Application Architecture. AddisonWesley Professional (2002)17. Fielding, R.T. In: Representational State Transfer (REST). University of California, Irvine (2000)18. ODMG: Object data management group home page (2008) http://www.odmg.org/ Accessed January 5, 2008.19. Microsoft: The linq project (2008) http://msdn2.microsoft.com/enus/netframework/aa904594.aspx Accessed January 5, 2008.20. Dantas, A., Yoder, J., Borba, P., Johnson, R.: Using aspects to make adaptive objectmodels adaptable. In: RAMSE’04ECOOP’04 Workshop on Reflection,AOP, and MetaData for Software Evolution, Oslo, Norway (2004) 9–1921. Crous, T., Danzfuss, T., Liebenberg, A., Moolman, A.: Adaptive object modelling using the .NET framework (2005)22. Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. AddisonWesley Professional (1999)23. Ambler, S.W., Sadalage, P.J.: Refactoring Databases: Evolutionary Database Design. AddisonWesley Professional (2006)24. W3C: Owl web ontology language overview (2004) http://www.w3.org/TR/owlfeatures/ Accessed January 5, 2008.25. Knublauch, H.: Ramblings on agile methodologies and ontologydriven software development, Galway, Ireland (2005)