Agile Architecture Odessa Johannes Brodwall Chief scientist Exilesoft
Agile Architecture Odessa Johannes Brodwall, Chief scientist Exilesoft Global
What is an architect? From greek Arkhi-Tecton: Builder Arkhi: Chief. Like “Arch angel” Or “Arch nemesis”
What is an architect? “Chief builder”
What is an architect? (Exilesoft definition)
A solution architect is someone who understands the problem of the customer and uncovers and communicates a feasible solution
A solution architect is someone who understands the customer’s problem (including contraints, context, domain knowledge) and uncovers (though a team effort) and communicates (with credibility) a feasible solution (primarily, but not exclusively technical)
Uncover problem vision, stakeholders, usage flow Describe problem context and domain model Describe solution deployment, implementation model Simplify architecture feature oriented structure Deliver software rainbow plans
• Describing architecture • Simplifying architecture • Delivering software
Part I:
Describing architecture
• • Understanding problem • Uncovering solution Communicating architecture
Understanding the problem
(Tool time)
For some stakeholder Who has a goal The Odessa agile user group (? ) Is a type of activity Which gives a capability. Unlike most relevant alternative This has a distinguishing attribute.
For _________ Who ________ The Odessa agile user group (? ) Is a _________ Which ________. Unlike ___________ This ____________.
Example «Smidig» conference application
Example vision statement
For Agile practitioners Who need to expand on their experience and network The Smidig conference Is a networking event Which connects you with other Agile practitioners. Unlike traditional conferences This presents the experience of many people through lightning talks.
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 apps This is optimized for the large number of talks we have and allows us to make changes fast.
Example stakeholders
Speaker Attendee Organizer Description • Experienced • New speaker • Passionate Description • Knows about agile • Works in project • Norwegian Description • Volunteer • Works in evenings • Has network Duties • Register talk • Upload slide • Give talk Duties • Pay for conference • Get approval to go Duties • Select talks • Follow up payments Values • Constructive feedback on talk • Easy Cf. P • Fast answer Values • Easy registration Values • Easy selection process • Good information overview • Never lose a participant • Financial transparency
Sponsor Description • Busy • Manager • Not very interested Duties • Provide logo • Pay sponsorship Values • Informal communication • Easy evaluation
Example usage flow
Attendance 1. 2. 3. 4. 5. 6. 7. 8. 9. Agile project practitioner wants to learn Attendee goes to Smidig website Attendee registers Attendee pays Attendee receives confirmation mail Organizer can see the registration Organizer sends reminder email to attendee to come Organizer prints badges for attendees Attendee shows up at Smidig and has an excellent time
Speaker 1. 2. 3. 4. 5. Agile experts wants to share knowledge Potential speaker goes to Smidig website Potential speaker registers personal info Potential speaker registers talk Potential speaker receives registration confirmation email Organizer sees registered talk and can market speaking opportunities Organizer accepts talk for confence Speaker receives acceptance email 6. 7. 8. – 9. 10. Alternative: Speaker withdraws talk – organizer updates the talk and selects another Organizer prints badges for speakers Speaker shows up at Smidig and gives talk
/Understanding the problem
Uncovering a solution
Example context model
Participant Speaker Organizer Paypal Smidig 2011. no Printing company
Example domain model
User • • • * Comment • • • Title Text Created date * Registration Name Email Company Phone Password Accepts email? Speaker • • • Ticket type Price Paid amount Paypal ref Payment date Invoice address [optional] * * Talk • • Title Description Tags[] Slide file Status : {pending, accept, reject} Email_sent Position Period • • Stage Title Time of day Day
Example deployment model
Web user html/http Developer git push git pull github git push git. heroku Smidigconference (Rails) Heroku http Paypal smtp Smtp. dreamhost. com smidigdb Postgre. SQL
Example implementation diagram
Browser Smidig 2012. no Paypal. com 1. POST /users 2. Redirect to paypal with return_url and notify_url Save user info 3. Perform payment 4. POST /payment_notifications Update user info 5. Redirect to return_url 5. GET /user/<id> Show user info
/Uncovering a solution
Communicating a solution
Vision Stakeholders Usage flow Context Domain model Implementation Deployment
Does the architect have to do this herself?
Team effort
/Communicating a solution
/Describing architecture
Part II:
Simplifying architecture
• • Lasagna architecture Feature oriented architecture • Deployment constraints
Lasagna architecture
Person. Controller Person. Service Person. Repository Person. Dao Person. Controller. Impl Person. Service. Impl Person. Repository Impl Person. Dao Impl Session. Factory
Controllers Services Managers Workers Repositories
Controllers DTO Services Mapping Domain Managers Workers Repositories
Customer Invoice Order Product
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 by technology fashion:
Controllers DTO Services Mapping Domain Managers Workers Repositories
Your solution is constrained by deployment
Web user Browser JSON/http DTO? Web Application Consumer DTO Controller SOAP Service DTO Web Service Database
Web user Browser JSON/http DTO? Web Application Controller DAO Database
Web user html/http Controller Web Application DAO Database
Web user html/http Reverse proxy html/http Controller Web Application DAO Database
Web user Controller Rich client DTO Objects over http DTO Web Application Database
Web user Controller Rich client DTO Consumer Web service Service DTO Web Application Database
Web user External client Browser JSON/http DTO? Web Application Consumer DTO Controller SOAP Service DTO Web Service DAO Database
Web user External client Browser JSON/http Controller Service DTO Web Application DAO Database
/Simplifying architecture
Part III:
Delivering software
• Common sprint problems • Demo driven development • Rainbow plans
Common Sprint problems
User stories without context
Every feature must be perfect at first try
Users don’t understand the demo
One-sentence Scrum
We demonstrate progress at regular intervals
It’s all about the demo
We demonstrate progress at regular intervals
Progress towards what?
Usage flow 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Something happens in the real world The event is communicated to the system The system does something Someone does something with the system … … … Some goal is achieved
Rainbow plan
Usage flow: frugalflights. com 1. 2. A customer wants cheap vacations The customer signs up for daily or weekly notifications of special flight offers Periodically the System checks which customers should get notifications The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system The System notifies customer of any matching offers via SMS 3. 4. 5. • 6. Variation: The System notifies customer of any matching offers via email The customer accepts the offer via SMS 1. 7. 8. Variation: The customer accepts the offer on the system website The System books the tickets on behalf of the customer The system confirms the booking by sending an SMS to the customer 9. The customer can at any point see their active offers and accepted offers on the system website 10. The customer enjoys a cheap vacation!
What would you do in Sprint 1?
Usage flow: frugalflights. com 1. 2. A customer wants cheap vacations The customer signs up for daily or weekly notifications of special flight offers Periodically the System checks which customers should get notifications The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system The System notifies customer of any matching offers via SMS 3. 4. 5. • 6. Variation: The System notifies customer of any matching offers via email The customer accepts the offer via SMS 1. 7. 8. Variation: The customer accepts the offer on the system website The System books the tickets on behalf of the customer The system confirms the booking by sending an SMS to the customer 9. The customer can at any point see their active offers and accepted offers on the system website 10. The customer enjoys a cheap vacation!
Sprint 1: Walking skeleton 1. 2. A customer wants cheap vacations The customer signs up for daily or weekly notifications of special flight offers Periodically the System checks which customers should get notifications The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system The System notifies customer of any matching offers via SMS 3. 4. 5. • 6. Variation: The System notifies customer of any matching offers via email The customer accepts the offer via SMS 1. 7. 8. Variation: The customer accepts the offer on the system website The System books the tickets on behalf of the customer The system confirms the booking by sending an SMS to the customer 9. The customer can at any point see their active offers and accepted offers on the system website 10. The customer enjoys a cheap vacation!
Sprint 2: SMS support 1. 2. A customer wants cheap vacations The customer signs up for daily or weekly notifications of special flight offers Periodically the System checks which customers should get notifications The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system The System notifies customer of any matching offers via SMS 3. 4. 5. • 6. Variation: The System notifies customer of any matching offers via email The customer accepts the offer via SMS 1. 7. 8. Variation: The customer accepts the offer on the system website The System books the tickets on behalf of the customer The system confirms the booking by sending an SMS to the customer 9. The customer can at any point see their active offers and accepted offers on the system website 10. The customer enjoys a cheap vacation!
Sprint 3: Complete workflow 1. 2. A customer wants cheap vacations The customer signs up for daily or weekly notifications of special flight offers Periodically the System checks which customers should get notifications The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system The System notifies customer of any matching offers via SMS 3. 4. 5. • 6. Variation: The System notifies customer of any matching offers via email The customer accepts the offer via SMS 1. 7. 8. Variation: The customer accepts the offer on the system website The System books the tickets on behalf of the customer The system confirms the booking by sending an SMS to the customer 9. The customer can at any point see their active offers and accepted offers on the system website 10. The customer enjoys a cheap vacation!
Sprint 4: Complete SMS 1. 2. A customer wants cheap vacations The customer signs up for daily or weekly notifications of special flight offers Periodically the System checks which customers should get notifications The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system The System notifies customer of any matching offers via SMS 3. 4. 5. • 6. Variation: The System notifies customer of any matching offers via email The customer accepts the offer via SMS 1. 7. 8. Variation: The customer accepts the offer on the system website The System books the tickets on behalf of the customer The system confirms the booking by sending an SMS to the customer 9. The customer can at any point see their active offers and accepted offers on the system website 10. The customer enjoys a cheap vacation!
Sprint 5: Web pages 1. 2. A customer wants cheap vacations The customer signs up for daily or weekly notifications of special flight offers Periodically the System checks which customers should get notifications The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system The System notifies customer of any matching offers via SMS 3. 4. 5. • 6. Variation: The System notifies customer of any matching offers via email The customer accepts the offer via SMS 1. 7. 8. Variation: The customer accepts the offer on the system website The System books the tickets on behalf of the customer The system confirms the booking by sending an SMS to the customer 9. The customer can at any point see their active offers and accepted offers on the system website 10. The customer enjoys a cheap vacation!
Sprint 7: Integration 1. 2. A customer wants cheap vacations The customer signs up for daily or weekly notifications of special flight offers Periodically the System checks which customers should get notifications The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system The System notifies customer of any matching offers via SMS 3. 4. 5. • 6. Variation: The System notifies customer of any matching offers via email The customer accepts the offer via SMS 1. 7. 8. Variation: The customer accepts the offer on the system website The System books the tickets on behalf of the customer The system confirms the booking by sending an SMS to the customer 9. The customer can at any point see their active offers and accepted offers on the system website 10. The customer enjoys a cheap vacation!
Sprint 8: Spit-and-polish 1. 2. A customer wants cheap vacations The customer signs up for daily or weekly notifications of special flight offers Periodically the System checks which customers should get notifications The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system The System notifies customer of any matching offers via SMS 3. 4. 5. • 6. Variation: The System notifies customer of any matching offers via email The customer accepts the offer via SMS 1. 7. 8. Variation: The customer accepts the offer on the system website The System books the tickets on behalf of the customer The system confirms the booking by sending an SMS to the customer 9. The customer can at any point see their active offers and accepted offers on the system website 10. The customer enjoys a cheap vacation!
/Delivering software
Conclusion:
Travel light – 7 perspectives Domain oriented architecture Sprint with a (rainbow) plan
What’s the common theme?
Usage flow
Good architecture comes from understanding usage
Thank you jbr@exilesoft. com http: //johannesbrodwall. com http: //exilesoft. com http: //twitter. com/jhannes • • Vision • Stakeholders • Usage flows – rainbow plans • Context • Domain • (Simple) Deployment (Feature oriented) implementation
- Slides: 110