Model driven development using smart use cases and domain driven design

3,759 views

Published on

Short presentation of how smart use cases and domain driven design can trigger model driven development. Note: there is a very good white paper on the Capgemini website about the same approach.

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

No Downloads
Views
Total views
3,759
On SlideShare
0
From Embeds
0
Number of Embeds
1,090
Actions
Shares
0
Downloads
112
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Model driven development using smart use cases and domain driven design

  1. 1. MODEL DRIVEN DEVELOPMENTWith smart use cases, domain driven design and Tobago MDA
  2. 2. SANDER HOOGENDOORNCapgemini Principal technology officer Chief architect Accelerated Delivery Platform (ADP) Global agile thought leaderOther Author books and articles Speaker at international conferences Microsoft Partner Advisory Council .NET Capping IT Off Blog Magazine columns Editorial boards & Advisory boardsWeb www.sanderhoogendoorn.com www.smartusecase.com Twitter: @aahoogendoorn LinkedIn: aahoogendoorn INTRODUCTION TO AGILE 2 ©2011 Capgemini. All Rights Reserved
  3. 3. AGENDAToday’s topics Smart use cases Domain driven design Software architecture Model driven development with Tobago MDA Generating code with Tobago MDA Demo(s)! INTRODUCTION TO AGILE 3 ©2011 Capgemini. All Rights Reserved
  4. 4. SMART USE CASESA YAGNI approach to requirements
  5. 5. AGILE REQUIREMENTS - APPROACH Cloud Level Kite Level Sea Level Fish Level B D A Hierarchical E A D D Processes B C F Use Cases SmartProject Hierarchical C Use CasesScope Processes D Chronological Processes INTRODUCTION TO AGILE 5 ©2011 Capgemini. All Rights Reserved
  6. 6. CLOUD LEVEL INTRODUCTION TO AGILE 6 ©2011 Capgemini. All Rights Reserved
  7. 7. KITE LEVEL INTRODUCTION TO AGILE 7 ©2011 Capgemini. All Rights Reserved
  8. 8. MODELING SMART USE CASES – SEA AND FISH LEVEL INTRODUCTION TO AGILE 8 ©2011 Capgemini. All Rights Reserved
  9. 9. SMART USE CASESStereotypes
  10. 10. DOMAIN DRIVEN DEVELOPMENTA brief introduction
  11. 11. DOMAIN DRIVEN DEVELOPMENT - VOCABULARY Entity Object in the domain model not defined by its attributes, but by a thread of continuity and identity Value object Has no conceptual identity. Describe a characteristic of a thing Repository Methods for retrieving domain objects should delegate to a specialized repository object such that alternative implementations may be easily interchanged. Factory Methods for creating domain objects should delegate to a specialized factory object such that alternative implementations may be easily interchanged. Service Implement if an operation does not conceptually belong to any entity Implement these operations in services INTRODUCTION TO AGILE 11 ©2011 Capgemini. All Rights Reserved
  12. 12. DOMAIN DRIVEN DEVELOPMENT – EXTENDED VOCABULARY Enumeration * Restricted and limited set of possible values Apply only when set of values never changes Smart reference * Generic reference entity Restricted but unlimited list of possible values Apply when only reference matters, not additional values, like in reports or drop downs INTRODUCTION TO AGILE 12 ©2011 Capgemini. All Rights Reserved
  13. 13. ENTITY ATTRIBUTES
  14. 14. ENTITY ATTRIBUTES – TYPES OF ATTRIBUTES Basic types string, integer, DateTime Including nullable wrapping Enumerations Genders, Categories Value objects No specific instances Isbn, Postcode, Bsn Simple references Smart references, such as Language, County Associations Other entities such as Customer, Product Within or outside aggregate INTRODUCTION TO AGILE 14 ©2011 Capgemini. All Rights Reserved
  15. 15. VALUE OBJECT – IN USE INTRODUCTION TO AGILE 15 ©2011 Capgemini. All Rights Reserved
  16. 16. SMART REFERENCE - TABLE INTRODUCTION TO AGILE 16 ©2011 Capgemini. All Rights Reserved
  17. 17. SMART REFERENCE – IN USE INTRODUCTION TO AGILE 17 ©2011 Capgemini. All Rights Reserved
  18. 18. SOFTWARE ARCHITECTUREA true requirements for model driven development
  19. 19. PagesPresentation UserControls Panels Use casesProcess Workflow Domain objects / EntitiesDomain Factories / Repositories Enums / Value objects / Smart references [Mapping] Table GatewaysData / Services Queries [Mapping]Outside world Database INTRODUCTION TO AGILE 19 ©2011 Capgemini. All Rights Reserved
  20. 20. MODEL DRIVEN DEVELOPMENTWith Tobago MDA
  21. 21. User interface Software Architecture specification 1. Map your 5. Finalize your business processes application Existing to smart use casesApplications Smart use cases Forms Use cases 4. Generate your code using Tobago MDA a text template FrameworksSpecifications engine Domain Domain Model objects Data / Service Business classes models 2. Set up your Test 3. Establish scenario’s domain model your software Databases architecture(s) INTRODUCTION TO AGILE 21 ©2011 Capgemini. All Rights Reserved
  22. 22. MODEL DRIVEN DEVELOPMENT – TEMPLATE ENGINES Characteristics Load UML model (expressed in XMI) Load templates (from flat files) Combine elements from UML model with templates to generate deliverables Templates Templates contains code that runs in template engine Templates might use a folder model Generation process Ability to generate all or individual UML model elements Which UML model elements are supported? Generated deliverables can be code but also any other document type INTRODUCTION TO AGILE 22 ©2011 Capgemini. All Rights Reserved
  23. 23. MODEL DRIVEN DEVELOPMENT - TEMPLATE ENGINES Properties can be used in templatesTemplate engine knows (part of) the UML meta model INTRODUCTION TO AGILE 23 ©2011 Capgemini. All Rights Reserved
  24. 24. MODEL DRIVEN DEVELOPMENT - TEMPLATES INTRODUCTION TO AGILE 24 ©2011 Capgemini. All Rights Reserved
  25. 25. GENERATE MANY THINGS E.G. TABLE CREATE SCRIPTS INTRODUCTION TO AGILE 25 ©2011 Capgemini. All Rights Reserved
  26. 26. GENERATING CODEA quick example
  27. 27. A SIMPLE SMART USE CASE MODEL uc Manage Customer «search» Select Customer «incl ude» «master detail» Manage Customer Site Administrator (from A ctors) «extend» «define» Define Contact INTRODUCTION TO AGILE 27 ©2011 Capgemini. All Rights Reserved
  28. 28. A SIMPLE DOMAIN MODEL class Budapest.Business «business class» «business class» Cust omer Cont act + Name: string + Name: string + Address: string * + Email: Email [0..1] + Postcode: Postcode + Phone: PhoneNumber [0..1] + City: string + Department: Departments + Country: SmartRef + Website: Url [0..1] «enumeration» Depart ments Sal es Purchasing Helpdesk Management INTRODUCTION TO AGILE 28 ©2011 Capgemini. All Rights Reserved
  29. 29. USING TOBAGO MDA INTRODUCTION TO AGILE 29 ©2011 Capgemini. All Rights Reserved
  30. 30. GENERATED CODE IN ASP.NET INTRODUCTION TO AGILE 30 ©2011 Capgemini. All Rights Reserved
  31. 31. GENERATED CODE IN SILVERLIGHT INTRODUCTION TO AGILE 31 ©2011 Capgemini. All Rights Reserved
  32. 32. WWW.SMARTUSECASE.COMwww.accelerateddeliveryplatform.com
  33. 33. REFERENCES AND QUESTIONSsander.hoogendoorn@capgemini.comwww.sanderhoogendoorn.com | www.smartusecase.com | www.accelerateddeliveryplatform.com@aahoogendoorn

×