Agile Architecture                         XP Days 2012      Johannes Brodwall, Chief scientist                      Exile...
What is an architect?  From greek Arkhi-Tecton          Tecton: Builder             Arkhi: Chief.        Like “Arch angel”...
What is an architect?          “Chief builder”
What is an architect?      (Exilesoft definition)
A solution architect is someone who understandsthe problem of the customer         and uncovers and             communicat...
A solution architect is someone who         understands the customer’s                     problem (includingcontraints, c...
Uncover problemvision, stakeholders, usage flow             Describe problem      context and domain model             Des...
• Describing architecture• Simplifying architecture  • Delivering architecture    • Delivering software
Part I:
Describingarchitecture
• Understanding problem       • Uncovering solution•   Communicating architecture
Understanding the         problem
(Tool time)
For some stakeholder            Who has a responsibilityThe Bare-bones architecture workshop                  Is a type of...
For __________________       Who ________________       The _________________       Is a _________________     Which _____...
Participant?               ???            ???Who are they?       Description    DescriptionWhat do they do?    Duties     ...
Example«Smidig» conference application
Example vision    statement
For Agile practitionersWho need to expand on their experience and network                             The Smidig conferenc...
For Conference organizers    Who want to organize a good conference                The Smidig conference app              ...
Examplestakeholders
Speaker             Attendee                OrganizerDescription           Description            Description• Experienced...
SponsorDescription• Busy• Manager• Not very interestedDuties• Provide logo• Pay sponsorshipValues• Informal   communicatio...
Example usage flow
Attendance1.   Agile project practitioner wants to learn2.   Attendee goes to Smidig website3.   Attendee registers4.   At...
Speaker1.        Agile experts wants to share knowledge2.        Potential speaker goes to Smidig website3.        Potenti...
/Understanding the          problem
Uncovering a    solution
Example context         model
Participant       Speaker                                       OrganizerPaypal                 Smidig2011.no             ...
Example domain         model
User                   •   Name                              Registration                   •   Email                     ...
Exampledeployment model
Web user     Developer                 html/httpgit push         git pushgit pull                                Smidig-  ...
Exampleimplementation      diagram
1. Find controller     Router       2. Dispatch action                                  3. Find model           Controller...
POST /users/<id>      Router          1. Find UserController     2. update(id)           /app/controllers     3. find(id) ...
GET /users/<id>      Router           1. Find UsersController       2. show(id)            /app/controllers      3. find(i...
Alternative
Browser                Smidig2012.no                  Paypal.com          1. POST /users                                  ...
/Uncovering a     solution
Communicating a       solution
Vision  Stakeholders    Usage flow       Context Domain model   DeploymentImplementation
Does the architect  have to do this          herself?
Team effort
/Communicating a        solution
/Describingarchitecture
Part II:
Finding therequirements
I need a volunteer
For some stakeholder         Who has a responsibilty               The system name              Is a type of system       ...
Participant?               ???            ???Who are they?       Description    DescriptionWhat do they do?    Duties     ...
….1.    Something happens in the real world2.    The event is communicated to the system3.    The system does something4. ...
/Findingrequirements
Part III:
Describearchitecture
Frugalflights.com1.       A customer wants cheap vacations2.       The customer signs up for daily or weekly notifications...
User                  UserWho are they          Who are they• …                   • …What do they do?      What do they do...
Example context         model
What actors did youmention in scenario?
Context: Frugalflights.com1.       A customer wants cheap vacations2.       The customer signs up for daily or weekly noti...
Domain: Frugalflights.com1.       A customer wants cheap vacations2.       The customer signs up (?) for daily or weekly n...
Example domain         model
What concepts did  you mention in       scenario?
Exampledeployment model
Which servers are      involved in     production?
Exampleimplementation      diagram
How does the code           work?
Statnett electricity reserves1.           Grid operator want to maintain balance of electric production and consumption2. ...
/Describearchitecture
What surprised you?What did you learn?             Your plan to change             how you work?
Conclusion:
Tomorrow: Make your      system shine!
Thank you           jbr@exilesoft.com http://johannesbrodwall.com           http://exilesoft.com    http://twitter.com/jha...
• Lasagna architecture•   Feature oriented architecture     • Deployment constraints
Lasagnaarchitecture
Person-       Person-       Person-                                         PersonDaoController     Service      Repositor...
Controllers  Services Managers  WorkersRepositories
Controllers                DTO  Services     Mapping               Domain Managers  WorkersRepositories
CustomerInvoiceOrderProduct
Tidying up art (Ursus Wehrli)
Feature oriented    architecture
Coherence• What changes together          lives together
Tolerance• What should be different          can be different
Meaning• What is central in domain          is central in code
Your thinking is      contrained bytechnology fashion:
Controllers                DTO  Services     Mapping               Domain Managers  WorkersRepositories
Your solution is constrained by    deployment
Web user      Browser                   JSON/httpController DTO? Web ApplicationConsumer   DTO                   SOAPServi...
Web user       html/httpControllerWeb Application  DAO      Database
Web user              html/http Reverse proxy              html/httpControllerWeb Application  DAO      Database
Web user     Browser             JSON/http         DTO?ControllerWeb Application  DAO      Database
Web userController    Rich clientConsumer     DTO             Web             serviceService   DTOWeb Application      Dat...
Web userController    Rich client             DTO             Objects             over http                   DTOWeb Appli...
Web userExternal client         Browser                                      JSON/http                  Controller DTO?   ...
Web userExternal client           Browser                                 JSON/http                  Service        Contro...
Bare-Bones Software Architecture
Bare-Bones Software Architecture
Bare-Bones Software Architecture
Bare-Bones Software Architecture
Bare-Bones Software Architecture
Bare-Bones Software Architecture
Bare-Bones Software Architecture
Bare-Bones Software Architecture
Bare-Bones Software Architecture
Bare-Bones Software Architecture
Bare-Bones Software Architecture
Upcoming SlideShare
Loading in...5
×

Bare-Bones Software Architecture

1,793

Published on

These are my slides from the Bare-Bones Software Architecture course at XP Days Ukraine 2012. The workshop outlines a quick workshop-oriented process for initiating software projects

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,793
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
12
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Bare-Bones Software Architecture

  1. 1. Agile Architecture XP Days 2012 Johannes Brodwall, Chief scientist Exilesoft Global
  2. 2. What is an architect? From greek Arkhi-Tecton Tecton: Builder Arkhi: Chief. Like “Arch angel” Or “Arch villain”
  3. 3. What is an architect? “Chief builder”
  4. 4. What is an architect? (Exilesoft definition)
  5. 5. A solution architect is someone who understandsthe problem of the customer and uncovers and communicates a feasible solution
  6. 6. A solution architect is someone who understands the customer’s problem (includingcontraints, context, domain knowledge) and uncovers (though a team effort) and communicates (with credibility) a feasible solution (primarily, but not exclusively technical)
  7. 7. Uncover problemvision, stakeholders, usage flow Describe problem context and domain model Describe solution deployment, implementation model
  8. 8. • Describing architecture• Simplifying architecture • Delivering architecture • Delivering software
  9. 9. Part I:
  10. 10. Describingarchitecture
  11. 11. • Understanding problem • Uncovering solution• Communicating architecture
  12. 12. Understanding the problem
  13. 13. (Tool time)
  14. 14. For some stakeholder Who has a responsibilityThe Bare-bones architecture workshop Is a type of activity Which gives a capability. Unlike most relevant alternative This has a distinguishing attribute.
  15. 15. For __________________ Who ________________ The _________________ Is a _________________ Which ________________.Unlike ______________________This _______________________.
  16. 16. Participant? ??? ???Who are they? Description DescriptionWhat do they do? Duties DutiesWhy do they care? Values Values
  17. 17. Example«Smidig» conference application
  18. 18. Example vision statement
  19. 19. For Agile practitionersWho need to expand on their experience and network The Smidig conference Is a networking event Which connects you with other Agile practitioners. Unlike traditional conferencesThis presents the experience of many people through lightning talks.
  20. 20. For Conference organizers Who want to organize a good conference The Smidig conference app Is a web application Which eliminates unnecessary work. Unlike commercial conference appsThis is optimized for the large number of talkswe have and allows us to make changes fast.
  21. 21. Examplestakeholders
  22. 22. Speaker Attendee OrganizerDescription Description Description• Experienced • Knows about agile • Volunteer• New speaker • Works in project • Works in evenings• Passionate • Norwegian • Has networkDuties Duties Duties• Register talk • Pay for conference • Select talks• Upload slide • Get approval to go • Follow up• Give talk paymentsValues Values Values • Easy selection process• Constructive • Easy registration • Good information feedback on talk overview• Easy CfP • Never lose a participant• Fast answer • Financial transparency
  23. 23. SponsorDescription• Busy• Manager• Not very interestedDuties• Provide logo• Pay sponsorshipValues• Informal communication• Easy evaluation
  24. 24. Example usage flow
  25. 25. Attendance1. Agile project practitioner wants to learn2. Attendee goes to Smidig website3. Attendee registers4. Attendee pays using Paypal5. Attendee receives confirmation mail6. Organizer can see the registration7. Organizer sends reminder email to attendee to come8. Organizer prints badges for attendees with Print Company9. Attendee shows up at Smidig and has an excellent time
  26. 26. Speaker1. Agile experts wants to share knowledge2. Potential speaker goes to Smidig website3. Potential speaker registers personal info4. Potential speaker registers talk5. Potential speaker receives registration confirmation email6. Organizer sees registered talk and can market speaking opportunities7. Organizer accepts talk for confence8. Speaker receives acceptance email – Alternative: Speaker withdraws talk – organizer updates the talk and selects another9. Organizer prints badges for speakers10. Speaker shows up at Smidig and gives talk
  27. 27. /Understanding the problem
  28. 28. Uncovering a solution
  29. 29. Example context model
  30. 30. Participant Speaker OrganizerPaypal Smidig2011.no Printing company
  31. 31. Example domain model
  32. 32. User • Name Registration • Email • Ticket type • Price • Company • Paid amount • Phone • Paypal ref • Password • Payment date • Invoice address [optional] • Accepts email? *Comment *• Title Speaker• Text• Created date * * Talk Period • Title • Description • Stage • Tags[] * • Title • Slide file • Time of day • Status : • Day {pending, accept, rejec t} • Email_sent • Position
  33. 33. Exampledeployment model
  34. 34. Web user Developer html/httpgit push git pushgit pull Smidig- conference http Paypal github git.heroku (Rails) smtp Heroku Smtp.dreamhost.com smidigdb PostgreSQL
  35. 35. Exampleimplementation diagram
  36. 36. 1. Find controller Router 2. Dispatch action 3. Find model Controller Model class 4. Manipulate model Database Model 5.? Save model6. Render model withview templateView template View template
  37. 37. POST /users/<id> Router 1. Find UserController 2. update(id) /app/controllers 3. find(id) /app/models 4. SELECT … UsersController FROM users User class 5. update_attr(params) Database app/models 6. save User 7. UPDATE8. Redirect /users/<id> users SET …
  38. 38. GET /users/<id> Router 1. Find UsersController 2. show(id) /app/controllers 3. find(id) /app/models 4. SELECT … UsersController User class FROM users Database User5. Render /app/views/users 6. Get attributesshow.html.erb
  39. 39. Alternative
  40. 40. Browser Smidig2012.no Paypal.com 1. POST /users Save user info 2. Redirect to paypal with return_url and notify_url 3. Perform payment 4. POST /payment_notifications Update user info 5. Redirect to return_url 5. GET /user/<id> Show user info
  41. 41. /Uncovering a solution
  42. 42. Communicating a solution
  43. 43. Vision Stakeholders Usage flow Context Domain model DeploymentImplementation
  44. 44. Does the architect have to do this herself?
  45. 45. Team effort
  46. 46. /Communicating a solution
  47. 47. /Describingarchitecture
  48. 48. Part II:
  49. 49. Finding therequirements
  50. 50. I need a volunteer
  51. 51. For some stakeholder Who has a responsibilty The system name Is a type of system Which gives a capability. Unlike most relevant alternativeThis has a distinguishing attribute.
  52. 52. Participant? ??? ???Who are they? Description DescriptionWhat do they do? Duties DutiesWhat do they care Values Valuesabout?
  53. 53. ….1. Something happens in the real world2. The event is communicated to the system3. The system does something4. Someone does something with the system5. …6. …7. …8. …9. …10. Some goal is achieved
  54. 54. /Findingrequirements
  55. 55. Part III:
  56. 56. Describearchitecture
  57. 57. Frugalflights.com1. A customer wants cheap vacations2. The customer signs up for daily or weekly notifications of special flight offers3. Periodically the System checks which customers should get notifications4. The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system5. The System notifies customer of any matching offers via SMS • Variation: The System notifies customer of any matching offers via email6. The customer accepts the offer via SMS 1. Variation: The customer accepts the offer on the system website7. The System books the tickets on behalf of the customer8. The system confirms the booking by sending an SMS to the customer9. The customer can at any point see their active offers and accepted offers on the system website10. The customer enjoys a cheap vacation!
  58. 58. User UserWho are they Who are they• … • …What do they do? What do they do?• … • …What do they value? What do they value?• … • …User UserWho are they Who are they• … • …What do they do? What do they do?• … • …What do they value? What do they value?• … • …
  59. 59. Example context model
  60. 60. What actors did youmention in scenario?
  61. 61. Context: Frugalflights.com1. A customer wants cheap vacations2. The customer signs up for daily or weekly notifications of special flight offers (where?)3. Periodically the System checks which customers should get notifications4. The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system5. The System notifies customer of any matching offers via SMS • Variation: The System notifies customer of any matching offers via email6. The customer accepts the offer via SMS 1. Variation: The customer accepts the offer on the system website7. The System books the tickets on behalf of the customer (where?)8. The system confirms the booking by sending an SMS to the customer9. The customer can at any point see their active offers and accepted offers on the system website10. The customer enjoys a cheap vacation!
  62. 62. Domain: Frugalflights.com1. A customer wants cheap vacations2. The customer signs up (?) for daily or weekly notifications of special flight offers (=> “create a subscription”?)3. Periodically the System checks which customers should get notifications4. The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system5. The System notifies customer of any matching offers via SMS (=> “sends notification”?) • Variation: The System notifies customer of any matching offers via email6. The customer accepts the offer via SMS (=> “send acceptance”) 1. Variation: The customer accepts the offer on the system website7. The System books the tickets on behalf of the customer8. The system confirms the booking by sending an SMS to the customer (=> “sends confirmation”?)9. The customer can at any point see their active offers and accepted offers on the system website10. The customer enjoys a cheap vacation!
  63. 63. Example domain model
  64. 64. What concepts did you mention in scenario?
  65. 65. Exampledeployment model
  66. 66. Which servers are involved in production?
  67. 67. Exampleimplementation diagram
  68. 68. How does the code work?
  69. 69. Statnett electricity reserves1. Grid operator want to maintain balance of electric production and consumption2. Power producer sends unused capacity (reserves) per hour for each power plant to LARM using EDIFACT via Sterling Integrator – Detail: The capacity “line” has a price – Detail: Each plant may have several capacities at different prices – Detail: Capacity may be to increase or to decrease production3. A spike occurs in the consumption or production4. Grid operator sees list of available reserves per power plant 1. Alternative: Operator filters the list by grid market area5. Grid operator selects a reserve to regulate for spike6. Grid operator enters power usage on the regulation 1. Alternative: The system verifies that regulation is valid7. Grid operator communicates the regulation to producer’s operation center using phone 1. Future: The system sends the regulation to the producer as XML/http8. Balance is restored9. At end of hour, system sends usage to pricing system (NOIS) (XML/http) via Sterling Integrator10. Some time later, pricing system sends price for usage via SI11. System sends price capacity usage to accounting system via SI12. Accounting system pays producer for usage
  70. 70. /Describearchitecture
  71. 71. What surprised you?What did you learn? Your plan to change how you work?
  72. 72. Conclusion:
  73. 73. Tomorrow: Make your system shine!
  74. 74. Thank you jbr@exilesoft.com http://johannesbrodwall.com http://exilesoft.com http://twitter.com/jhannes • Vision • Stakeholders • Usage flows
  75. 75. • Lasagna architecture• Feature oriented architecture • Deployment constraints
  76. 76. Lasagnaarchitecture
  77. 77. Person- Person- Person- PersonDaoController Service Repository Person- Person- Person- PersonDaoController- Repository ServiceImpl Impl Impl Impl Session- Factory
  78. 78. Controllers Services Managers WorkersRepositories
  79. 79. Controllers DTO Services Mapping Domain Managers WorkersRepositories
  80. 80. CustomerInvoiceOrderProduct
  81. 81. Tidying up art (Ursus Wehrli)
  82. 82. Feature oriented architecture
  83. 83. Coherence• What changes together lives together
  84. 84. Tolerance• What should be different can be different
  85. 85. Meaning• What is central in domain is central in code
  86. 86. Your thinking is contrained bytechnology fashion:
  87. 87. Controllers DTO Services Mapping Domain Managers WorkersRepositories
  88. 88. Your solution is constrained by deployment
  89. 89. Web user Browser JSON/httpController DTO? Web ApplicationConsumer DTO SOAPService DTO Web Service Database
  90. 90. Web user html/httpControllerWeb Application DAO Database
  91. 91. Web user html/http Reverse proxy html/httpControllerWeb Application DAO Database
  92. 92. Web user Browser JSON/http DTO?ControllerWeb Application DAO Database
  93. 93. Web userController Rich clientConsumer DTO Web serviceService DTOWeb Application Database
  94. 94. Web userController Rich client DTO Objects over http DTOWeb Application Database
  95. 95. Web userExternal client Browser JSON/http Controller DTO? Web Application Consumer DTO SOAP Service DTO Web Service DAO Database
  96. 96. Web userExternal client Browser JSON/http Service Controller DTO Web Application DAO Database
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×