Ordina - DSM Forum

Download Report

Transcript Ordina - DSM Forum

Partial Domain
Specific Models
Jos Warmer
Anneke Kleppe
Ordina
University of Twente
OOPSLA Workshop on Domain Specific Modeling, 22-10-2006
1
SMART-Microsoft Architecture
Users
Utilities
Presentation layer
User Interface components
Ordina DSL Specific Frameworks
Ordina Core Framework
Security
Operational Management
Communication
Data contract
User Processes
DTO
Business layer
Service Interfaces
Business Processes
Business Workflows
Business Classes
Service Agents
Data layer
Data Access Logic Components
Data Service Agents
Data sources
OOPSLA Worskop on Domain Specifoc Modeling 2006
Services
2
View DTO
SMART-Microsoft DSL Overview
OOPSLA Worskop on Domain Specifoc Modeling 2006
3
SMART-Microsoft DSL’s
<@Page />
<HTML>
<BODY>
Hello World
</BODY>
</HTML>
DSL
Specifiek
Framework
Class MyClass
{
public string Hello()
{
return “Hello world”;
}
}
Class MyClass
{
public string Hello()
{
return “Hello world”;
}
}
DSL
Specifiek
Framework
Class MyClass
{
public string Hello()
{
return “Hello world”;
}
}
DSL
Specifiek
Framework
<Mapping>
<Class>
<Table>
</Mapping>
CREATE TABLE MyTable
FIELD1 int
FIELD2 varchar(50)
OOPSLA Worskop on Domain Specifoc Modeling 2006
4
Generiek
Framework
Problems with UML
 UML is a huge language
• 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
OOPSLA Worskop on Domain Specifoc Modeling 2006
5
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
OOPSLA Worskop on Domain Specifoc Modeling 2006
6
Small Models
 Multiple ‘independent’ DSL’s
 Multiple ‘independent’ models per DSL
Web Scenario
DSL
Web
Scenario
Model
Web
Scenario
Model
Data Contract
DSL
Web
Scenario
Model
Data
Contract
Model
Data
Contract
Model
Service
DSL
Data
Contract
Model
Service
Model
Typlical development situation: multiple models for each DSL.
OOPSLA Worskop on Domain Specifoc Modeling 2006
7
Service
Model
Service
Model
References Between Models
 References always by name
Web Scenario Model 2
Web Scenario Model 1
<<web scenarion>>
Order Product
<<web scenario>>
Select Product
<<action>>
User gives name and
address
<<action>>
Show List of products
<<web scenario reference>>
Select Product
<<action>>
Select a product
<<action>>
Finalize order
OOPSLA Worskop on Domain Specifoc Modeling 2006
8
Extension to DSL Tools
Support for
• code generation
• Cross model validation
• Intellisense in DSL
• Propagation of model changes
Ordina NDIP
Ordina
Web Scenario
Designer
Output
Ordina
DTO
Designer
Ordina
Service
Designer
Output
Output
OOPSLA Worskop on Domain Specifoc Modeling 2006
9
Ordina
Class Model
Designer
Output
Maintaining References
 When referred element changes, what to do:
• Do nothing
• Give warnings
• Automatically propagate changes
• Use explicit refactoring
OOPSLA Worskop on Domain Specifoc Modeling 2006
10
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.
OOPSLA Worskop on Domain Specifoc Modeling 2006
11
DSL’s Future
12
How many levels are useful ?
 Extenstion both horizontal (WPF) and vertical (BOM)
Higher level DSL model
Higher level DSL model
Low level DSL model
Code
Code
Code
Higher level DSL model
Low level DSL model
Code
Higher level DSL model
Code
OOPSLA Worskop on Domain Specifoc Modeling 2006
Higher level DSL model
Low level DSL model
Code
13
Code
Code
Low level DSL model
Code
Code
Code
Partial Models
Business
Domain DSL
Business
Domain
Model
Business
Domain
Model
Business
Domain
Model
Web Scenario
DSL
Web
Scenario
Model
Generated
ASP.NET
Pages
Generated
Manual
ASP.NET
pages
Web
Scenario
Model
Data Contract
DSL
Web
Scenario
Model
Data
Contract
Model
Generated
C# Code
Config
files
Generated
Generated
Manual
C# Code
Manual
Config
files
Data
Contract
Model
Service
DSL
Data
Contract
Model
Service
Model
Service
Model
Generated
Other
artefactys
Generated
XSD
Generated
C# Code
Generated
Manual
Artefacts
OOPSLA Worskop on Domain Specifoc Modeling 2006
14
Generated artefacts
in grey, handwritten in yellow
Service
Model
Model ≈ Source Code
 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
OOPSLA Worskop on Domain Specifoc Modeling 2006
15