Agile Architecture

Preview:

DESCRIPTION

Agile Archite

Citation preview

Agile Architecture

Colombo Agile MeetupJohannes Brodwall, Chief scientist

Exilesoft Global

What is an architect?From greek Arkhi-Tecton

Arkhi: Chief. Like “Arch angel”

Or “Arch nemesis”

Tecton: Builder

What is an architect?(Exilesoft definition)

A solution architect is someone who understands the problem

of the customerand uncovers and

communicatesa 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 problemvision, stakeholders, usage flow

Describe problemcontext and domain model

Describe solutiondeployment, implementation model

Simplify architecturefeature oriented structure

Deliver softwarerainbow plans

• Describing architecture• Simplifying architecture• Delivering architecture

• Delivering software

• Delivering architecture

Part I:

Describing architecture

Understanding the problem

(Tool time)

For some stakeholder

Who has a goal

The Colombo Agile Meetup

Is a type of activity

Which gives a capability.

Unlike most relevant alternative

This has a distinguishing attribute.

For anyone interested in agile methods

Who ________________

The Colombo Agile Meetup

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

Description• Experienced• New speaker• Passionate

Duties• Register talk• Upload slide• Give talkValues• Constructive feedback

on talk• Easy CfP• Fast answer

Attendee

Description• Knows about agile• Works in project• Norwegian

Duties• Pay for conference• Get approval to go

Values• Easy registration

Organizer

Description• Volunteer• Works in evenings• Has network

Duties• Select talks• Follow up

paymentsValues• 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. Agile project practitioner wants to learn

2. Attendee goes to Smidig website

3. Attendee registers

4. Attendee pays

5. Attendee receives confirmation mail

6. Organizer can see the registration

7. Organizer sends reminder email to attendee to come

8. Organizer prints badges for attendees

9. Attendee shows up at Smidig and has an excellent time

Speaker

1. Agile experts wants to share knowledge

2. Potential speaker goes to Smidig website

3. Potential speaker registers personal info

4. Potential speaker registers talk

5. Potential speaker receives registration confirmation email

6. Organizer sees registered talk and can market speaking opportunities

7. Organizer accepts talk for confence

8. Speaker receives acceptance email– Alternative: Speaker withdraws talk – organizer updates the talk

and selects another

9. Organizer prints badges for speakers

10. Speaker shows up at Smidig and gives talk

/Understanding the problem

Uncovering a solution

Example context model

Smidig2011.no

Participant Speaker

Organizer

Printing company

Paypal

Example domain model

User• Name• Email• Company• Phone• Password• Accepts email?

Registration• 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

Speaker*

*

Comment• Title• Text• Created date

*

*

Period• Stage• Title• Time of day• Day

Example implementation

diagram

Browser Smidig2012.no Paypal.com

1. POST /users

2. Redirect to paypalwith return_url and notify_url

3. Perform payment

4. POST /payment_notifications

5. Redirect to return_url

5. GET /user/<id>

Update user info

Show user info

Save user info

Example deployment model

Heroku

Smtp.dreamhost.com

Paypal

PostgreSQL

Smidig-conference

(Rails)

Web user

Developer

smidigdb

git.herokugithub

git pushgit pushgit pull

html/http

http

smtp

/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

Person-Controller

Person-Controller-

Impl

Person-Service

Person-ServiceImpl

Person-Repository

Person-Repository

Impl

PersonDao

PersonDaoImpl

Session-Factory

Controllers

Services

Managers

Workers

Repositories

Controllers

Services

Managers

Workers

Repositories

DTO

Domain

Mapping

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

Services

Managers

Workers

Repositories

DTO

Domain

Mapping

Your solution is constrained by

deployment

Web Application

Web user

Database

Browser

JSON/http

Web Service

SOAP

Web ServiceService

Consumer

DTO?

DTO

DTO

Controller

Web Application

Web user

Database

Browser

JSON/http

DTO?Controller

DAO

Web Application

Web user

html/http

Database

Controller

DAO

Web Application

Web user

html/http

Database

Reverse proxy

html/http

Controller

DAO

Web Application

Web user

Database

Rich client

Objects over http

DTO

DTOController

Web Application

Web user

Database

Rich client

Web service

DTO

DTO

Service

Consumer

Controller

Web Application

Web user

Database

Browser

JSON/http

Web Service

SOAP

Service

Consumer

DTO?

DTO

DTO

External client

Controller

DAO

Web Application

Web user

Database

Browser

JSON/http

Service

External client

DTOController

DAO

/Simplifying architecture

Part III:

Delivering software

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. Something happens in the real world

2. The event is communicated to the system

3. The system does something

4. Someone does something with the system

5. …

6. …

7. …

8. …

9. …

10. Some goal is achieved

Rainbow plan

Usage flow: frugalflights.com1. A customer wants cheap vacations

2. The customer signs up for daily or weekly notifications of special flight offers

3. Periodically the System checks which customers should get notifications

4. The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system

5. The System notifies customer of any matching offers via SMS• Variation: The System notifies customer of any matching offers via email

6. The customer accepts the offer via SMS1. Variation: The customer accepts the offer on the system website

7. The System books the tickets on behalf of the customer

8. 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.com1. A customer wants cheap vacations

2. The customer signs up for daily or weekly notifications of special flight offers

3. Periodically the System checks which customers should get notifications

4. The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system

5. The System notifies customer of any matching offers via SMS• Variation: The System notifies customer of any matching offers via email

6. The customer accepts the offer via SMS1. Variation: The customer accepts the offer on the system website

7. The System books the tickets on behalf of the customer

8. 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 skeleton1. A customer wants cheap vacations

2. The customer signs up for daily or weekly notifications of special flight offers

3. Periodically the System checks which customers should get notifications

4. The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system

5. The System notifies customer of any matching offers via SMS• Variation: The System notifies customer of any matching offers via email

6. The customer accepts the offer via SMS1. Variation: The customer accepts the offer on the system website

7. The System books the tickets on behalf of the customer

8. 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 support1. A customer wants cheap vacations

2. The customer signs up for daily or weekly notifications of special flight offers

3. Periodically the System checks which customers should get notifications

4. The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system

5. The System notifies customer of any matching offers via SMS• Variation: The System notifies customer of any matching offers via email

6. The customer accepts the offer via SMS1. Variation: The customer accepts the offer on the system website

7. The System books the tickets on behalf of the customer

8. 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 workflow1. A customer wants cheap vacations

2. The customer signs up for daily or weekly notifications of special flight offers

3. Periodically the System checks which customers should get notifications

4. The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system

5. The System notifies customer of any matching offers via SMS• Variation: The System notifies customer of any matching offers via email

6. The customer accepts the offer via SMS1. Variation: The customer accepts the offer on the system website

7. The System books the tickets on behalf of the customer

8. 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 SMS1. A customer wants cheap vacations

2. The customer signs up for daily or weekly notifications of special flight offers

3. Periodically the System checks which customers should get notifications

4. The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system

5. The System notifies customer of any matching offers via SMS• Variation: The System notifies customer of any matching offers via email

6. The customer accepts the offer via SMS1. Variation: The customer accepts the offer on the system website

7. The System books the tickets on behalf of the customer

8. 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 pages1. A customer wants cheap vacations

2. The customer signs up for daily or weekly notifications of special flight offers

3. Periodically the System checks which customers should get notifications

4. The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system

5. The System notifies customer of any matching offers via SMS• Variation: The System notifies customer of any matching offers via email

6. The customer accepts the offer via SMS1. Variation: The customer accepts the offer on the system website

7. The System books the tickets on behalf of the customer

8. 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: Integration1. A customer wants cheap vacations

2. The customer signs up for daily or weekly notifications of special flight offers

3. Periodically the System checks which customers should get notifications

4. The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system

5. The System notifies customer of any matching offers via SMS• Variation: The System notifies customer of any matching offers via email

6. The customer accepts the offer via SMS1. Variation: The customer accepts the offer on the system website

7. The System books the tickets on behalf of the customer

8. 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-polish1. A customer wants cheap vacations

2. The customer signs up for daily or weekly notifications of special flight offers

3. Periodically the System checks which customers should get notifications

4. The System checks for offers that matches the customer’s travel preference by looking up flights with the travel provider system

5. The System notifies customer of any matching offers via SMS• Variation: The System notifies customer of any matching offers via email

6. The customer accepts the offer via SMS1. Variation: The customer accepts the offer on the system website

7. The System books the tickets on behalf of the customer

8. 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 youjbr@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

Recommended