The document discusses modeling and the challenges and benefits of modeling. It addresses common complaints about modeling like the learning curve being too steep, UML being too complex, and models being too abstract. It advocates that modeling is about simplifying complexity and presents examples of different types of models like class diagrams and tree structures. The document also notes that EMF can act as a hub to connect different models.
1. The Unbearable
Stupidity of Modeling
Ed Merks | Peter Friese
(c) 2009 Ed Merks | Peter Friese. Distributed under the EDL V1.0 - http://www.eclipse.org/org/documents/edl-v10.php
Thursday, March 26, 2009
2. Twitter:
#eclipsecon #emf
http://ed-merks.blogspot.com
http://www.peterfriese.de
Thursday, March 26, 2009
6. “The Learning Curve is Too Steep”
• Use newsgroups
• Get Trained: Eclipse Training Alliance
Thursday, March 26, 2009
7. “The Learning Curve is Too Steep”
• Use newsgroups
• Get Trained: Eclipse Training Alliance
• Consult with someone who knows
Thursday, March 26, 2009
8. “UML is Way Too Complex”
Thursday, March 26, 2009
9. “UML is Way Too Complex”
Thursday, March 26, 2009
10. “UML is Way Too Complex”
UML 1: 9 diagram types
Thursday, March 26, 2009
11. “UML is Way Too Complex”
UML 1: 9 diagram types
UML 2: 13 diagram types
Thursday, March 26, 2009
12. “UML is Way Too Complex”
UML 1: 9 diagram types
UML 2: 13 diagram types
Complex underlying structure
Thursday, March 26, 2009
13. “UML is Way Too Complex”
UML 1: 9 diagram types
UML 2: 13 diagram types
Complex underlying structure
UML ≠ Modeling
Thursday, March 26, 2009
14. “UML is Way Too Complex”
UML 1: 9 diagram types
UML 2: 13 diagram types
Complex underlying structure
UML ≠ Modeling
You don’t need to use it!
Thursday, March 26, 2009
15. So What is Modeling Anyway?
Basically a model is a simplified abstract
view of the complex reality
(Wikipedia)
Thursday, March 26, 2009
16. So What is Modeling Anyway?
Basically a model is a simplified abstract
view of the complex reality
(Wikipedia)
Thursday, March 26, 2009
17. It’s about simplicity!
Basically a model is a simplified abstract
view of the complex reality
(Wikipedia)
Thursday, March 26, 2009
18. It’s about simplicity!
Basically a model is a simplified abstract
view of the complex reality
(Wikipedia)
Thursday, March 26, 2009
19. It’s about simplicity!
Basically a model is a simplified abstract
view of the complex reality
(Wikipedia)
Thursday, March 26, 2009
20. It’s about simplicity!
Basically a model is a simplified abstract
view of the complex reality
(Wikipedia)
Car
color
maxSpeed
startEngine
accelerate
stopEngine
brake
Thursday, March 26, 2009
22. “Oh, That’s Too Abstract For Me!”
Abstraction is the process [...] of
reducing the information content of a
concept [...] to retain only information
which is relevant for a particular
purpose.
Thursday, March 26, 2009
26. entity CustomerInfo
(id=CUST_ID, sequenceName=CUST_SEQ) {
String emailAddress (notNull, length = 128)
}
This actually is a model!
Thursday, March 26, 2009
27. entity CustomerInfo
(id=CUST_ID, sequenceName=CUST_SEQ) {
String emailAddress (notNull, length = 128)
}
This actually is a model!
Don’t believe? Come to the Xtext BOF.
Thursday, March 26, 2009
28. Models Can Take Different Shapes
Basically a model is a simplified abstract
view of the complex reality
(Wikipedia)
!quot;#$%&'()*+quot;,-)+./0(+123'$+24
....!quot;#$%#+56+/&+4
......!quot;#$%+*+(+/7.
......../0(+12&89*$:+/2.
........7-)+127:++%3'$+2.
........(9/;&&6:#12<2
........(0quot;;&&6:#126/='6/$+$2.
........+&':+%'))'#97+12)0:+/72>4
....!>quot;#$%#+56+/&+4
!quot;#$%&'%()*+,-&*'./0*'1
....!quot;#$%077:9=67+.
....../0(+12*0=+*2.
''2)+%(3'3*)4-#*$567
......7-)+12quot;#$%#7:9/?2>4
''8/%0'9*)4-#*$52)+%(3'8-$quot;*67
!>quot;#$%&'()*+quot;,-)+4
''4%9):./0*;'3*)<=%$0+*(567
''./0*'3*)>-+*()567
''8/%0'9*)>-+*()5./0*'8-$quot;*67
?'@@'./0*
0..1
parent
Node
label: EString
0..*
children
Thursday, March 26, 2009
29. Models Can Take Different Shapes
Basically a model is a simplified abstract
view of the complex reality
(Wikipedia)
!quot;#$%&'()*+quot;,-)+./0(+123'$+24
....!quot;#$%#+56+/&+4
......!quot;#$%+*+(+/7.
0..1
......../0(+12&89*$:+/2.
parent
........7-)+127:++%3'$+2.
Node
........(9/;&&6:#12<2
label: EString
........(0quot;;&&6:#126/='6/$+$2.
........+&':+%'))'#97+12)0:+/72>4
0..*
....!>quot;#$%#+56+/&+4
children
....!quot;#$%077:9=67+.
....../0(+12*0=+*2.
!quot;#$%&'%()*+,-&*'./0*'1 ......7-)+12quot;#$%#7:9/?2>4
!>quot;#$%&'()*+quot;,-)+4
''2)+%(3'3*)4-#*$567
''8/%0'9*)4-#*$52)+%(3'8-$quot;*67
''4%9):./0*;'3*)<=%$0+*(567
''./0*'3*)>-+*()567
''8/%0'9*)>-+*()5./0*'8-$quot;*67
?'@@'./0*
Thursday, March 26, 2009
30. Models Can Take Different Shapes
Basically a model is a simplified abstract
view of the complex reality
(Wikipedia)
0..1
parent
Node
label: EString
0..*
children
!quot;#$%&'%()*+,-&*'./0*'1
''2)+%(3'3*)4-#*$567
!quot;#$%&'()*+quot;,-)+./0(+123'$+24
''8/%0'9*)4-#*$52)+%(3'8-$quot;*67
''4%9):./0*;'3*)<=%$0+*(567
....!quot;#$%#+56+/&+4
''./0*'3*)>-+*()567
''8/%0'9*)>-+*()5./0*'8-$quot;*67
?'@@'./0*
......!quot;#$%+*+(+/7.
......../0(+12&89*$:+/2.
........7-)+127:++%3'$+2.
........(9/;&&6:#12<2
........(0quot;;&&6:#126/='6/$+$2.
........+&':+%'))'#97+12)0:+/72>4
....!>quot;#$%#+56+/&+4
....!quot;#$%077:9=67+.
....../0(+12*0=+*2.
......7-)+12quot;#$%#7:9/?2>4
!>quot;#$%&'()*+quot;,-)+4
Thursday, March 26, 2009
31. Models Can Take Different Shapes
Basically a model is a simplified abstract
view of the complex reality
(Wikipedia)
!quot;#$%&'%()*+,-&*'./0*'1
''2)+%(3'3*)4-#*$567
''8/%0'9*)4-#*$52)+%(3'8-$quot;*67
''4%9):./0*;'3*)<=%$0+*(567
!quot;#$%&'()*+quot;,-)+./0(+123'$+24
''./0*'3*)>-+*()567
....!quot;#$%#+56+/&+4
''8/%0'9*)>-+*()5./0*'8-$quot;*67
......!quot;#$%+*+(+/7. 0..1
?'@@'./0*
......../0(+12&89*$:+/2. parent
........7-)+127:++%3'$+2. Node
........(9/;&&6:#12<2 label: EString
........(0quot;;&&6:#126/='6/$+$2.
........+&':+%'))'#97+12)0:+/72>4 0..*
....!>quot;#$%#+56+/&+4 children
....!quot;#$%077:9=67+.
....../0(+12*0=+*2.
......7-)+12quot;#$%#7:9/?2>4
!>quot;#$%&'()*+quot;,-)+4
Thursday, March 26, 2009
32. EMF Acts as a Hub for Models
!quot;#$%&'()*+quot;,-)+./0(+123'$+24
....!quot;#$%#+56+/&+4
0..1 ......!quot;#$%+*+(+/7.
parent ......../0(+12&89*$:+/2.
Node ........7-)+127:++%3'$+2.
label: EString ........(9/;&&6:#12<2
........(0quot;;&&6:#126/='6/$+$2.
........+&':+%'))'#97+12)0:+/72>4
0..*
....!>quot;#$%#+56+/&+4
children
....!quot;#$%077:9=67+.
....../0(+12*0=+*2.
......7-)+12quot;#$%#7:9/?2>4
!>quot;#$%&'()*+quot;,-)+4
!quot;#$%&'%()*+,-&*'./0*'1
''2)+%(3'3*)4-#*$567
''8/%0'9*)4-#*$52)+%(3'8-$quot;*67
''4%9):./0*;'3*)<=%$0+*(567
''./0*'3*)>-+*()567
''8/%0'9*)>-+*()5./0*'8-$quot;*67
?'@@'./0*
Thursday, March 26, 2009
33. EMF Acts as a Hub for Models
!quot;#$%&'()*+quot;,-)+./0(+123'$+24
....!quot;#$%#+56+/&+4
0..1 ......!quot;#$%+*+(+/7.
parent ......../0(+12&89*$:+/2.
Node ........7-)+127:++%3'$+2.
label: EString ........(9/;&&6:#12<2
........(0quot;;&&6:#126/='6/$+$2.
........+&':+%'))'#97+12)0:+/72>4
0..*
....!>quot;#$%#+56+/&+4
children
....!quot;#$%077:9=67+.
....../0(+12*0=+*2.
......7-)+12quot;#$%#7:9/?2>4
!>quot;#$%&'()*+quot;,-)+4
!quot;#$%&'%()*+,-&*'./0*'1
''2)+%(3'3*)4-#*$567
''8/%0'9*)4-#*$52)+%(3'8-$quot;*67
''4%9):./0*;'3*)<=%$0+*(567
''./0*'3*)>-+*()567
''8/%0'9*)>-+*()5./0*'8-$quot;*67
?'@@'./0*
Thursday, March 26, 2009
34. “All This Buzz About Meta - It Drives
Me Crazy!”
Thursday, March 26, 2009
35. “All This Buzz About Meta - It Drives
Me Crazy!”
Thursday, March 26, 2009
36. “All This Buzz About Meta - It Drives
Me Crazy!”
Thursday, March 26, 2009
44. Let’s Talk About Creativity
How To Create A Bean Class
With A Simple Property
– Create an interface to represent the API
for X
• A method to get the value of y
• A method to set the value of y
– A class to implement that API for X
• A variable to store the state for y
• Code to initialize the default value
• A method to get the value of y
• A method to set the value of y
– A factory interface for creating
instances
• A method to create an instance of X
– An class to implement the factory
interface
• A method to create an instance of the
class for X
Thursday, March 26, 2009
45. Let’s Talk About Creativity
How To Create A Bean Class
With A Simple Property
– Create an interface to represent the API
for X
• A method to get the value of y
• A method to set the value of y
– A class to implement that API for X
• A variable to store the state for y
• Code to initialize the default value
• A method to get the value of y
• A method to set the value of y
– A factory interface for creating
instances
• A method to create an instance of X
– An class to implement the factory
interface
• A method to create an instance of the
class for X
Thursday, March 26, 2009
46. Let’s Talk About Creativity
How To Create A Bean Class
With A Simple Property
– Create an interface to represent the API
for X
• A method to get the value of y
• A method to set the value of y
– A class to implement that API for X
• A variable to store the state for y
• Code to initialize the default value
• A method to get the value of y
• A method to set the value of y
– A factory interface for creating
instances
• A method to create an instance of X
– An class to implement the factory
interface
• A method to create an instance of the
class for X
Thursday, March 26, 2009
47. Tedium is the True Killer of Creativity
manually written
code
Frameworks
schematic code (manually written)
Libraries
Thursday, March 26, 2009
48. Code Generation Kills Tedium
Model
manually written
code
Generator
Frameworks
schematic code (generated)
Libraries
Thursday, March 26, 2009
49. How Code Generation Works
Step 1: capture knowledge
Thursday, March 26, 2009
50. How Code Generation Works
Step 1: capture knowledge
Eclipse Guru
Generator
Thursday, March 26, 2009
51. How Code Generation Works
Step 1: capture knowledge
Thursday, March 26, 2009
52. How Code Generation Works
Step 1: capture knowledge
Thursday, March 26, 2009
53. How Code Generation Works
Step 1: capture knowledge
Step 2: provide model
Thursday, March 26, 2009
54. How Code Generation Works
Step 1: capture knowledge
Step 2: provide model
entity CustomerInfo
(id=CUST_ID, sequenceName=CUST_SEQ) {
String emailAddress (notNull, length = 128)
}
Thursday, March 26, 2009
55. How Code Generation Works
Step 1: capture knowledge
Step 2: provide model
Step 3: generate code
entity CustomerInfo
(id=CUST_ID, sequenceName=CUST_SEQ) {
String emailAddress (notNull, length = 128)
}
Thursday, March 26, 2009
60. “Ok, But Generated Code Sucks”
• YOU write the code generator
Thursday, March 26, 2009
61. “Ok, But Generated Code Sucks”
• YOU write the code generator
• YOU are responsible for code quality
Thursday, March 26, 2009
62. “Ok, But Generated Code Sucks”
• YOU write the code generator
• YOU are responsible for code quality
• YOU are responsible for performance
Thursday, March 26, 2009
63. “Ok, But Generated Code Sucks”
• YOU write the code generator
• YOU are responsible for code quality
• YOU are responsible for performance
Thursday, March 26, 2009
64. “Ok, But Generated Code Sucks”
• YOU write the code generator
• YOU are responsible for code quality
• YOU are responsible for performance
• Template Languages have matured
Thursday, March 26, 2009
65. “Ok, But Generated Code Sucks”
• YOU write the code generator
• YOU are responsible for code quality
• YOU are responsible for performance
• Template Languages have matured
• JET / Acceleo / Xpand
Thursday, March 26, 2009
73. “DSLs will create a Tower of Babel”
Will domain experts write programs?
Thursday, March 26, 2009
74. “DSLs will create a Tower of Babel”
Will domain experts write programs?
No - but they will be able to read them!
Thursday, March 26, 2009
75. “DSLs will create a Tower of Babel”
Will domain experts write programs?
No - but they will be able to read them!
Language barriers get torn down !
Thursday, March 26, 2009
76. “Modeling Enforces Onerous Processes”
http://www.flickr.com/photos/orvaratli/2620988946/
Thursday, March 26, 2009
79. “Modeling Enforces Onerous Processes”
Modeling is just a tool
Tools are orthogonal to your process
Thursday, March 26, 2009
80. “Modeling Enforces Onerous Processes”
Modeling is just a tool
Tools are orthogonal to your process
Modeling can be use with any kind of process
Thursday, March 26, 2009
82. “Modeling is Just a Marketing Ploy”
Expensive tools
Thursday, March 26, 2009
83. “Modeling is Just a Marketing Ploy”
Expensive tools
Vendor lock-in
Thursday, March 26, 2009
84. “Modeling is Just a Marketing Ploy”
Expensive tools
Vendor lock-in
Expensive support
contracts
Thursday, March 26, 2009
85. “Modeling is Just a Marketing Ploy”
Expensive tools
Vendor lock-in
Expensive support
contracts
Incompatible versions
Thursday, March 26, 2009
86. “Modeling is Just a Marketing Ploy”
Expensive tools
Vendor lock-in
Expensive support
contracts
Incompatible versions
Thursday, March 26, 2009
87. “Modeling is Just a Marketing Ploy”
Can you say “Open Source”?
SD Times rates EMF “Top Shelf”
(http://www.sdtimes.com/content/article.aspx?ArticleID=32287)
Thursday, March 26, 2009
90. Three Things To Take Home
Generated code is as good as the
effort you put into the Generator
Thursday, March 26, 2009
91. Three Things To Take Home
Generated code is as good as the
effort you put into the Generator
The Eclipse Modeling Project
provides a great tool stack - for free!
Thursday, March 26, 2009
92. Three Things To Take Home
Generated code is as good as the
effort you put into the Generator
The Eclipse Modeling Project
provides a great tool stack - for free!
Modeling will set your creativity free!
Thursday, March 26, 2009