SlideShare a Scribd company logo
Interactive DSML Design
Andriy Levytskyy | MDD Consultant
Luminis Software Development B.V.

Practical Product Lines 2010
November 17 & 18
Venlo
Introduction

•  Goal:
DSL	
  Design:	
  approach,	
  pracBcal	
  techniques	
  
and	
  guidelines	
  
•  Disclaimer:
• 	
  No	
  100%	
  subject	
  coverage,	
  just	
  what	
  works	
  well	
  
• 	
  Limited	
  to	
  Visual	
  DSMLs	
  	
  
• 	
  TransformaBon	
  is	
  briefly	
  touched	
  on	
  
2
Tutorial Overview
Hands-on
case

1

Basics of Domain Analysis

2
3

Exercise: domain selection, analysis
Language Design

4
5

Exercise: abstract metamodel
Language Implementation

6
5

Exercise: executable metamodel, code generator
Round-up
3
Introducing each other
Name:
Company:
Function:
Domain:
Specialization:
Experience with MDD:
Expectations:

4
•  Paradigm
•  Basic Techniques
•  Guidelines
•  Added value

BASICS OF DOMAIN
ANALYSIS
5
Analysis Paradigm

R
Generalization

Entity (E) – concepts
Relationship (R) –
connection among Es

Entity

Generalization –
for sake of the DRY
principle
Business rules – text
notes in KISS style

name
n description

n

R

n

n

name
6
Analysis Techniques:
Dictionary
Driver

Motor

Rule of Thumb:
•  Nouns are Es
•  Verbs are Rs


Steering
wheel

Automobile

Wheel

Sedan

Door

7
Analysis Techniques:
Generalization
Full notation

Short-hand
Motor

Motor

has

has

Automobile

Automobile
Automobile

is a

Sedan

Sedan
•  Focus on what matters.
•  Move repeatable information
away w/o loosing track of it.

8
Analysis Techniques:
Multiple Classification (1/2)
Consider a car that
is either personal or
cargo, travels over
water or on land..

Vehicle

Cargo

travel

People

content

General
i za
or discrim tion set
inator

Craft

Land

Generalizations
within a set can’t
be combined.

Automobile
9
Analysis Techniques:
Multiple Classification (2/2)

has

People

Cargo
omain rule:
D
Only personal
vehicle have
passenger seats

No need to create concepts
for all possible combinations.
content

n

Passenger
seat

Vehicle

Better expressiveness.
Better display of information.
Rules can be expressed via
structure instead of text.

Automobile
10
Analysis Techniques:
Roles (1/4)
Role is a particular aspect or
usage of a concept that is
utilized in a specific context.
Context is the (changing) circumstances
(i.e. other "surrounding" concepts) under
which the concept is being used.
Therefore such a concept can
have several roles.

•  Reduction in the number of concepts.
•  Enhances expressive power for modeling.
11
Dynamic: 1 Object, * Things, * Times
W/O Roles

With Roles

times

Person
Employee

Student

Retiree

Student

Person

Retiree

surroundings

Employee

Man
Husband

Son

Father
Husband

Son

Man

Father

12
Reduction Example (3/4)

W/O Roles
has
2
Rear
wheel

Car

With Roles
has
2
Front
wheel

has

has

Car

2
rear

Wheel

2
front

13
Expressiveness Example (4/4)

W/O Roles

Car

With Roles
has

has

Car

has 4
Wheel

2
rear

Wheel

2
front

14
Analysis Guidelines & Tips
•  When stuck ask domain expert for more information
•  Apply Law of preservation to extracted information
•  Define depth and scope of domain around needs of end users
•  Avoid working on domain model from the time/process perspective
•  Expose all information visually as entities <= facilitates discussion
•  Use multiple classification over role if:
•  Classifications are exclusive
•  Roles need to be more prominent.
•  Entities have no properties nor attributes (except for Name)
•  Resist tendency of putting info in business rules/comments
•  Use Wikipedia for generic vocabularies/classifications
•  Avoid large diagrams
•  Iterate analysis-modeling-review until the model:
•  Consistent, adequate, has no gaps, “feels” right
15
Added value

Great intro

Finally an overview!

Trainee
Developer
Domain
Expert
Domain Model
Great DSL
concepts!!!

Meta-developer

The more uses, "
le DSL..
the more sustainab
el.
The most stable mod
odel,
The less abstract m
and
the less uses it has,
the less stable it is.


I clearly see
variability

Software
Architect
16
•  Choose a domain
•  Extract concepts
•  Organize concepts
•  Review

EXERCISE: DOMAIN ANALYSIS

17
•  What is language?
•  Paradigm
•  Guidelines

LANGUAGE DESIGN

18
What is a Metamodel?
1
Car

A language definition comprised of:
§ concepts and their interrelations
(abstract syntax)
§ form (concrete syntax):

2
rear

2
Wheel

front

*

Ø Textual
Ø Graphical
Ø Combination

§ meaning (semantics):

*

Ø Often realized via transformation
19
Design Paradigm

Analysis

Design
n

Entity

Syntax

name
description
Good languages:
•  ER
•  Class Diagrams

Entity
name
attributes
description

Constraint
n
20
Design Guidelines & Tips

•  Stay consistent with domain model
•  Focus on variability/configuration and “mass” production
•  Do not focus on aspects (leave it to transformations)
•  Use generalization
•  No multiple classifications => entities or properties
•  No roles => entities or properties
•  Add administrative attributes, such as id, version, title, etc..
•  No constructors, no interface definitions, no XML, no Java, etc..
•  Consider breaking the domain model into multiple DSLs based on:
•  high cohesion and low coupling of concepts
•  different change frequency of concepts instances
21
•  Translate domain model to DSL design(s)
•  Choose additional semantic domain, e.g. HTML
•  How your concepts are related to the semantic domain?

EXERCISE: DSL DESIGN

22
•  Tool Selection
•  AToM3 Introduction

LANGUAGE
IMPLEMENTATION
23
Tool Selection

Selection guidelines:
•  No meaningful guidelines exist
•  My advice: Choose tools that are as close to design paradigm as
possible (raise level of abstraction)
Skipped Candidates:
✘Eclipse based tools
✘Tools from industry heavyweights (IBM, Microsoft, Borland)
✘Popular DSL tools
(Would not fit into the allocated time or will spend time clicking/typing
in many dialogue windows)
24
AToM3

25
DSL Specification In
AToM3

AToM3Object
cardinality
attributes
constraints
appearance

Abstract syntax – ER
paradigm
Rules/constraints –
python language

AToM3Object

Entity
name
n description

Concrete Syntax –
simple vector editor
Semantics – GG based
transformation system

n

AToM3Object

n

n

Relationship
26
•  Translate DSL design to AToM3 metamodel
•  Making a simple generator (e.g. for HTML)
•  Test-drive of the DSL

EXERCISE:
DSL IMPLEMENTATION
27
•  DSLs: Familiar and Different
•  A few bad practices
•  References
•  Any questions?

ROUND-UP

28
DSLs are Familiar..

•  DSL development is a software development process
•  DSL is a very special, but still a software system
•  Status quo: DSL development still done at PSM (i.e. coding/3GLs)
•  With all consequences
•  All best practices from SE apply here as well:
•  Good analysis
•  Modeling to raise abstraction
•  Modeling architectures (e.g. MDA’s CIM/PIM/PSM), etc..
29
.. And Yet Different

•  Clients do not know domain concepts <= agile
•  Metamodels are more domain-driven <= good domain analysis
•  No one wants a vendor lock <= CIM/PIM/PSM/
•  DSLs are very specific systems <= automate DSL development
Best SE pract
ices
are even mor
e
important wit
h
DSLs!

30
A Few Bad Practices

•  Lack of domain understanding
•  Too generic/too specific
•  Letting the tool dictate language analysis design
•  Failing to consider the language’s real-life usage
•  Top/down and bottom/up confusion => inflexible MDD
•  and more (see [3])…

31
References

[1] Eric Evans. Domain-Driven Design: Tacking Complexity In the
Heart of Software. Addison-Wesley Longman Publishing Co., Inc.,
Boston, MA, USA, 2003.
[2] Martin Fowler and Kendall Scott. UML Distilled: A Brief Guide to
the Standard Object Modeling Language. Addison-Wesley
Longman Publishing Co., Inc., Boston, MA, USA, 3rd edition, 2003.
[3] Steven Kelly and Risto Pohjonen. Worst Practices for DomainSpecific Modeling. IEEE Software, vol. 26, no. 4, pp. 22-29, July/
Aug. 2009. doi:10.1109/MS.2009.109
[4] Steven Kelly and Juha-Pekka Tolvanen, Domain-Specific
Modeling, enabling full code generation, Wiley-Blackwell, 2008.
32
http://lsd.luminis.eu
andriy.levytskyy@luminis.eu
http://nl.linkedin.com/in/andriylevytskyy
http://lsd.luminis.eu/tag/mdd/
http://twitter.com/levytsky

33

More Related Content

What's hot

Introduction To Domain Driven Design
Introduction To Domain Driven DesignIntroduction To Domain Driven Design
Introduction To Domain Driven DesignPaul Rayner
 
Domain Driven Design - Distillation - Chapter 15
Domain Driven Design - Distillation - Chapter 15Domain Driven Design - Distillation - Chapter 15
Domain Driven Design - Distillation - Chapter 15Mark Windholtz
 
How to Implement Domain Driven Design in Real Life SDLC
How to Implement Domain Driven Design  in Real Life SDLCHow to Implement Domain Driven Design  in Real Life SDLC
How to Implement Domain Driven Design in Real Life SDLCAbdul Karim
 
Domain Driven Design (DDD)
Domain Driven Design (DDD)Domain Driven Design (DDD)
Domain Driven Design (DDD)Tom Kocjan
 
Domain Driven Design Communication Techniques
Domain Driven Design Communication TechniquesDomain Driven Design Communication Techniques
Domain Driven Design Communication TechniquesMark Windholtz
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignNader Albert
 
Domain Driven Design - Building Blocks
Domain Driven Design - Building BlocksDomain Driven Design - Building Blocks
Domain Driven Design - Building BlocksMark Windholtz
 
Domain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic PatternsDomain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic PatternsMark Windholtz
 
Simon Brown: Software Architecture as Code at I T.A.K.E. Unconference 2015
Simon Brown: Software Architecture as Code at I T.A.K.E. Unconference 2015Simon Brown: Software Architecture as Code at I T.A.K.E. Unconference 2015
Simon Brown: Software Architecture as Code at I T.A.K.E. Unconference 2015Mozaic Works
 
ZendCon 2011 UnCon Domain-Driven Design
ZendCon 2011 UnCon Domain-Driven DesignZendCon 2011 UnCon Domain-Driven Design
ZendCon 2011 UnCon Domain-Driven DesignBradley Holt
 
Fundamentals Of Software Architecture
Fundamentals Of Software ArchitectureFundamentals Of Software Architecture
Fundamentals Of Software ArchitectureMarkus Voelter
 
[2015/2016] Introduction to software architecture
[2015/2016] Introduction to software architecture[2015/2016] Introduction to software architecture
[2015/2016] Introduction to software architectureIvano Malavolta
 
Software Architecture and Design - An Overview
Software Architecture and Design - An OverviewSoftware Architecture and Design - An Overview
Software Architecture and Design - An OverviewOliver Stadie
 

What's hot (16)

Introduction To Domain Driven Design
Introduction To Domain Driven DesignIntroduction To Domain Driven Design
Introduction To Domain Driven Design
 
Domain Driven Design - Distillation - Chapter 15
Domain Driven Design - Distillation - Chapter 15Domain Driven Design - Distillation - Chapter 15
Domain Driven Design - Distillation - Chapter 15
 
How to Implement Domain Driven Design in Real Life SDLC
How to Implement Domain Driven Design  in Real Life SDLCHow to Implement Domain Driven Design  in Real Life SDLC
How to Implement Domain Driven Design in Real Life SDLC
 
Domain Driven Design (DDD)
Domain Driven Design (DDD)Domain Driven Design (DDD)
Domain Driven Design (DDD)
 
Domain Driven Design Communication Techniques
Domain Driven Design Communication TechniquesDomain Driven Design Communication Techniques
Domain Driven Design Communication Techniques
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design - Building Blocks
Domain Driven Design - Building BlocksDomain Driven Design - Building Blocks
Domain Driven Design - Building Blocks
 
Domain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic PatternsDomain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic Patterns
 
Simon Brown: Software Architecture as Code at I T.A.K.E. Unconference 2015
Simon Brown: Software Architecture as Code at I T.A.K.E. Unconference 2015Simon Brown: Software Architecture as Code at I T.A.K.E. Unconference 2015
Simon Brown: Software Architecture as Code at I T.A.K.E. Unconference 2015
 
ZendCon 2011 UnCon Domain-Driven Design
ZendCon 2011 UnCon Domain-Driven DesignZendCon 2011 UnCon Domain-Driven Design
ZendCon 2011 UnCon Domain-Driven Design
 
Fundamentals Of Software Architecture
Fundamentals Of Software ArchitectureFundamentals Of Software Architecture
Fundamentals Of Software Architecture
 
SDWest2005Goetsch
SDWest2005GoetschSDWest2005Goetsch
SDWest2005Goetsch
 
User-centred design
User-centred designUser-centred design
User-centred design
 
[2015/2016] Introduction to software architecture
[2015/2016] Introduction to software architecture[2015/2016] Introduction to software architecture
[2015/2016] Introduction to software architecture
 
Week3 to-design
Week3 to-designWeek3 to-design
Week3 to-design
 
Software Architecture and Design - An Overview
Software Architecture and Design - An OverviewSoftware Architecture and Design - An Overview
Software Architecture and Design - An Overview
 

Viewers also liked

Web based tool for domain specific modeling
Web based tool for domain specific modeling Web based tool for domain specific modeling
Web based tool for domain specific modeling PG Scholar
 
Collaboro - EclipseCon France 2013 - Ignite Talks Session
Collaboro - EclipseCon France 2013 - Ignite Talks SessionCollaboro - EclipseCon France 2013 - Ignite Talks Session
Collaboro - EclipseCon France 2013 - Ignite Talks SessionHugo Bruneliere
 
Domain specific modelling (DSM)
Domain specific modelling (DSM)Domain specific modelling (DSM)
Domain specific modelling (DSM)PG Scholar
 
Collaborative editing of emf ecore meta models and models conflict detection,...
Collaborative editing of emf ecore meta models and models conflict detection,...Collaborative editing of emf ecore meta models and models conflict detection,...
Collaborative editing of emf ecore meta models and models conflict detection,...Amanuel Alemayehu
 
IBM Connections 4.5 bidirectional synchronization
IBM Connections 4.5 bidirectional synchronizationIBM Connections 4.5 bidirectional synchronization
IBM Connections 4.5 bidirectional synchronizationmichele buccarello
 
Collaborative modeling and metamodeling in MetaEdit+
Collaborative modeling and metamodeling in MetaEdit+Collaborative modeling and metamodeling in MetaEdit+
Collaborative modeling and metamodeling in MetaEdit+Juha-Pekka Tolvanen
 
Dover Street Market Brand Report
Dover Street Market Brand ReportDover Street Market Brand Report
Dover Street Market Brand ReportJames Tustin
 
20 examples on Domain-Specific Modeling Languages
20 examples on Domain-Specific Modeling Languages20 examples on Domain-Specific Modeling Languages
20 examples on Domain-Specific Modeling LanguagesJuha-Pekka Tolvanen
 
SiriusCon2016 - Une plateforme de modelisation support au PLM de l'ingenierie...
SiriusCon2016 - Une plateforme de modelisation support au PLM de l'ingenierie...SiriusCon2016 - Une plateforme de modelisation support au PLM de l'ingenierie...
SiriusCon2016 - Une plateforme de modelisation support au PLM de l'ingenierie...Obeo
 
Collaborative modeling with sirius
Collaborative modeling with siriusCollaborative modeling with sirius
Collaborative modeling with siriuspcdavid_
 
Gulp入門 - コーディングを10倍速くする
Gulp入門 - コーディングを10倍速くするGulp入門 - コーディングを10倍速くする
Gulp入門 - コーディングを10倍速くするHayashi Yuichi
 

Viewers also liked (13)

What is clooca
What is cloocaWhat is clooca
What is clooca
 
Dianóstico
DianósticoDianóstico
Dianóstico
 
Web based tool for domain specific modeling
Web based tool for domain specific modeling Web based tool for domain specific modeling
Web based tool for domain specific modeling
 
Collaboro - EclipseCon France 2013 - Ignite Talks Session
Collaboro - EclipseCon France 2013 - Ignite Talks SessionCollaboro - EclipseCon France 2013 - Ignite Talks Session
Collaboro - EclipseCon France 2013 - Ignite Talks Session
 
Domain specific modelling (DSM)
Domain specific modelling (DSM)Domain specific modelling (DSM)
Domain specific modelling (DSM)
 
Collaborative editing of emf ecore meta models and models conflict detection,...
Collaborative editing of emf ecore meta models and models conflict detection,...Collaborative editing of emf ecore meta models and models conflict detection,...
Collaborative editing of emf ecore meta models and models conflict detection,...
 
IBM Connections 4.5 bidirectional synchronization
IBM Connections 4.5 bidirectional synchronizationIBM Connections 4.5 bidirectional synchronization
IBM Connections 4.5 bidirectional synchronization
 
Collaborative modeling and metamodeling in MetaEdit+
Collaborative modeling and metamodeling in MetaEdit+Collaborative modeling and metamodeling in MetaEdit+
Collaborative modeling and metamodeling in MetaEdit+
 
Dover Street Market Brand Report
Dover Street Market Brand ReportDover Street Market Brand Report
Dover Street Market Brand Report
 
20 examples on Domain-Specific Modeling Languages
20 examples on Domain-Specific Modeling Languages20 examples on Domain-Specific Modeling Languages
20 examples on Domain-Specific Modeling Languages
 
SiriusCon2016 - Une plateforme de modelisation support au PLM de l'ingenierie...
SiriusCon2016 - Une plateforme de modelisation support au PLM de l'ingenierie...SiriusCon2016 - Une plateforme de modelisation support au PLM de l'ingenierie...
SiriusCon2016 - Une plateforme de modelisation support au PLM de l'ingenierie...
 
Collaborative modeling with sirius
Collaborative modeling with siriusCollaborative modeling with sirius
Collaborative modeling with sirius
 
Gulp入門 - コーディングを10倍速くする
Gulp入門 - コーディングを10倍速くするGulp入門 - コーディングを10倍速くする
Gulp入門 - コーディングを10倍速くする
 

Similar to Interactive DSML Design

Domain-Driven Design (Artur Trosin Product Stream)
Domain-Driven Design (Artur Trosin Product Stream)Domain-Driven Design (Artur Trosin Product Stream)
Domain-Driven Design (Artur Trosin Product Stream)IT Arena
 
Model-driven and low-code development for event-based systems | Bobby Calderw...
Model-driven and low-code development for event-based systems | Bobby Calderw...Model-driven and low-code development for event-based systems | Bobby Calderw...
Model-driven and low-code development for event-based systems | Bobby Calderw...HostedbyConfluent
 
Domain Driven Design Ruby Ways - JURNAL 05/10/2017
Domain Driven Design Ruby Ways -  JURNAL 05/10/2017Domain Driven Design Ruby Ways -  JURNAL 05/10/2017
Domain Driven Design Ruby Ways - JURNAL 05/10/2017Jonathan Wylliem
 
Engage 2020 - Best Practices for analyzing Domino Applications
Engage 2020 - Best Practices for analyzing Domino ApplicationsEngage 2020 - Best Practices for analyzing Domino Applications
Engage 2020 - Best Practices for analyzing Domino Applicationspanagenda
 
The 360 Developer
The 360 DeveloperThe 360 Developer
The 360 Developerenteritos
 
Domain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic ApproachDomain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic ApproachPanagiotis Papaioannou
 
An Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHPAn Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHPChris Renner
 
Domain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic ApproachDomain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic ApproachPanagiotis Papaioannou
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignLalit Kale
 
Agile, Automated, Aware: How to Model for Success
Agile, Automated, Aware: How to Model for SuccessAgile, Automated, Aware: How to Model for Success
Agile, Automated, Aware: How to Model for SuccessInside Analysis
 
Software Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry PracticesSoftware Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry PracticesAlfred Jett Grandeza
 
"X" Driven-Development Methodologies
"X" Driven-Development Methodologies"X" Driven-Development Methodologies
"X" Driven-Development MethodologiesDamian T. Gordon
 

Similar to Interactive DSML Design (20)

Domain-Driven Design (Artur Trosin Product Stream)
Domain-Driven Design (Artur Trosin Product Stream)Domain-Driven Design (Artur Trosin Product Stream)
Domain-Driven Design (Artur Trosin Product Stream)
 
The Role of the Architect
The Role of the ArchitectThe Role of the Architect
The Role of the Architect
 
Model-driven and low-code development for event-based systems | Bobby Calderw...
Model-driven and low-code development for event-based systems | Bobby Calderw...Model-driven and low-code development for event-based systems | Bobby Calderw...
Model-driven and low-code development for event-based systems | Bobby Calderw...
 
Software Design
Software DesignSoftware Design
Software Design
 
Domain Driven Design Ruby Ways - JURNAL 05/10/2017
Domain Driven Design Ruby Ways -  JURNAL 05/10/2017Domain Driven Design Ruby Ways -  JURNAL 05/10/2017
Domain Driven Design Ruby Ways - JURNAL 05/10/2017
 
Engage 2020 - Best Practices for analyzing Domino Applications
Engage 2020 - Best Practices for analyzing Domino ApplicationsEngage 2020 - Best Practices for analyzing Domino Applications
Engage 2020 - Best Practices for analyzing Domino Applications
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
The 360 Developer
The 360 DeveloperThe 360 Developer
The 360 Developer
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Domain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic ApproachDomain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic Approach
 
An Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHPAn Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHP
 
Domain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic ApproachDomain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic Approach
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Agile, Automated, Aware: How to Model for Success
Agile, Automated, Aware: How to Model for SuccessAgile, Automated, Aware: How to Model for Success
Agile, Automated, Aware: How to Model for Success
 
Software Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry PracticesSoftware Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry Practices
 
DOMAIN DRIVER DESIGN
DOMAIN DRIVER DESIGNDOMAIN DRIVER DESIGN
DOMAIN DRIVER DESIGN
 
The art of project estimation
The art of project estimationThe art of project estimation
The art of project estimation
 
"X" Driven-Development Methodologies
"X" Driven-Development Methodologies"X" Driven-Development Methodologies
"X" Driven-Development Methodologies
 
Unit 2
Unit 2Unit 2
Unit 2
 

Recently uploaded

Expert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting ServicesExpert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting ServicesResDraft
 
Common Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid themCommon Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid themmadhavlakhanpal29
 
Transforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting ProfitabilityTransforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting Profitabilityaaryangarg12
 
National-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptxNational-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptxAlecAnidul
 
The Evolution of Fashion Trends: History to Fashion
The Evolution of Fashion Trends: History to FashionThe Evolution of Fashion Trends: History to Fashion
The Evolution of Fashion Trends: History to FashionPixel poets
 
Book Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for DesignersBook Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for DesignersConfidence Ago
 
CA OFFICE office office office _VIEWS.pdf
CA OFFICE office office office _VIEWS.pdfCA OFFICE office office office _VIEWS.pdf
CA OFFICE office office office _VIEWS.pdfSudhanshuMandlik
 
Top 5 Indian Style Modular Kitchen Designs
Top 5 Indian Style Modular Kitchen DesignsTop 5 Indian Style Modular Kitchen Designs
Top 5 Indian Style Modular Kitchen DesignsFinzo Kitchens
 
Art Nouveau Movement Presentation for Art History.
Art Nouveau Movement Presentation for Art History.Art Nouveau Movement Presentation for Art History.
Art Nouveau Movement Presentation for Art History.rrimika1
 
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdfPORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdffabianavillanib
 
The Design Code Google Developer Student Club.pptx
The Design Code Google Developer Student Club.pptxThe Design Code Google Developer Student Club.pptx
The Design Code Google Developer Student Club.pptxadityakushalsaha
 

Recently uploaded (11)

Expert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting ServicesExpert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting Services
 
Common Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid themCommon Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid them
 
Transforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting ProfitabilityTransforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting Profitability
 
National-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptxNational-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptx
 
The Evolution of Fashion Trends: History to Fashion
The Evolution of Fashion Trends: History to FashionThe Evolution of Fashion Trends: History to Fashion
The Evolution of Fashion Trends: History to Fashion
 
Book Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for DesignersBook Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for Designers
 
CA OFFICE office office office _VIEWS.pdf
CA OFFICE office office office _VIEWS.pdfCA OFFICE office office office _VIEWS.pdf
CA OFFICE office office office _VIEWS.pdf
 
Top 5 Indian Style Modular Kitchen Designs
Top 5 Indian Style Modular Kitchen DesignsTop 5 Indian Style Modular Kitchen Designs
Top 5 Indian Style Modular Kitchen Designs
 
Art Nouveau Movement Presentation for Art History.
Art Nouveau Movement Presentation for Art History.Art Nouveau Movement Presentation for Art History.
Art Nouveau Movement Presentation for Art History.
 
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdfPORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
 
The Design Code Google Developer Student Club.pptx
The Design Code Google Developer Student Club.pptxThe Design Code Google Developer Student Club.pptx
The Design Code Google Developer Student Club.pptx
 

Interactive DSML Design

  • 1. Interactive DSML Design Andriy Levytskyy | MDD Consultant Luminis Software Development B.V. Practical Product Lines 2010 November 17 & 18 Venlo
  • 2. Introduction •  Goal: DSL  Design:  approach,  pracBcal  techniques   and  guidelines   •  Disclaimer: •   No  100%  subject  coverage,  just  what  works  well   •   Limited  to  Visual  DSMLs     •   TransformaBon  is  briefly  touched  on   2
  • 3. Tutorial Overview Hands-on case 1 Basics of Domain Analysis 2 3 Exercise: domain selection, analysis Language Design 4 5 Exercise: abstract metamodel Language Implementation 6 5 Exercise: executable metamodel, code generator Round-up 3
  • 5. •  Paradigm •  Basic Techniques •  Guidelines •  Added value BASICS OF DOMAIN ANALYSIS 5
  • 6. Analysis Paradigm R Generalization Entity (E) – concepts Relationship (R) – connection among Es Entity Generalization – for sake of the DRY principle Business rules – text notes in KISS style name n description n R n n name 6
  • 7. Analysis Techniques: Dictionary Driver Motor Rule of Thumb: •  Nouns are Es •  Verbs are Rs Steering wheel Automobile Wheel Sedan Door 7
  • 8. Analysis Techniques: Generalization Full notation Short-hand Motor Motor has has Automobile Automobile Automobile is a Sedan Sedan •  Focus on what matters. •  Move repeatable information away w/o loosing track of it. 8
  • 9. Analysis Techniques: Multiple Classification (1/2) Consider a car that is either personal or cargo, travels over water or on land.. Vehicle Cargo travel People content General i za or discrim tion set inator Craft Land Generalizations within a set can’t be combined. Automobile 9
  • 10. Analysis Techniques: Multiple Classification (2/2) has People Cargo omain rule: D Only personal vehicle have passenger seats No need to create concepts for all possible combinations. content n Passenger seat Vehicle Better expressiveness. Better display of information. Rules can be expressed via structure instead of text. Automobile 10
  • 11. Analysis Techniques: Roles (1/4) Role is a particular aspect or usage of a concept that is utilized in a specific context. Context is the (changing) circumstances (i.e. other "surrounding" concepts) under which the concept is being used. Therefore such a concept can have several roles. •  Reduction in the number of concepts. •  Enhances expressive power for modeling. 11
  • 12. Dynamic: 1 Object, * Things, * Times W/O Roles With Roles times Person Employee Student Retiree Student Person Retiree surroundings Employee Man Husband Son Father Husband Son Man Father 12
  • 13. Reduction Example (3/4) W/O Roles has 2 Rear wheel Car With Roles has 2 Front wheel has has Car 2 rear Wheel 2 front 13
  • 14. Expressiveness Example (4/4) W/O Roles Car With Roles has has Car has 4 Wheel 2 rear Wheel 2 front 14
  • 15. Analysis Guidelines & Tips •  When stuck ask domain expert for more information •  Apply Law of preservation to extracted information •  Define depth and scope of domain around needs of end users •  Avoid working on domain model from the time/process perspective •  Expose all information visually as entities <= facilitates discussion •  Use multiple classification over role if: •  Classifications are exclusive •  Roles need to be more prominent. •  Entities have no properties nor attributes (except for Name) •  Resist tendency of putting info in business rules/comments •  Use Wikipedia for generic vocabularies/classifications •  Avoid large diagrams •  Iterate analysis-modeling-review until the model: •  Consistent, adequate, has no gaps, “feels” right 15
  • 16. Added value Great intro Finally an overview! Trainee Developer Domain Expert Domain Model Great DSL concepts!!! Meta-developer The more uses, " le DSL.. the more sustainab el. The most stable mod odel, The less abstract m and the less uses it has, the less stable it is. I clearly see variability Software Architect 16
  • 17. •  Choose a domain •  Extract concepts •  Organize concepts •  Review EXERCISE: DOMAIN ANALYSIS 17
  • 18. •  What is language? •  Paradigm •  Guidelines LANGUAGE DESIGN 18
  • 19. What is a Metamodel? 1 Car A language definition comprised of: § concepts and their interrelations (abstract syntax) § form (concrete syntax): 2 rear 2 Wheel front * Ø Textual Ø Graphical Ø Combination § meaning (semantics): * Ø Often realized via transformation 19
  • 20. Design Paradigm Analysis Design n Entity Syntax name description Good languages: •  ER •  Class Diagrams Entity name attributes description Constraint n 20
  • 21. Design Guidelines & Tips •  Stay consistent with domain model •  Focus on variability/configuration and “mass” production •  Do not focus on aspects (leave it to transformations) •  Use generalization •  No multiple classifications => entities or properties •  No roles => entities or properties •  Add administrative attributes, such as id, version, title, etc.. •  No constructors, no interface definitions, no XML, no Java, etc.. •  Consider breaking the domain model into multiple DSLs based on: •  high cohesion and low coupling of concepts •  different change frequency of concepts instances 21
  • 22. •  Translate domain model to DSL design(s) •  Choose additional semantic domain, e.g. HTML •  How your concepts are related to the semantic domain? EXERCISE: DSL DESIGN 22
  • 23. •  Tool Selection •  AToM3 Introduction LANGUAGE IMPLEMENTATION 23
  • 24. Tool Selection Selection guidelines: •  No meaningful guidelines exist •  My advice: Choose tools that are as close to design paradigm as possible (raise level of abstraction) Skipped Candidates: ✘Eclipse based tools ✘Tools from industry heavyweights (IBM, Microsoft, Borland) ✘Popular DSL tools (Would not fit into the allocated time or will spend time clicking/typing in many dialogue windows) 24
  • 26. DSL Specification In AToM3 AToM3Object cardinality attributes constraints appearance Abstract syntax – ER paradigm Rules/constraints – python language AToM3Object Entity name n description Concrete Syntax – simple vector editor Semantics – GG based transformation system n AToM3Object n n Relationship 26
  • 27. •  Translate DSL design to AToM3 metamodel •  Making a simple generator (e.g. for HTML) •  Test-drive of the DSL EXERCISE: DSL IMPLEMENTATION 27
  • 28. •  DSLs: Familiar and Different •  A few bad practices •  References •  Any questions? ROUND-UP 28
  • 29. DSLs are Familiar.. •  DSL development is a software development process •  DSL is a very special, but still a software system •  Status quo: DSL development still done at PSM (i.e. coding/3GLs) •  With all consequences •  All best practices from SE apply here as well: •  Good analysis •  Modeling to raise abstraction •  Modeling architectures (e.g. MDA’s CIM/PIM/PSM), etc.. 29
  • 30. .. And Yet Different •  Clients do not know domain concepts <= agile •  Metamodels are more domain-driven <= good domain analysis •  No one wants a vendor lock <= CIM/PIM/PSM/ •  DSLs are very specific systems <= automate DSL development Best SE pract ices are even mor e important wit h DSLs! 30
  • 31. A Few Bad Practices •  Lack of domain understanding •  Too generic/too specific •  Letting the tool dictate language analysis design •  Failing to consider the language’s real-life usage •  Top/down and bottom/up confusion => inflexible MDD •  and more (see [3])… 31
  • 32. References [1] Eric Evans. Domain-Driven Design: Tacking Complexity In the Heart of Software. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2003. [2] Martin Fowler and Kendall Scott. UML Distilled: A Brief Guide to the Standard Object Modeling Language. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 3rd edition, 2003. [3] Steven Kelly and Risto Pohjonen. Worst Practices for DomainSpecific Modeling. IEEE Software, vol. 26, no. 4, pp. 22-29, July/ Aug. 2009. doi:10.1109/MS.2009.109 [4] Steven Kelly and Juha-Pekka Tolvanen, Domain-Specific Modeling, enabling full code generation, Wiley-Blackwell, 2008. 32