MDA: Smarter development of Java EE applications <ul><li>Richard van der Laan  Tony Sloos  </li></ul><logo>
Agenda <ul><li>Basic Principles </li></ul><ul><li>Ingredients for “Pragmatic MDA” </li></ul><ul><li>By Example: </li></ul>...
Speakers Background <ul><li>Tony Sloos  –   independent architect </li></ul><ul><li>Field of activity: strategy, architect...
Model Driven Architecture <ul><li>Defined by the OMG (2001) </li></ul><ul><li>Conceptual framework for using models and ap...
MDA Process <ul><li>Build models with high level of abstraction (independent of implementation) </li></ul><ul><li>Transfor...
MDA Process <ul><li>Build models with high level of abstraction (independent of implementation) </li></ul><ul><li>Transfor...
Top-down vs Bottom-up Working software Models PIM PSM Top-down Bottom-up Transformation Skilled Transformation Capture dom...
Pragmatic approach to MDA <ul><li>Introduce MDA where it makes sense </li></ul><ul><ul><li>MDA as a means, not as a goal! ...
Bottom Up : Target Architecture <ul><li>Start with analyzing the current situation in code </li></ul><ul><li>Discover patt...
Bottom Up : Target Architecture <ul><li>It makes no sense modeling the  PSM layer  when the target architecture is known! ...
Bottom Up : Domain Model Concepts <ul><li>Capture domain concepts from  problem space </li></ul><ul><li>Use  stereotyping ...
MDA Toolchain : Pick your tools! <ul><li>UML modeling tools </li></ul><ul><ul><ul><li>Eclipse EMF, Enterprise Architect, M...
Ingredients for pragmatic MDA A well-defined  Technology Stack A well-defined  Target Architecture A well-defined Automati...
Ingredient 1: Technology-stack
Ingredient 2: Target-architecture
Ingredient 3: Automation-goals Stereotype Generator Artifacts
Basic Principles Application Aspect Target Architecture Translation Stereotype Template Engine Approach Artifacts Translat...
Basic Principles: by example Entities Application Aspect Template Engine POJO + ORM Target Architecture Translation Entity...
By Example Conference Administration as a Service (CAaaS) WS1 Registration Service Schedule Service WS2 Domain Model RIA (...
By Example Domain Model
By Example Domain Facade
By Example Domain Logic
By Example Web Service Fine-tuning with “Tagged Values” in EA Facades use a canonical data model (CDM) to allow XSD-based ...
Stereotypes with a background <ul><li>Mapped on Target Architecture </li></ul>
Room for hand-crafting! Seam injection is used to merge “custom code” Seam component (separate class) holds “custom code”
From meta-model to code Step 1    Build your meta-model Create your meta-model in EA using predefined meta-types and obje...
From meta-model to code Step 2    Save your meta-model as UML 2.0 Profile Export meta-model as UML 2.0 Profile Import UML...
From meta-model to code Step 3    Take your pick and model... Your own stereotypes in EA Drag-and-Drop from toolbox to di...
From meta-model to code Step 4a    Generate artifacts (update/build process) The template engine transforms stereotypes i...
From meta-model to code Step 4b    Generate artifacts (template engine) Ant-task EA repository EA api FMPP Template Model...
From meta-model to code Step 4c    Generate artifacts (output) Java Entity Java DAO C# Entity Hibernate mapping XSD Type
Are you ready for MDA? <ul><li>Apply a pragmatic approach </li></ul><ul><li>Look beyond the tooling to make MDA work </li>...
[email_address] [email_address] Time for a demo and questions…
Upcoming SlideShare
Loading in …5
×

Final Jspring2009 Mda Slimmer Ontwikkelen Van Java Ee Applicaties

718 views

Published on

Smart development with a pragmatic MDA approach

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
718
On SlideShare
0
From Embeds
0
Number of Embeds
11
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Final Jspring2009 Mda Slimmer Ontwikkelen Van Java Ee Applicaties

  1. 1. MDA: Smarter development of Java EE applications <ul><li>Richard van der Laan Tony Sloos </li></ul><logo>
  2. 2. Agenda <ul><li>Basic Principles </li></ul><ul><li>Ingredients for “Pragmatic MDA” </li></ul><ul><li>By Example: </li></ul><ul><ul><li>Starting from scratch </li></ul></ul><ul><ul><li>Taking advantage of Seam and EJB 3.0 </li></ul></ul><ul><ul><li>From meta-model to code with EA and Freemarker </li></ul></ul><ul><li>Questions & Demo </li></ul>
  3. 3. Speakers Background <ul><li>Tony Sloos – independent architect </li></ul><ul><li>Field of activity: strategy, architecture & implementation guidance/governance </li></ul><ul><li>Specializations : Java EE, frameworks & model-based development </li></ul><logo> <ul><li>Richard van der Laan – software architect </li></ul><ul><li>Field of activity: architecture & multi-disciplinary product development </li></ul><ul><li>Specializations : high-tech automation, distributed services, model-based development </li></ul>
  4. 4. Model Driven Architecture <ul><li>Defined by the OMG (2001) </li></ul><ul><li>Conceptual framework for using models and applying transformations between models </li></ul><ul><li>Driven by the activity of modeling systems </li></ul><ul><li>Expected Bottom-line benefits: </li></ul><ul><ul><li>Less development costs </li></ul></ul><ul><ul><li>Improved quality </li></ul></ul><ul><ul><li>Shorter time to market </li></ul></ul>
  5. 5. MDA Process <ul><li>Build models with high level of abstraction (independent of implementation) </li></ul><ul><li>Transform models into specific models (specifying implementation constructs) </li></ul><ul><li>Transform models into code </li></ul>PIM Working software PSM CIM Transformation
  6. 6. MDA Process <ul><li>Build models with high level of abstraction (independent of implementation) </li></ul><ul><li>Transform models into specific models (specifying implementation constructs) </li></ul><ul><li>Transform models into code </li></ul>PIM Working software PSM CIM Transformation
  7. 7. Top-down vs Bottom-up Working software Models PIM PSM Top-down Bottom-up Transformation Skilled Transformation Capture domain information Transformation Capture technical information Simple tools (whiteboards) Modify code As needed
  8. 8. Pragmatic approach to MDA <ul><li>Introduce MDA where it makes sense </li></ul><ul><ul><li>MDA as a means, not as a goal! </li></ul></ul><ul><li>Balance between Top-down and Bottom-up </li></ul><ul><ul><li>First understand, then automate! </li></ul></ul><ul><li>Be Pragmatic: Start Bottom-up </li></ul><ul><ul><li>From Code to Models </li></ul></ul><ul><ul><ul><li>Start with the Working Code </li></ul></ul></ul><ul><ul><li>Well defined Technology Stack </li></ul></ul><ul><ul><ul><li>Make use of standardized frameworks aiming on solution space </li></ul></ul></ul>Models Code
  9. 9. Bottom Up : Target Architecture <ul><li>Start with analyzing the current situation in code </li></ul><ul><li>Discover patterns: </li></ul><ul><ul><ul><li>Repetitive patterns in artifacts </li></ul></ul></ul><ul><ul><ul><li>Variation points in the architecture </li></ul></ul></ul><ul><ul><ul><li>Faulty sensitive artifacts </li></ul></ul></ul><ul><ul><ul><li>Artifacts partitioned across different technologies </li></ul></ul></ul>Patterns Platform indep. model Target architecture Domain model
  10. 10. Bottom Up : Target Architecture <ul><li>It makes no sense modeling the PSM layer when the target architecture is known! </li></ul><ul><li>Capture platform specific details in transformation rules </li></ul>Platform specific model Transformation Platform indep. model Target architecture Domain model
  11. 11. Bottom Up : Domain Model Concepts <ul><li>Capture domain concepts from problem space </li></ul><ul><li>Use stereotyping to embody model in software </li></ul><ul><ul><li>Define meaning of model elements </li></ul></ul><ul><ul><li>Define mapping on target architecture in solution space </li></ul></ul><ul><li>Domain-Driven Design </li></ul><ul><ul><li>We apply the systematic approach by Eric Evans </li></ul></ul>Platform indep. model Target architecture Domain model
  12. 12. MDA Toolchain : Pick your tools! <ul><li>UML modeling tools </li></ul><ul><ul><ul><li>Eclipse EMF, Enterprise Architect, Magic Draw (XMI compliancy eases metadata interchange) </li></ul></ul></ul><ul><li>MDA generator frameworks </li></ul><ul><ul><ul><li>oAW, AndroMDA, OpenMDX, Acceleo </li></ul></ul></ul><ul><ul><li>Model-to-model transformation </li></ul></ul><ul><ul><ul><li>oAW Xtend, OMG QVT Operational </li></ul></ul></ul><ul><ul><li>Model-to-text (code) transformation </li></ul></ul><ul><ul><ul><li>oAW XPand, JET, FreeMarker template engine </li></ul></ul></ul>
  13. 13. Ingredients for pragmatic MDA A well-defined Technology Stack A well-defined Target Architecture A well-defined Automation Scope <ul><li>Mix the right ingredients </li></ul><ul><li>Apply a short development cycle </li></ul>Code Patterns Meta model Models Templates
  14. 14. Ingredient 1: Technology-stack
  15. 15. Ingredient 2: Target-architecture
  16. 16. Ingredient 3: Automation-goals Stereotype Generator Artifacts
  17. 17. Basic Principles Application Aspect Target Architecture Translation Stereotype Template Engine Approach Artifacts Translation 1 1..n
  18. 18. Basic Principles: by example Entities Application Aspect Template Engine POJO + ORM Target Architecture Translation Entity Class JPA Config DAO Class Artifacts <<DomainEntity>> Stereotype Translation DDD (Eric Evans) Approach
  19. 19. By Example Conference Administration as a Service (CAaaS) WS1 Registration Service Schedule Service WS2 Domain Model RIA (Silverlight) Access Logic Data Persistency Client Domain Facades Business Facades
  20. 20. By Example Domain Model
  21. 21. By Example Domain Facade
  22. 22. By Example Domain Logic
  23. 23. By Example Web Service Fine-tuning with “Tagged Values” in EA Facades use a canonical data model (CDM) to allow XSD-based data contracts
  24. 24. Stereotypes with a background <ul><li>Mapped on Target Architecture </li></ul>
  25. 25. Room for hand-crafting! Seam injection is used to merge “custom code” Seam component (separate class) holds “custom code”
  26. 26. From meta-model to code Step 1  Build your meta-model Create your meta-model in EA using predefined meta-types and object-orientation Properties in your meta-model become tagged-values in your model
  27. 27. From meta-model to code Step 2  Save your meta-model as UML 2.0 Profile Export meta-model as UML 2.0 Profile Import UML 2.0 Profile into your model Ready to model!
  28. 28. From meta-model to code Step 3  Take your pick and model... Your own stereotypes in EA Drag-and-Drop from toolbox to diagram
  29. 29. From meta-model to code Step 4a  Generate artifacts (update/build process) The template engine transforms stereotypes into artifacts <ul><li>Ant-task/Maven that runs template engine within Ecplise and Hudson: </li></ul><ul><li>Freemarker (www.freemarker.org) </li></ul><ul><li>Freemarker Pre-processor (fmpp.sourcefourge.net) </li></ul>
  30. 30. From meta-model to code Step 4b  Generate artifacts (template engine) Ant-task EA repository EA api FMPP Template Models (java class) Templates Templates Templates Templates DomainEnumeration.ftl
  31. 31. From meta-model to code Step 4c  Generate artifacts (output) Java Entity Java DAO C# Entity Hibernate mapping XSD Type
  32. 32. Are you ready for MDA? <ul><li>Apply a pragmatic approach </li></ul><ul><li>Look beyond the tooling to make MDA work </li></ul><ul><li>Use a systematic approach to domain modeling </li></ul><ul><li>Tailor your UML profile </li></ul><ul><li>Aim for specific PSM transformations </li></ul><ul><li>Mix the right ingredients: </li></ul><ul><ul><ul><li>Well-defined Technology Stack </li></ul></ul></ul><ul><ul><ul><li>Well-defined Target Architecture </li></ul></ul></ul><ul><ul><ul><li>Well-defined Automation Scope </li></ul></ul></ul>
  33. 33. [email_address] [email_address] Time for a demo and questions…

×