The Unbearable Stupidity of Modeling

12,529 views
12,761 views

Published on

A talk that looks at various misconceptions in modeling and model driven software development.

Published in: Technology, News & Politics
2 Comments
15 Likes
Statistics
Notes
No Downloads
Views
Total views
12,529
On SlideShare
0
From Embeds
0
Number of Embeds
4,268
Actions
Shares
0
Downloads
180
Comments
2
Likes
15
Embeds 0
No embeds

No notes for slide




























































































  • The Unbearable Stupidity of Modeling

    1. 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. 2. Twitter: #eclipsecon #emf http://ed-merks.blogspot.com http://www.peterfriese.de Thursday, March 26, 2009
    3. 3. “The Learning Curve is Too Steep” Thursday, March 26, 2009
    4. 4. “The Learning Curve is Too Steep” Thursday, March 26, 2009
    5. 5. “The Learning Curve is Too Steep” • Use newsgroups Thursday, March 26, 2009
    6. 6. “The Learning Curve is Too Steep” • Use newsgroups • Get Trained: Eclipse Training Alliance Thursday, March 26, 2009
    7. 7. “The Learning Curve is Too Steep” • Use newsgroups • Get Trained: Eclipse Training Alliance • Consult with someone who knows Thursday, March 26, 2009
    8. 8. “UML is Way Too Complex” Thursday, March 26, 2009
    9. 9. “UML is Way Too Complex” Thursday, March 26, 2009
    10. 10. “UML is Way Too Complex” UML 1: 9 diagram types Thursday, March 26, 2009
    11. 11. “UML is Way Too Complex” UML 1: 9 diagram types UML 2: 13 diagram types Thursday, March 26, 2009
    12. 12. “UML is Way Too Complex” UML 1: 9 diagram types UML 2: 13 diagram types Complex underlying structure Thursday, March 26, 2009
    13. 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. 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. 15. So What is Modeling Anyway? Basically a model is a simplified abstract view of the complex reality (Wikipedia) Thursday, March 26, 2009
    16. 16. So What is Modeling Anyway? Basically a model is a simplified abstract view of the complex reality (Wikipedia) Thursday, March 26, 2009
    17. 17. It’s about simplicity! Basically a model is a simplified abstract view of the complex reality (Wikipedia) Thursday, March 26, 2009
    18. 18. It’s about simplicity! Basically a model is a simplified abstract view of the complex reality (Wikipedia) Thursday, March 26, 2009
    19. 19. It’s about simplicity! Basically a model is a simplified abstract view of the complex reality (Wikipedia) Thursday, March 26, 2009
    20. 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
    21. 21. “Oh, That’s Too Abstract For Me!” Thursday, March 26, 2009
    22. 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
    23. 23. @SuppressWarnings(quot;serialquot;) @Entity @Table(name = quot;CUSTOMER_INFOquot;) public class CustomerInfo implements Serializable { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = quot;idSeqquot;) @SequenceGenerator(name = quot;idSeqquot;, sequenceName = quot;CUST_SEQquot;, allocationSize = 1) @Column(name = quot;CUST_IDquot;, nullable = false) private String customerId; public void setCustomerId(String customerId) { this.customerId = customerId; } public String getCustomerId() { return customerId; } @Column(name = quot;EMAILquot;, nullable = false, length = 128) private String emailAddress; public String getEmailAddress() { return emailAddress; } public void setEmailAddress(String emailAddress) { String oldValue = emailAddress; this.emailAddress = emailAddress; firePropertyChangedEvent(quot;emailAddressquot;, oldValue, this.emailAddress); } Thursday, March 26, 2009
    24. 24. @SuppressWarnings(quot;serialquot;) @Entity @Table(name = quot;CUSTOMER_INFOquot;) public class CustomerInfo implements Serializable { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = quot;idSeqquot;) @SequenceGenerator(name = quot;idSeqquot;, sequenceName = quot;CUST_SEQquot;, allocationSize = 1) @Column(name = quot;CUST_IDquot;, nullable = false) private String customerId; public void setCustomerId(String customerId) { this.customerId = customerId; } public String getCustomerId() { return customerId; } @Column(name = quot;EMAILquot;, nullable = false, length = 128) private String emailAddress; public String getEmailAddress() { return emailAddress; } public void setEmailAddress(String emailAddress) { String oldValue = emailAddress; this.emailAddress = emailAddress; firePropertyChangedEvent(quot;emailAddressquot;, oldValue, this.emailAddress); } Thursday, March 26, 2009
    25. 25. entity CustomerInfo (id=CUST_ID, sequenceName=CUST_SEQ) { String emailAddress (notNull, length = 128) } Thursday, March 26, 2009
    26. 26. entity CustomerInfo (id=CUST_ID, sequenceName=CUST_SEQ) { String emailAddress (notNull, length = 128) } This actually is a model! Thursday, March 26, 2009
    27. 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. 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. 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. 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. 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. 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. 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. 34. “All This Buzz About Meta - It Drives Me Crazy!” Thursday, March 26, 2009
    35. 35. “All This Buzz About Meta - It Drives Me Crazy!” Thursday, March 26, 2009
    36. 36. “All This Buzz About Meta - It Drives Me Crazy!” Thursday, March 26, 2009
    37. 37. Don’t Panic. Thursday, March 26, 2009
    38. 38. Meta = Description aNode1 label: quot;carquot; 0..1 parent aNode2 Node label: quot;wheelquot; label: EString aNode3 0..* label: quot;wheelquot; children aNode4 label: quot;wheelquot; aNode5 label: quot;wheelquot; Thursday, March 26, 2009
    39. 39. Meta = Description aNode1 label: quot;carquot; 0..1 parent aNode2 Node label: quot;wheelquot; label: EString aNode3 0..* label: quot;wheelquot; children aNode4 label: quot;wheelquot; aNode5 label: quot;wheelquot; Description Instance Thursday, March 26, 2009
    40. 40. Meta = Description aNode1 label: quot;carquot; 0..1 parent aNode2 Node label: quot;wheelquot; label: EString aNode3 0..* label: quot;wheelquot; children aNode4 label: quot;wheelquot; aNode5 label: quot;wheelquot; Description Instance Thursday, March 26, 2009
    41. 41. Meta = Description aNode1 label: quot;carquot; 0..1 parent aNode2 Node label: quot;wheelquot; label: EString aNode3 0..* label: quot;wheelquot; children aNode4 label: quot;wheelquot; aNode5 label: quot;wheelquot; Description Instance Thursday, March 26, 2009
    42. 42. “Modeling is Too Restrictive...” http://www.flickr.com/photos/two-wrongs/205467442/ “...it will limit my creativity” Thursday, March 26, 2009
    43. 43. Let’s Talk About Creativity Thursday, March 26, 2009
    44. 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. 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. 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. 47. Tedium is the True Killer of Creativity manually written code Frameworks schematic code (manually written) Libraries Thursday, March 26, 2009
    48. 48. Code Generation Kills Tedium Model manually written code Generator Frameworks schematic code (generated) Libraries Thursday, March 26, 2009
    49. 49. How Code Generation Works Step 1: capture knowledge Thursday, March 26, 2009
    50. 50. How Code Generation Works Step 1: capture knowledge Eclipse Guru Generator Thursday, March 26, 2009
    51. 51. How Code Generation Works Step 1: capture knowledge Thursday, March 26, 2009
    52. 52. How Code Generation Works Step 1: capture knowledge Thursday, March 26, 2009
    53. 53. How Code Generation Works Step 1: capture knowledge Step 2: provide model Thursday, March 26, 2009
    54. 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. 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
    56. 56. How Code Generation Works Step 1: capture knowledge Step 2: provide model Step 3: generate code @SuppressWarnings(quot;serialquot;) @Entity @Table(name = quot;CUSTOMER_INFOquot;) public class CustomerInfo implements Serializable { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = quot;idSeqquot;) @SequenceGenerator(name = quot;idSeqquot;, sequenceName = quot;CUST_SEQquot;, allocationSize = 1) @Column(name = quot;CUST_IDquot;, nullable = false) private String customerId; public void setCustomerId(String customerId) { this.customerId = customerId; } public entity CustomerInfo String getCustomerId() { (id=CUST_ID, sequenceName=CUST_SEQ) { return customerId; } String emailAddress (notNull, length = 128) } @Column(name = quot;EMAILquot;, nullable = false, length = 128) private String emailAddress; public String getEmailAddress() { return emailAddress; } public void setEmailAddress(String emailAddress) { String oldValue = emailAddress; this.emailAddress = emailAddress; firePropertyChangedEvent(quot;emailAddressquot;, oldValue, this.emailAddress); } Thursday, March 26, 2009
    57. 57. “Ok, But Generated Code Sucks” Thursday, March 26, 2009
    58. 58. “Ok, But Generated Code Sucks” Oh, really?! Thursday, March 26, 2009
    59. 59. “Ok, But Generated Code Sucks” Thursday, March 26, 2009
    60. 60. “Ok, But Generated Code Sucks” • YOU write the code generator Thursday, March 26, 2009
    61. 61. “Ok, But Generated Code Sucks” • YOU write the code generator • YOU are responsible for code quality Thursday, March 26, 2009
    62. 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. 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. 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. 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
    66. 66. “Diagrams Suck” Thursday, March 26, 2009
    67. 67. “Diagrams Suck” • Use wisely! Thursday, March 26, 2009
    68. 68. “Diagrams Suck” • Use wisely! • Domain Specific Diagrams :-) Thursday, March 26, 2009
    69. 69. “Diagrams Suck” • Use wisely! • Domain Specific Diagrams :-) • Overview :-) Thursday, March 26, 2009
    70. 70. “Diagrams Suck” • Use wisely! • Domain Specific Diagrams :-) • Overview :-) • Reverse Engineering :-( Thursday, March 26, 2009
    71. 71. “DSLs will create a Tower of Babel” Thursday, March 26, 2009
    72. 72. “DSLs will create a Tower of Babel” Thursday, March 26, 2009
    73. 73. “DSLs will create a Tower of Babel” Will domain experts write programs? Thursday, March 26, 2009
    74. 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. 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. 76. “Modeling Enforces Onerous Processes” http://www.flickr.com/photos/orvaratli/2620988946/ Thursday, March 26, 2009
    77. 77. “Modeling Enforces Onerous Processes” Thursday, March 26, 2009
    78. 78. “Modeling Enforces Onerous Processes” Modeling is just a tool Thursday, March 26, 2009
    79. 79. “Modeling Enforces Onerous Processes” Modeling is just a tool Tools are orthogonal to your process Thursday, March 26, 2009
    80. 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
    81. 81. “Modeling is Just a Marketing Ploy” Thursday, March 26, 2009
    82. 82. “Modeling is Just a Marketing Ploy” Expensive tools Thursday, March 26, 2009
    83. 83. “Modeling is Just a Marketing Ploy” Expensive tools Vendor lock-in Thursday, March 26, 2009
    84. 84. “Modeling is Just a Marketing Ploy” Expensive tools Vendor lock-in Expensive support contracts Thursday, March 26, 2009
    85. 85. “Modeling is Just a Marketing Ploy” Expensive tools Vendor lock-in Expensive support contracts Incompatible versions Thursday, March 26, 2009
    86. 86. “Modeling is Just a Marketing Ploy” Expensive tools Vendor lock-in Expensive support contracts Incompatible versions Thursday, March 26, 2009
    87. 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
    88. 88. “Modeling Will Make Me Redundant” Thursday, March 26, 2009
    89. 89. Three Things To Take Home Thursday, March 26, 2009
    90. 90. Three Things To Take Home Generated code is as good as the effort you put into the Generator Thursday, March 26, 2009
    91. 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. 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

    ×