View
6
Download
0
Category
Preview:
Citation preview
Pontis’ Interpretive MDD platform
May 2008
Agenda
• Background
• Model driven development
• Problems with main-stream approaches
• Product line structure
• Some facts
• The principles of our approach
• Detailed description
• Summary
Background
• Pontis Ltd. is a developer of online marketing automation
solutions for the telecommunications market.
• Telecommunications software is characterized by
– Strict non-functional requirements
– Massive customization
• In order to address non-functional requirements we base
the implementation on proven J2EE technologies
• In order to reduce TTM and cost of customization we
decided to base our development on a model-driven,
product-line technology
Model Driven Development
• Raise the level of abstraction
• Work outside the (Java) source/technical stuff
• Model is the source
• Model quality -“We can use a model to describe an SUS (System Under Study). In this case, we
consider the model correct if all its statements are true for the SUS.” Ed Seidewitz, What Models Mean, IEEE SOFTWARE, September / O c t o b e r 2 0 0 3
Problems with existing practices
• Consistency - The consistency of the model is crucial in model centric
approaches. An inconsistent model hinders downstream activities.
• Conformance - Conformance of the implementation model to design model is
crucial for the model quality. When it is broken we can no longer be sure that design-
model statements are true in the System.
• Usability – Different UI concept than programming IDEs, Change propagation and
validation
• Expressiveness – Limitations in UML profiles, other expressiveness
capabilities
• Interoperability problems
• Generative –
– No short route (Java-less)
– No short cycle
– Many languages
– Write code in an inappropriate environment
– Meta model changes require special activities from the user
Problems with existing practices
“Several areas need improvement:
• Detection of design flaws, omissions, and inconsistencies
…
• UML profiles support this work. UML 2.0 provides several facilities for defining such
profiles but little support for checking them.
• More consistency between UML models and system requirements as well as
implementations. Better mechanisms for traceability and round-trip engineering will
help reduce these problems. “
“In Practice : UML Software Architecture and Design Description”
Christian Lange, Eindhoven University of Technology, Michel Chaudron, Eindhoven University of Technology,
Johan Muskens, Philips Research; IEEE Software 3/4/2006 page 40
"This implies that, to change the meta-model it is necessary to reprogram the tool – an
impractical option that does not allow users the flexibility to easily refine UML."
"A Systematic Approach to Domain-Specific Language Design Using UML" B. Selic, isorc, pp. 2-9, 10th IEEE International
Symposium on Object and Component-Oriented Real-Time Distributed Computing (ISORC'07), 2007
Product line structure
Core language
Business-ApplicationFramework
Generic product
Customer A Customer B Customer C
Some facts
• Delivered >10 production systems during 2007
• Telco-grade – 50 TPS/CPU. Response time: 70 ms average, 250 ms 99%
• Customization time and effort dropped by an order of magnitude
• Generic product evolved in parallel
Numbers
• Customization - ~150,000 LOC
• 82% of the source lines-of-code in customization projects are declarative (model
classes and instances).
• The model contains :
– ~5500 classes
– more than 200 meta-classes
– tens of thousands of instances
– ~290,000 lines of code in model files (XML)
• Average Depth of Inheritance Tree (DIT) of model classes is 4.70.
• ~99% of the application Java source code is governed by the model (i.e. the classes
are defined in the model).
Principles of our approach
Java source
Compiled Java
Tools:Problems window
Auto completion
Navigation views
Re-factor tools
Java tooling
Runtime
platform
(JVM, J2EE)
• Source code validation (compiler)
• Incremental validation – few seconds
• Tooling
• Generic generation of runtime artifacts
Java IDE is proven to be efficient
Principles of our approach
Java sourceCompiled Java
Java Tools:Problems window
Auto completion
Navigation views
Refactor tools
Java tooling
Runtime platform
(JVM, J2EE)
• Source code validation (compiler)
• Incremental validation – few seconds
• Tooling
• Generic generation of runtime artifacts
• Java conformance validation
Model sources
Compiled model
Model Tools:Problems window
Auto completion
Navigation views
Refactor tools
Model tooling
Kernel
constrains Conformancevalidation
Java-like usability
Principles of our approach
• Model contains object graphs.
• The kernel instantiates the object
graphs
• Not all model changes require
change in Java
• Hence the short route (Java-less)
Java source
Compiled JavaJava Tools
Java tooling
Model sources
Compiled model
Model Tools
Model tooling
Runtime platform (JVM, J2EE)
Kernel
Dependency injection
Principles of our approach
• Meta-class - a class whose instances are classes as well.
• A programming language that support meta-class extensibility is classified as Class-
based object-oriented programming language :– Smalltalk
– MetaclassTalk
– IBM’s SOM (System Object Model).
– Lisp.
– Python.
– Ruby.
– Web Ontologies (OWL/Full)
• Mainstream OO languages do not support meta-class extensibility. doclets, attributes, aspect frameworks, annotations are the modern
alternatives.
“Metaclasses are deeper magic than 99% of users should ever worry about. If you wonder whether you
need them, you don't (the people who actually need them know with certainty that they need them, and
don't need an explanation about why).” Python Guru Tim Peters
Metaclass extensibility
Language
MetaClass
Developer
defined class
Instance
Instance-of
Instance-of
• This provides another managed meta-data layer.
• This allows managed adaptation in class level behavior.
Java.lang.Class
Customer
tableName=“CUSTOMER”
Customer123
Instance-of
Instance-of
PersistentClass
tableName String
Sub-class ofInstance-of
Instance-of
Language
MetaClass
Developer
defined class
Instance
Instance-of
Instance-of
Developer defined
MetaClass
Sub-class ofInstance-of
Instance-of
Principles of our approach
Metaclass extensibility
Principles of our approach
Pure object oriented
Objects
Classes
CustomerCustomer123
Field
Meta-Classes
PersistentClass
Method
MetaClassClass
MetaClass
Meta-class extensibility allows to define sets of sets that are subset of the set of all sets
Has name
Has fields
Has methods
Customer
Can be stored in DB
Can be queried
Transactional
PersistentClass
Catalog item
Movie
Order
Pricing
service
UI form
SecuredClass
StronglySecuredClass
BigCustomer
Has security key
Has 128 bit security key
• Typically, a class belongs to several classes. This is known as the multiple-inheritance problem.
Principles of our approach
Metaclass extensibility
Metaclass extensibility
Multiple inheritance/cross cutting aspects
• Explicit meta-classes
• Meta class properties are used to define aspects
• Aspect definitions constraint the classes to have the right aspect glued
• Polymorphic and Interception aspects
We base our approach on
• Explicit meta-class:
“Programming with Explicit Metaclasses in Smalltalk-80”,
Jean-Pierre Briot and Pierre Cointe
• Traits:
“Uniform and Safe Metaclass Composition“St´ephane Ducasse a Nathanael Sch¨arli a Roel Wuyts
Demo – dependency injection with Spring framework
http://springframework.org/
Example taken from - “Language support for Adaptive Object-Models using Metaclasses”,
Reza Razavi, Noury Bouraqadi ,Joseph Yoder, Jean-Fran¸cois Perrot, Ralph Johnson
Demo – Model driven dependency injection
Demo – Domain Specific Modeling Language
Demo – Domain Specific Modeling Language
Demo – Meta-class extensibility
Demo – Meta-class extensibility
Summary
• Interpretive approach –
– Dependency injection
– Executable model -the model is the source, java-less change processes
– The Java implementation is the interpreter of the model classes and
instances (behavior)
• Consistency and conformance –
– Formal modeling
– Generic object oriented well formedness rules
– Generic mapping rules
– Model compiler verifies Java conformance
Summary
• Java-like usability
– Compiler
– Incremental compilation
– Break and correct
– Problems window
– Auto-completion
– Views and navigation tools
– Re-factor tools
• Expressiveness –
– Meta-class extensibility.
– Aspects modeling.
– Enhanced modeling capabilities
– Continuous model
Summary
Currently working on runtime adaptivity
• The compiler is part of the runtime core allowing for runtime changes of the
model by end users
• The business-application framework component are reflective, hence
runtime changes of the model are production ready (e.g. web-services,
persistency)
Recommended