Introducing a Software Generator Framework - JAZOON12

  • 579 views
Uploaded on

 

More in: Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
579
On Slideshare
0
From Embeds
0
Number of Embeds
4

Actions

Shares
Downloads
0
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Introducing a SoftwareGenerator FrameworkStephan HochdörferbitExpert AG
  • 2. ABOUT ME> Stephan Hochdörfer, bitExpert AG> Department Manager Research Labs> S.Hochdoerfer@bitExpert.de> @shochdoerfer 2
  • 3. GENERATING SOFTWARE 3
  • 4. GENERATING SOFTWARE WTF?!? 4
  • 5. One customer, one optimized application 5
  • 6. Developer vs. Businessman 6
  • 7. New customer with different requirements 7 7
  • 8. Different requirements: intensive workload 8
  • 9. Different requirements: Focus on performance 9
  • 10. Where will this lead to? 10
  • 11. Maintanance nightmare! 11
  • 12. Standardize you should! 12
  • 13. Application framework? 13
  • 14. Manually wiring everything up? 14
  • 15. No automation? No Tooling support? 15
  • 16. Generalize you should! 16
  • 17. GENERATIVE PROGRAMMING Dealing with software system families, reusable implementation components and configuration knowledge. 17
  • 18. GENERATIVE PROGRAMMING: WORKFLOW Generator Generator 18
  • 19. GENERATIVE PROGRAMMING: WORKFLOW Configuration Configuration (DSL) (DSL) Generator Generator 19
  • 20. GENERATIVE PROGRAMMING: WORKFLOW Configuration Configuration (DSL) (DSL) Implementation- Implementation- components Generator Generator components 20
  • 21. GENERATIVE PROGRAMMING: WORKFLOW Configuration Configuration (DSL) (DSL) 1..n Implementation- Implementation- components Generator Generator Product Product components 21
  • 22. GENERATIVE PROGRAMMING: WORKFLOW Configuration Configuration (DSL) (DSL) Implementation- Implementation- components Generator Generator Customer 11 Customer components 22
  • 23. GENERATIVE PROGRAMMING: WORKFLOW Configuration Configuration (DSL) (DSL) Customer 22 Customer Implementation- Implementation- components Generator Generator Customer 11 Customer components 23
  • 24. Focus on the (software system) family! 24 24
  • 25. SOFTWARE SYSTEM FAMILY Set of applications with similar properties as well as special properties for each individual member. 25
  • 26. Phase 1: Domain analysis 26
  • 27. Listen to the customers 27
  • 28. Talk to the domain experts 28
  • 29. Do the requirements make sense? 29
  • 30. Does it belong to the family? 30
  • 31. Does it belong to the family? 31
  • 32. Does it belong to the family? 32
  • 33. Does it belong to the family? Maybe... 33
  • 34. Does it belong to the family? No! 34
  • 35. Does it belong to the family? No! 35
  • 36. Phase 2: Domain design 36
  • 37. Feature Modelling 37
  • 38. Phase 3: Domain implementation 38
  • 39. Implementation components 39
  • 40. Configuration Knowledge 40
  • 41. GENERATIVE PROGRAMMING Generator Domain Engineering Domain- analysis Domain- design Domain- implementation 41
  • 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. Technology projection 43
  • 44. GENERATIVE PROGRAMMING: FRAMEWORK http://replicatorframework.org 44
  • 45. GENERATIVE PROGRAMMING: FRAMEWORK Java + Maven + Spring + Eclipse 45
  • 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. 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. 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. 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. 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. GENERATIVE PROGRAMMING What about custom logic? 51
  • 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. 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. 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. GENERATIVE PROGRAMMING Code anyone? 55
  • 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. 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. GENERATIVE PROGRAMMING How to run the generator? 58
  • 59. GENERATIVE PROGRAMMING mvn replicator:run 59
  • 60. GENERATIVE PROGRAMMING: THE GOAL Increasing the productivity, quality, and time-to-market 60
  • 61. GENERATIVE PROGRAMMING: THE GOAL Creating an optimized application on demand! 61
  • 62. GENERATIVE PROGRAMMING: BONUS POINTS 62
  • 63. GENERATIVE PROGRAMMING: BONUS POINTS Less error-prone, due to automation 63
  • 64. GENERATIVE PROGRAMMING: BONUS POINTS Reduce the complexity of the application 64
  • 65. GENERATIVE PROGRAMMING: BONUS POINTS Just one code repository: The software generator 65
  • 66. GENERATIVE PROGRAMMING: BONUS POINTS Reduce maintenance efforts 66
  • 67. GENERATIVE PROGRAMMING: THE BOOK 67
  • 68. Stephan Hochdörfer http://www.bitExpert.debitExpert AG S.Hochdoerfer@bitExpert.de