27
Trends in Adaptive Object Model Research Filipe Figueiredo Correia 1,2 and Hugo Sereno Ferreira 1,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 [email protected] http://www.fe.up.pt/ 3 MAP-I Doctoral Programme in Computer Science [email protected] http://www.map.edu.pt/i

Trends on Adaptive Object Model Research

Embed Size (px)

DESCRIPTION

Presented on DSIE'08 - http://www.fe.up.pt/dsie08

Citation preview

Page 1: Trends on Adaptive Object Model Research

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

[email protected]://www.fe.up.pt/

3 MAP-I Doctoral Programme in Computer [email protected]://www.map.edu.pt/i

Page 2: Trends on Adaptive Object Model Research

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

Page 3: Trends on Adaptive Object Model Research

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

Page 4: Trends on Adaptive Object Model Research

4Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research

Adaptive Object Models

Dynamic meta­modeling technique Several abstraction levels in play at runtime

A meta­model is seen as a first­class model MOF could be used to handle the different levels

Page 5: Trends on Adaptive Object Model Research

5Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research

Adaptive Object Models

Many object­oriented information systems share an architectural style that emphasizes flexibility and run­time 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 Object­Models", 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]

Page 6: Trends on Adaptive Object Model Research

6Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research

The Design of AOMs – Common Design

See references [4], [5] and [8].

Page 7: Trends on Adaptive Object Model Research

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; Fined­GrainedObjects; VisualBuilder; LanguageTools

InstrumentalContextObject; Versioning; History; Caching

Welicki et al. [14]

Page 8: Trends on Adaptive Object Model Research

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

Page 9: Trends on Adaptive Object Model Research

9Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research

The Oghma System – OO Meta-Model Design

Page 10: Trends on Adaptive Object Model Research

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?

Page 11: Trends on Adaptive Object Model Research

11Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research

The Oghma System – Research fronts

Persistence Modeling Language Business Rules Client­Server architecture Queries Addressing scheme User Interfaces

Page 12: Trends on Adaptive Object Model Research

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)

Page 13: Trends on Adaptive Object Model Research

13Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research

The Oghma System – Modeling Language

UML­based, but does not cover all of UML's specification 

Supports Interfaces, Associative Classes and Navigability

Finding the right level of expressiveness

Page 14: Trends on Adaptive Object Model Research

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>

Page 15: Trends on Adaptive Object Model Research

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> (...)

Page 16: Trends on Adaptive Object Model Research

16Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research

The Oghma System – Client-Server

Adaptive model­based message schema Exchange of meta­level and operational­level 

elements REST/XML over HTTP (eased debugging, caching, authentication)

Page 17: Trends on Adaptive Object Model Research

17Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research

The Oghma System – Queries

Two querying meta­models Object­oriented (serializable/deserializable to a URL­based representation)

Relational­oriented (serializable to SQL)

Object­oriented query instances are transformed into relational­oriented query instances

Page 18: Trends on Adaptive Object Model Research

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 model­based 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]

Page 19: Trends on Adaptive Object Model Research

19Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research

The Oghma System – User Interfaces

Adaptive model­based 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

Page 20: Trends on Adaptive Object Model Research

20Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research

The Oghma System – User Interfaces Example (1)

Page 21: Trends on Adaptive Object Model Research

21Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research

The Oghma System – User Interfaces Example (2)

Page 22: Trends on Adaptive Object Model Research

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

Page 23: Trends on Adaptive Object Model Research

23Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research

Future Work in Oghma (1)

Meta­model transformations Monolithic vs rule­based

Model evolution Mapping elements from two different meta­models Leverage the concept of refactorings (meta­refactorings?)

Develop tools that assist the migration process

Page 24: Trends on Adaptive Object Model Research

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 UML­oriented meta­model

Formalize this new knowledge as design patterns

Page 25: Trends on Adaptive Object Model Research

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

Page 26: Trends on Adaptive Object Model Research

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/

Page 27: Trends on Adaptive Object Model Research

27Filipe Figueiredo Correia & Hugo Sereno Ferreira Trends In Adaptive Object Models Research

References

1. Schmidt, D., Schmidt, D.: Guest editor’s introduction: Model­driven engineering.  Computer 39 (2006) 25–312. Riehle, D., Fraleigh, S., Bucka­Lassen, 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 object­models and metamodeling techniques.In: ECOOP ’01: Proceedings of the Workshops on Object­Oriented Technology,London, UK, Springer­Verlag (2002) 57–715. Yoder, J.W., Johnson, R.E.: The adaptive object­model 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 meta­information in reflective middleware. Volume 4364., Springer Berlin / Heidelberg (2006) 232–2418. Welicki, L., Lovelle, J.C., Aguilar, L.J.: Meta­specification 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. Addison­Wesley 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 SIG­PLAN Notices 36(12) (2001) 50–6012. Fowler, M.: Analysis patterns: reusable objects models. Addison­Wesley 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., Wirfs­Brock, R.: A pattern language for adaptive object models: Part i ­ rendering patterns. In: PLoP 2007, Monticello, Illinois (2007)15. Welicki, L., Yoder, J.W., Wirfs­Brock, 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. Addison­Wesley 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/en­us/netframework/aa904594.aspx Accessed January 5, 2008.20. Dantas, A., Yoder, J., Borba, P., Johnson, R.: Using aspects to make adaptive object­models adaptable. In: RAM­SE’04­ECOOP’04 Workshop on Reflection,AOP, and Meta­Data 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. Addison­Wesley Professional (1999)23. Ambler, S.W., Sadalage, P.J.: Refactoring Databases: Evolutionary Database Design. Addison­Wesley Professional (2006)24. W3C: Owl web ontology language overview (2004) http://www.w3.org/TR/owl­features/ Accessed January 5, 2008.25. Knublauch, H.: Ramblings on agile methodologies and ontology­driven software development, Galway, Ireland (2005)