pontis’ interpretive mdd platform - bgusepl/wiki.files/pontis... · • 82% of the source...

25
Pontis’ Interpretive MDD platform May 2008

Upload: others

Post on 31-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

Pontis’ Interpretive MDD platform

May 2008

Page 2: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

Agenda

• Background

• Model driven development

• Problems with main-stream approaches

• Product line structure

• Some facts

• The principles of our approach

• Detailed description

• Summary

Page 3: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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

Page 4: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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

Page 5: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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

Page 6: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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

Page 7: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

Product line structure

Core language

Business-ApplicationFramework

Generic product

Customer A Customer B Customer C

Page 8: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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

Page 9: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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

Page 10: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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

Page 11: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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

Page 12: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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

Page 13: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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

Page 14: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

Principles of our approach

Pure object oriented

Objects

Classes

CustomerCustomer123

Field

Meta-Classes

PersistentClass

Method

MetaClassClass

Page 15: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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

Page 16: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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

Page 17: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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

Page 18: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

Demo – Model driven dependency injection

Page 19: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

Demo – Domain Specific Modeling Language

Page 20: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

Demo – Domain Specific Modeling Language

Page 21: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

Demo – Meta-class extensibility

Page 22: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

Demo – Meta-class extensibility

Page 23: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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

Page 24: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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

Page 25: Pontis’ Interpretive MDD platform - BGUsepl/wiki.files/Pontis... · • 82% of the source lines-of-code in customization projects are declarative (model classes and instances)

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)