1 partial domain specific models jos warmerordina anneke kleppeuniversity of twente oopsla workshop...

15
1 Partial Domain Specific Models Jos Warmer Ordina Anneke Kleppe University of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

Upload: peter-mcbride

Post on 05-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Partial Domain Specific Models Jos WarmerOrdina Anneke KleppeUniversity of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

1

Partial Domain Specific Models

Jos Warmer OrdinaAnneke Kleppe University of Twente

OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

Page 2: 1 Partial Domain Specific Models Jos WarmerOrdina Anneke KleppeUniversity of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

OOPSLA Worskop on Domain Specifoc Modeling 2006 2

SMART-Microsoft Architecture

Data sources Data sources

Services Services

Presentation layerPresentation layer

Business layerBusiness layer

Data layerData layer

UtilitiesUtilities

Users

User Interface components

User Processes

Service Interfaces

Business WorkflowsBusiness Processes

Data Access Logic Components

Service Agents

Secu

rity

Op

era

tion

al M

an

ag

em

en

t

Com

mu

nica

tion

Data Service Agents

Business Classes

Data contractData contract

DTO

View DTO

Ord

ina D

SL S

pecifi

c Fram

ew

orks

Ord

ina C

ore

Fram

ew

ork

Page 3: 1 Partial Domain Specific Models Jos WarmerOrdina Anneke KleppeUniversity of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

OOPSLA Worskop on Domain Specifoc Modeling 2006 3

SMART-Microsoft DSL Overview

Page 4: 1 Partial Domain Specific Models Jos WarmerOrdina Anneke KleppeUniversity of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

OOPSLA Worskop on Domain Specifoc Modeling 2006 4

SMART-Microsoft DSL’s

GeneriekFramework

Class MyClass{ public string Hello() { return “Hello world”; }}

<@Page /><HTML><BODY> Hello World</BODY></HTML>

Class MyClass{ public string Hello() { return “Hello world”; }}

Class MyClass{ public string Hello() { return “Hello world”; }}

CREATE TABLE MyTableFIELD1 intFIELD2 varchar(50)

<Mapping> <Class> <Table></Mapping>

DSLSpecifiek

Framework

DSLSpecifiek

Framework

DSLSpecifiek

Framework

Page 5: 1 Partial Domain Specific Models Jos WarmerOrdina Anneke KleppeUniversity of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

OOPSLA Worskop on Domain Specifoc Modeling 2006

Problems with UML

UML is a huge languag e

• UML as-is is not useable, need profiles

• Creating UML profiles is complex (i.e. needs to understand the UML2 metamodel )

• “Configuring” UML tools to validate the profiles is complex

• Code generation is complex

• UML modeling tools do not scale up easily

• Multi user modeling is horrifying

• Version control is complex

• Developers need to use two different tools with export /import

5

Page 6: 1 Partial Domain Specific Models Jos WarmerOrdina Anneke KleppeUniversity of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

OOPSLA Worskop on Domain Specifoc Modeling 2006

PoC with Microsoft DSL Tools

Positive

• Stability very good

• Usability for the modeler good

• Good integration with VS2005 gives seamless developer experience

• Open environment, e.g. validation framework, VS2005 SDK

Problems

• No support for large models

• No support for references between models

• No support for views

• No repository

6

Page 7: 1 Partial Domain Specific Models Jos WarmerOrdina Anneke KleppeUniversity of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

OOPSLA Worskop on Domain Specifoc Modeling 2006

Small Models

Multiple ‘independent’ DSL’s

Multiple ‘independent’ models per DSL

7

Typlical development situation: multiple models for each DSL.

Web Scenario

Model

Web Scenario DSL

Web Scenario

Model

Web Scenario

Model

Data Contract DSL

Data ContractModel

Data ContractModel

Data ContractModel

ServiceDSL

ServiceModel

ServiceModel

ServiceModel

Page 8: 1 Partial Domain Specific Models Jos WarmerOrdina Anneke KleppeUniversity of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

OOPSLA Worskop on Domain Specifoc Modeling 2006 8

References Between Models

Web Scenario Model 1 Web Scenario Model 2

<<web scenarion>>Order Product

<<action>>User gives name and

address

<<web scenario reference>>Select Product

<<action>>Finalize order

<<web scenario>>Select Product

<<action>>Show List of products

<<action>>Select a product

References always by name

Page 9: 1 Partial Domain Specific Models Jos WarmerOrdina Anneke KleppeUniversity of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

OOPSLA Worskop on Domain Specifoc Modeling 2006 9

Extension to DSL Tools

Ordina Web Scenario

Designer

Ordina DTO

Designer

Ordina Service Designer

Ordina Class Model

Designer

Ordina NDIP

Output Output Output Output

Support for• code generation• Cross model validation• Intellisense in DSL• Propagation of model changes

Page 10: 1 Partial Domain Specific Models Jos WarmerOrdina Anneke KleppeUniversity of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

OOPSLA Worskop on Domain Specifoc Modeling 2006

Maintaining References

10

When referred element changes, what to do:

• Do nothing

• Give warnings

• Automatically propagate changes

• Use explicit refactoring

Page 11: 1 Partial Domain Specific Models Jos WarmerOrdina Anneke KleppeUniversity of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

OOPSLA Worskop on Domain Specifoc Modeling 2006 11

DSL’s

Characteristics of our Domain Specific Models

• Everything in a model is used for code generation• Not just documentation, same status as source code

• Modeling must be less work than coding

• Models are useable by

• Models must be extended by handwritten code

• Models are leading: never touch the generated code

• Handwritten extensions through defined extension points

Specific models for each area

• Many different DSL’s for different areas

• Many small models with references between them

• Model is the unit of version control, multiuser access, etc.

Page 12: 1 Partial Domain Specific Models Jos WarmerOrdina Anneke KleppeUniversity of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

12

DSL’s Future

Page 13: 1 Partial Domain Specific Models Jos WarmerOrdina Anneke KleppeUniversity of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

OOPSLA Worskop on Domain Specifoc Modeling 2006

How many levels are useful ?

13

Low level DSL model Low level DSL model Low level DSL model Low level DSL model

Code

Higher level DSL model Higher level DSL model

Code Code Code Code Code Code Code Code Code Code

Higher level DSL model Higher level DSL model

Higher level DSL model

Extenstion both horizontal (WPF) and vertical (BOM)

Page 14: 1 Partial Domain Specific Models Jos WarmerOrdina Anneke KleppeUniversity of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

OOPSLA Worskop on Domain Specifoc Modeling 2006

Partial Models

14Generated artefacts in grey, handwritten in yellow

Web Scenario

Model

Web Scenario DSL

Web Scenario

Model

Web Scenario

Model

Data Contract DSL

Data ContractModel

Data ContractModel

Data ContractModel

ServiceDSL

ServiceModel

ServiceModel

ServiceModel

ASP.NETPages

C# CodeConfig

filesOther

artefactys

ManualC# Code

ManualConfig

files

ManualArtefacts

ManualASP.NET

pages

XSD C# Code

Generated Generated Generated Generated Generated Generated

Business Domain Model

Business Domain DSL

Business Domain Model

Business Domain Model

Generated Generated Generated

Page 15: 1 Partial Domain Specific Models Jos WarmerOrdina Anneke KleppeUniversity of Twente OOPSLA Workshop on Domain Specific Modeling, 22-10-2006

OOPSLA Worskop on Domain Specifoc Modeling 2006

View DSM as Source Code File

• A DSM is the unit of multi-user access

• A DSM is the unit of version control

• References by name only

• Refactoring like source code

• DSM is unit of reuse

• DSM is source for nightly builds

• The DSM is always leading

• Code generation per DSM

• Re-use per model

• Project tasks per model

15

Model ≈ Source Code