Introducing a SoftwareGenerator FrameworkStephan HochdörferbitExpert AG
ABOUT ME> Stephan Hochdörfer, bitExpert AG> Department Manager Research Labs> S.Hochdoerfer@bitExpert.de> @shochdoerfer   ...
GENERATING SOFTWARE                      3
GENERATING SOFTWARE         WTF?!?                      4
One customer, one optimized application                                          5
Developer   vs.   Businessman                                6
New customer with different requirements                                           7                                      ...
Different requirements: intensive workload                                             8
Different requirements: Focus on performance                                               9
Where will this lead to?                           10
Maintanance nightmare!                         11
Standardize you should!                          12
Application framework?                         13
Manually wiring everything up?                                 14
No automation? No Tooling support?                                     15
Generalize you should!                         16
GENERATIVE PROGRAMMING Dealing with software system families, reusable implementation components     and configuration kno...
GENERATIVE PROGRAMMING: WORKFLOW                 Generator                 Generator                                   18
GENERATIVE PROGRAMMING: WORKFLOW                Configuration                 Configuration                   (DSL)       ...
GENERATIVE PROGRAMMING: WORKFLOW                    Configuration                     Configuration                       ...
GENERATIVE PROGRAMMING: WORKFLOW                    Configuration                     Configuration                       ...
GENERATIVE PROGRAMMING: WORKFLOW                    Configuration                     Configuration                       ...
GENERATIVE PROGRAMMING: WORKFLOW                    Configuration                     Configuration                       ...
Focus on the (software system) family!                                         24                                         24
SOFTWARE SYSTEM FAMILY     Set of applications with similar properties as well as special properties      for each individ...
Phase 1: Domain analysis                           26
Listen to the customers                          27
Talk to the domain experts                             28
Do the requirements make sense?                                  29
Does it belong to the family?                                30
Does it belong to the family?                                31
Does it belong to the family?                                32
Does it belong to the family? Maybe...                                         33
Does it belong to the family? No!                                    34
Does it belong to the family? No!                                    35
Phase 2: Domain design                         36
Feature Modelling                    37
Phase 3: Domain implementation                                 38
Implementation components                            39
Configuration Knowledge                          40
GENERATIVE PROGRAMMING       Generator    Domain Engineering         Domain-         analysis         Domain-          des...
GENERATIVE PROGRAMMING       Generator                             Product    Domain Engineering                    App. E...
Technology projection                        43
GENERATIVE PROGRAMMING: FRAMEWORK           http://replicatorframework.org                                            44
GENERATIVE PROGRAMMING: FRAMEWORK    Java + Maven + Spring + Eclipse                                      45
GENERATIVE PROGRAMMING: FRAMEWORK                mvn archetype:create     -DarchetypeGroupId=org.replicatorframework   -Da...
GENERATIVE PROGRAMMING: FRAMEWORK         ./samplegenerator            |-config            |---generator.properties       ...
GENERATIVE PROGRAMMING: ADD FEATURE./src/main/resources/generator/features.xml<?xml version="1.0" encoding="UTF-8"?><beans...
GENERATIVE PROGRAMMING: ADD FRAME./src/main/resources/generator/frames.xml<?xml version="1.0" encoding="UTF-8"?><beans xml...
GENERATIVE PROGRAMMING: ADD FRAME./src/main/resources/generator/features.xml<?xml version="1.0" encoding="UTF-8"?><beans x...
GENERATIVE PROGRAMMING       What about custom logic?                                  51
GENERATIVE PROGRAMMING: CONTENTPROVIDER./src/main/resources/frames/webroot/form.frm<html><head>  <title>Sample form</title...
GENERATIVE PROGRAMMING: CONTENTPROVIDER./src/main/resources/generator/contentProvider.xml<?xml version="1.0" encoding="UTF...
GENERATIVE PROGRAMMING: CONTENTPROVIDER./src/main/resources/generator/contentProvider.xml<?xml version="1.0" encoding="UTF...
GENERATIVE PROGRAMMING           Code anyone?                          55
GENERATIVE PROGRAMMING: CONTENTPROVIDER./src/java/org/replicatorframework/samplegenerator/MyContentProvider.javapackage or...
GENERATIVE PROGRAMMING: CONFIGURATION./config/gpl.xml<?xml version="1.0" encoding="UTF-8"?><features xmlns="http://www.rep...
GENERATIVE PROGRAMMING      How to run the generator?                                  58
GENERATIVE PROGRAMMING          mvn replicator:run                               59
GENERATIVE PROGRAMMING: THE GOAL      Increasing the productivity,      quality, and time-to-market                       ...
GENERATIVE PROGRAMMING: THE GOAL         Creating an optimized        application on demand!                              ...
GENERATIVE PROGRAMMING: BONUS POINTS                                       62
GENERATIVE PROGRAMMING: BONUS POINTS        Less error-prone, due to              automation                              ...
GENERATIVE PROGRAMMING: BONUS POINTS     Reduce the complexity of the             application                             ...
GENERATIVE PROGRAMMING: BONUS POINTS       Just one code repository:        The software generator                        ...
GENERATIVE PROGRAMMING: BONUS POINTS      Reduce maintenance efforts                                       66
GENERATIVE PROGRAMMING: THE BOOK                                   67
Stephan Hochdörfer   http://www.bitExpert.debitExpert AG         S.Hochdoerfer@bitExpert.de
Upcoming SlideShare
Loading in …5
×

Introducing a Software Generator Framework - JAZOON12

886 views
791 views

Published on

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
886
On SlideShare
0
From Embeds
0
Number of Embeds
95
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Introducing a Software Generator Framework - JAZOON12

  1. 1. Introducing a SoftwareGenerator FrameworkStephan HochdörferbitExpert AG
  2. 2. ABOUT ME> Stephan Hochdörfer, bitExpert AG> Department Manager Research Labs> S.Hochdoerfer@bitExpert.de> @shochdoerfer 2
  3. 3. GENERATING SOFTWARE 3
  4. 4. GENERATING SOFTWARE WTF?!? 4
  5. 5. One customer, one optimized application 5
  6. 6. Developer vs. Businessman 6
  7. 7. New customer with different requirements 7 7
  8. 8. Different requirements: intensive workload 8
  9. 9. Different requirements: Focus on performance 9
  10. 10. Where will this lead to? 10
  11. 11. Maintanance nightmare! 11
  12. 12. Standardize you should! 12
  13. 13. Application framework? 13
  14. 14. Manually wiring everything up? 14
  15. 15. No automation? No Tooling support? 15
  16. 16. Generalize you should! 16
  17. 17. GENERATIVE PROGRAMMING Dealing with software system families, reusable implementation components and configuration knowledge. 17
  18. 18. GENERATIVE PROGRAMMING: WORKFLOW Generator Generator 18
  19. 19. GENERATIVE PROGRAMMING: WORKFLOW Configuration Configuration (DSL) (DSL) Generator Generator 19
  20. 20. GENERATIVE PROGRAMMING: WORKFLOW Configuration Configuration (DSL) (DSL) Implementation- Implementation- components Generator Generator components 20
  21. 21. GENERATIVE PROGRAMMING: WORKFLOW Configuration Configuration (DSL) (DSL) 1..n Implementation- Implementation- components Generator Generator Product Product components 21
  22. 22. GENERATIVE PROGRAMMING: WORKFLOW Configuration Configuration (DSL) (DSL) Implementation- Implementation- components Generator Generator Customer 11 Customer components 22
  23. 23. GENERATIVE PROGRAMMING: WORKFLOW Configuration Configuration (DSL) (DSL) Customer 22 Customer Implementation- Implementation- components Generator Generator Customer 11 Customer components 23
  24. 24. Focus on the (software system) family! 24 24
  25. 25. SOFTWARE SYSTEM FAMILY Set of applications with similar properties as well as special properties for each individual member. 25
  26. 26. Phase 1: Domain analysis 26
  27. 27. Listen to the customers 27
  28. 28. Talk to the domain experts 28
  29. 29. Do the requirements make sense? 29
  30. 30. Does it belong to the family? 30
  31. 31. Does it belong to the family? 31
  32. 32. Does it belong to the family? 32
  33. 33. Does it belong to the family? Maybe... 33
  34. 34. Does it belong to the family? No! 34
  35. 35. Does it belong to the family? No! 35
  36. 36. Phase 2: Domain design 36
  37. 37. Feature Modelling 37
  38. 38. Phase 3: Domain implementation 38
  39. 39. Implementation components 39
  40. 40. Configuration Knowledge 40
  41. 41. GENERATIVE PROGRAMMING Generator Domain Engineering Domain- analysis Domain- design Domain- implementation 41
  42. 42. GENERATIVE PROGRAMMING Generator Product Domain Engineering App. Engineering New requirements Domain- Requirements analysis analysis Domain- Product design configuration Components, Domain- DSL, Testing and implementation Generators, Infrastructure integration 42
  43. 43. Technology projection 43
  44. 44. GENERATIVE PROGRAMMING: FRAMEWORK http://replicatorframework.org 44
  45. 45. GENERATIVE PROGRAMMING: FRAMEWORK Java + Maven + Spring + Eclipse 45
  46. 46. GENERATIVE PROGRAMMING: FRAMEWORK mvn archetype:create -DarchetypeGroupId=org.replicatorframework -DarchetypeArtifactId=replicator-maven-archetype -DarchetypeVersion=0.8.0-SNAPSHOT -DgroupId=org.replicatorframework -DartifactId=samplegenerator 46
  47. 47. GENERATIVE PROGRAMMING: FRAMEWORK ./samplegenerator |-config |---generator.properties |---gpl.xml |-src |---main |-----java |-----resources |-------frames |-------generator |---------contentProvider.xml |---------features.xml |---------frames.xml |---------generatorContext.xml |---test |-----java |-----resources |-target 47
  48. 48. GENERATIVE PROGRAMMING: ADD FEATURE./src/main/resources/generator/features.xml<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:gp="http://www.replicatorframework.org/schema/gp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/..."> <gp:feature name="ContactForm" /> <gp:feature name="HintLayer" /></beans> 48
  49. 49. GENERATIVE PROGRAMMING: ADD FRAME./src/main/resources/generator/frames.xml<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:gp="http://www.replicatorframework.org/schema/gp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/..."> <gp:fileframe id="App.ContactForm" sourcePath="frames/webroot/form.frm" exportPath="webroot/form.html"> </gp:fileframe> <gp:frame id="App.ContactForm.HintLayer" sourcePath="frames/webroot/hintlayer.frm"> </gp:frame> <gp:bundle id="App.Resources.Images" sourcePath="frames/webroot/resources/img" exportPath="webroot/resources/img" /> 49</beans>
  50. 50. GENERATIVE PROGRAMMING: ADD FRAME./src/main/resources/generator/features.xml<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:gp="http://www.replicatorframework.org/schema/gp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/..."> <gp:feature name="ContactForm"> <!-- refers to the defined FileFrame --> <gp:resource ref="App.ContactForm"/> <!-- refers to the defined ResourceBundle --> <gp:resource ref="App.Resources.Images"/> </gp:feature> <gp:feature name="HintLayer" /></beans> 50
  51. 51. GENERATIVE PROGRAMMING What about custom logic? 51
  52. 52. GENERATIVE PROGRAMMING: CONTENTPROVIDER./src/main/resources/frames/webroot/form.frm<html><head> <title>Sample form</title></head><body><h1><!{hello}!></h1><form action="index.do" method="post"><textarea name="msg"></textarea></form><!{hint}!></body></html> 52
  53. 53. GENERATIVE PROGRAMMING: CONTENTPROVIDER./src/main/resources/generator/contentProvider.xml<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:gp="http://www.replicatorframework.org/schema/gp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/..."> <gp:contentProvider id="GenericContentProvider" type="generic"> <gp:rule> <gp:condition> <gp:group type="AND"> <gp:hasFeature name="ContactForm"/> </gp:group> </gp:condition> <gp:bind slot="hello" value="Hello World!"></gp:bind> </gp:rule> </gp:contentProvider></beans> 53
  54. 54. GENERATIVE PROGRAMMING: CONTENTPROVIDER./src/main/resources/generator/contentProvider.xml<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:gp="http://www.replicatorframework.org/schema/gp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/..."> <gp:contentProvider id="GenericContentProvider" type="generic"> <gp:rule> <gp:condition> <gp:hasFeature name="HintLayer"/> </gp:condition> <gp:bind slot="hint" ref="App.ContactForm.HintLayer" /> </gp:rule> </gp:contentProvider></beans> 54
  55. 55. GENERATIVE PROGRAMMING Code anyone? 55
  56. 56. GENERATIVE PROGRAMMING: CONTENTPROVIDER./src/java/org/replicatorframework/samplegenerator/MyContentProvider.javapackage org.replicatorframework.samplegenerator;importorg.replicatorframework.generator.frame.contentprovid...import org.replicatorframework.gpl.FeatureConfiguration;public class MyContentProvider extends AbstractContentProvider{ public SlotConfiguration computeSlots(FeatureConfiguration configuration) { SlotConfiguration slots = new SlotConfiguration(); slots.put("hello", "Hello World!"); slots.put("hint", this.getFrameDefinition("App.ContactForm.HintLayer") ); return slots; } 56}
  57. 57. GENERATIVE PROGRAMMING: CONFIGURATION./config/gpl.xml<?xml version="1.0" encoding="UTF-8"?><features xmlns="http://www.replicatorframework.org/schema/gpl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.replicatorframework.org/... http://www.replicatorframework.org/schema/gpl/gpl-0.0.6.xsd"> <feature name="hintLayer"> <param name="color" type="String" value="#000" /> <param name="autoClose" type="Boolean" value="true" /> </feature></features> 57
  58. 58. GENERATIVE PROGRAMMING How to run the generator? 58
  59. 59. GENERATIVE PROGRAMMING mvn replicator:run 59
  60. 60. GENERATIVE PROGRAMMING: THE GOAL Increasing the productivity, quality, and time-to-market 60
  61. 61. GENERATIVE PROGRAMMING: THE GOAL Creating an optimized application on demand! 61
  62. 62. GENERATIVE PROGRAMMING: BONUS POINTS 62
  63. 63. GENERATIVE PROGRAMMING: BONUS POINTS Less error-prone, due to automation 63
  64. 64. GENERATIVE PROGRAMMING: BONUS POINTS Reduce the complexity of the application 64
  65. 65. GENERATIVE PROGRAMMING: BONUS POINTS Just one code repository: The software generator 65
  66. 66. GENERATIVE PROGRAMMING: BONUS POINTS Reduce maintenance efforts 66
  67. 67. GENERATIVE PROGRAMMING: THE BOOK 67
  68. 68. Stephan Hochdörfer http://www.bitExpert.debitExpert AG S.Hochdoerfer@bitExpert.de

×