SlideShare ist ein Scribd-Unternehmen logo
1 von 107
Agile Architecture
                         XP Days 2012
      Johannes Brodwall, Chief scientist
                      Exilesoft Global
What is an architect?
  From greek Arkhi-Tecton
          Tecton: Builder
             Arkhi: Chief.
        Like “Arch angel”
         Or “Arch villain”
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
• Describing architecture
• Simplifying architecture
  • Delivering architecture
    • Delivering software
Part I:
Describing
architecture
• Understanding problem
       • Uncovering solution
•   Communicating architecture
Understanding the
         problem
(Tool time)
For some stakeholder
            Who has a responsibility
The Bare-bones architecture workshop
                  Is a type of activity
            Which gives a capability.

      Unlike most relevant alternative
    This has a distinguishing attribute.
For __________________
       Who ________________
       The _________________
       Is a _________________
     Which ________________.

Unlike ______________________
This _______________________.
Participant?               ???            ???
Who are they?       Description    Description




What do they do?    Duties         Duties




Why do they care?   Values         Values
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           Description            Description
• Experienced         • Knows about agile    • Volunteer
• New speaker         • Works in project     • Works in evenings
• Passionate          • Norwegian            • Has network

Duties                Duties                 Duties
• Register talk       • Pay for conference   • Select talks
• Upload slide        • Get approval to go   • Follow up
• Give talk                                    payments
Values                                       Values
                      Values                 •   Easy selection process
• Constructive
                      • Easy registration    •   Good information
   feedback on talk                              overview
• Easy CfP                                   •   Never lose a participant
• Fast answer                                •   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 using Paypal
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 with Print
     Company
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
Participant       Speaker


                                       Organizer




Paypal                 Smidig2011.no
                                                    Printing
                                                   company
Example domain
         model
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
Example
deployment model
Web user




     Developer                 html/http

git push         git push
git pull
                                Smidig-
                              conference    http
                                                         Paypal
 github          git.heroku     (Rails)
                                            smtp
                               Heroku
                                                   Smtp.dreamhost.com




                               smidigdb
                              PostgreSQL
Example
implementation
      diagram
1. Find controller
     Router

       2. Dispatch action

                                  3. Find model
           Controller                       Model class

                                 4. Manipulate model      Database
                                              Model
                                 5.? Save model
6. Render model with
view template


View template             View template
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. UPDATE
8. Redirect /users/<id>                                      users SET …
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
                                                   User
5. Render


 /app/views/users
                               6. Get attributes
show.html.erb
Alternative
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
/Uncovering a
     solution
Communicating a
       solution
Vision
  Stakeholders
    Usage flow
       Context
 Domain model
   Deployment
Implementation
Does the architect
  have to do this
          herself?
Team effort
/Communicating a
        solution
/Describing
architecture
Part II:
Finding the
requirements
I need a volunteer
For some stakeholder
         Who has a responsibilty
               The system name
              Is a type of system
         Which gives a capability.

  Unlike most relevant alternative
This has a distinguishing attribute.
Participant?               ???            ???
Who are they?       Description    Description




What do they do?    Duties         Duties




What do they care   Values         Values
about?
….
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
/Finding
requirements
Part III:
Describe
architecture
Frugalflights.com
1.       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 SMS
     1.     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!
User                  User
Who are they          Who are they
• …                   • …
What do they do?      What do they do?
• …                   • …
What do they value?   What do they value?
• …                   • …


User                  User
Who are they          Who are they
• …                   • …
What do they do?      What do they do?
• …                   • …
What do they value?   What do they value?
• …                   • …
Example context
         model
What actors did you
mention in scenario?
Context: Frugalflights.com
1.       A customer wants cheap vacations
2.       The customer signs up for daily or weekly notifications of special
         flight offers (where?)
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 SMS
     1.     Variation: The customer accepts the offer on the system website
7.  The System books the tickets on behalf of the customer (where?)
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!
Domain: Frugalflights.com
1.       A customer wants cheap vacations
2.       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
         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
         (=> “sends notification”?)
     •      Variation: The System notifies customer of any matching offers via
            email
6.       The customer accepts the offer via SMS (=> “send acceptance”)
     1.     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 (=> “sends confirmation”?)
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!
Example domain
         model
What concepts did
  you mention in
       scenario?
Example
deployment model
Which servers are
      involved in
     production?
Example
implementation
      diagram
How does the code
           work?
Statnett electricity reserves
1.           Grid operator want to maintain balance of electric production and consumption
2.           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 production
3.           A spike occurs in the consumption or production
4.           Grid operator sees list of available reserves per power plant
      1.         Alternative: Operator filters the list by grid market area
5.           Grid operator selects a reserve to regulate for spike
6.           Grid operator enters power usage on the regulation
      1.         Alternative: The system verifies that regulation is valid
7.           Grid operator communicates the regulation to producer’s operation center using phone
      1.         Future: The system sends the regulation to the producer as XML/http
8.           Balance is restored
9.           At end of hour, system sends usage to pricing system (NOIS) (XML/http) via Sterling
             Integrator
10.          Some time later, pricing system sends price for usage via SI
11.          System sends price capacity usage to accounting system via SI
12.          Accounting system pays producer for usage
/Describe
architecture
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/jhannes


                        • Vision
                  • Stakeholders
                   • Usage flows
• Lasagna architecture
•   Feature oriented architecture
     • Deployment constraints
Lasagna
architecture
Person-       Person-       Person-
                                         PersonDao
Controller     Service      Repository




 Person-                     Person-
               Person-                   PersonDao
Controller-                 Repository
              ServiceImpl                   Impl
  Impl                        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

Controller DTO?
 Web Application
Consumer   DTO
                   SOAP

Service   DTO
  Web Service


      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




     Browser

             JSON/http



         DTO?
Controller
Web Application
  DAO




      Database
Web user

Controller
    Rich client
Consumer     DTO
             Web
             service

Service   DTO
Web Application




      Database
Web user

Controller
    Rich client
             DTO
             Objects
             over http

                   DTO
Web Application




      Database
Web user




External client         Browser
                                      JSON/http

                  Controller DTO?
                   Web Application
                  Consumer   DTO
                                      SOAP

                  Service   DTO
                    Web Service
                        DAO


                         Database
Web user




External client           Browser

                                 JSON/http



                  Service        Controller
                           DTO
                       Web Application
                           DAO


                           Database

Weitere ähnliche Inhalte

Ähnlich wie Bare-Bones Software Architecture

Domain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic PatternsDomain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic PatternsMark Windholtz
 
Behavior Driven Development - TdT@Cluj #15
Behavior Driven Development - TdT@Cluj #15Behavior Driven Development - TdT@Cluj #15
Behavior Driven Development - TdT@Cluj #15Tabăra de Testare
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET Dmytro Mindra
 
Android application development
Android application developmentAndroid application development
Android application developmentLinh Vi Tường
 
2019-Nov: Domain Driven Design (DDD) and when not to use it
2019-Nov: Domain Driven Design (DDD) and when not to use it2019-Nov: Domain Driven Design (DDD) and when not to use it
2019-Nov: Domain Driven Design (DDD) and when not to use itMark Windholtz
 
Introduction to Bdd and cucumber
Introduction to Bdd and cucumberIntroduction to Bdd and cucumber
Introduction to Bdd and cucumberNibu Baby
 
An Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHPAn Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHPChris Renner
 
Extreme Programming (XP): Revisted
Extreme Programming (XP): RevistedExtreme Programming (XP): Revisted
Extreme Programming (XP): RevistedMike Harris
 
Is it possible to write cross-native apps in 2020 ?
Is it possible to write cross-native apps in 2020 ?Is it possible to write cross-native apps in 2020 ?
Is it possible to write cross-native apps in 2020 ?Chris Saez
 
Domain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVCDomain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVCSteven Smith
 
DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014
DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014
DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014FalafelSoftware
 
Introduction to GoLang
Introduction to GoLangIntroduction to GoLang
Introduction to GoLangNVISIA
 
Django è pronto per l'Enterprise
Django è pronto per l'EnterpriseDjango è pronto per l'Enterprise
Django è pronto per l'EnterprisePyCon Italia
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia eventXebia India
 
Portal and Intranets
Portal and Intranets Portal and Intranets
Portal and Intranets Redar Ismail
 
Drupal as a Programmer-Friendly CMS at ConFoo
Drupal as a Programmer-Friendly CMS at ConFooDrupal as a Programmer-Friendly CMS at ConFoo
Drupal as a Programmer-Friendly CMS at ConFooSuzanne Dergacheva
 
Drupal By Design - Business Case for Drupal
Drupal By Design - Business Case for DrupalDrupal By Design - Business Case for Drupal
Drupal By Design - Business Case for DrupalGlenn Lim
 
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...Heiko Voigt
 

Ähnlich wie Bare-Bones Software Architecture (20)

Domain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic PatternsDomain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic Patterns
 
Behavior Driven Development - TdT@Cluj #15
Behavior Driven Development - TdT@Cluj #15Behavior Driven Development - TdT@Cluj #15
Behavior Driven Development - TdT@Cluj #15
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET
 
Android application development
Android application developmentAndroid application development
Android application development
 
2019-Nov: Domain Driven Design (DDD) and when not to use it
2019-Nov: Domain Driven Design (DDD) and when not to use it2019-Nov: Domain Driven Design (DDD) and when not to use it
2019-Nov: Domain Driven Design (DDD) and when not to use it
 
Introduction to Bdd and cucumber
Introduction to Bdd and cucumberIntroduction to Bdd and cucumber
Introduction to Bdd and cucumber
 
DITA Interoperability
DITA InteroperabilityDITA Interoperability
DITA Interoperability
 
An Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHPAn Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHP
 
Extreme Programming (XP): Revisted
Extreme Programming (XP): RevistedExtreme Programming (XP): Revisted
Extreme Programming (XP): Revisted
 
Is it possible to write cross-native apps in 2020 ?
Is it possible to write cross-native apps in 2020 ?Is it possible to write cross-native apps in 2020 ?
Is it possible to write cross-native apps in 2020 ?
 
Domain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVCDomain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVC
 
DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014
DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014
DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014
 
Introduction to GoLang
Introduction to GoLangIntroduction to GoLang
Introduction to GoLang
 
Django è pronto per l'Enterprise
Django è pronto per l'EnterpriseDjango è pronto per l'Enterprise
Django è pronto per l'Enterprise
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
 
Portal and Intranets
Portal and Intranets Portal and Intranets
Portal and Intranets
 
Drupal as a Programmer-Friendly CMS at ConFoo
Drupal as a Programmer-Friendly CMS at ConFooDrupal as a Programmer-Friendly CMS at ConFoo
Drupal as a Programmer-Friendly CMS at ConFoo
 
Drupal By Design - Business Case for Drupal
Drupal By Design - Business Case for DrupalDrupal By Design - Business Case for Drupal
Drupal By Design - Business Case for Drupal
 
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
 
SDWest2005Goetsch
SDWest2005GoetschSDWest2005Goetsch
SDWest2005Goetsch
 

Mehr von Johannes Brodwall

Build Your Stuff with Privacy by Design
Build Your Stuff with Privacy by DesignBuild Your Stuff with Privacy by Design
Build Your Stuff with Privacy by DesignJohannes Brodwall
 
Remote Pair Programming (Agile India)
Remote Pair Programming (Agile India)Remote Pair Programming (Agile India)
Remote Pair Programming (Agile India)Johannes Brodwall
 
Getting your project off the ground (BuildStuffLt)
Getting your project off the ground (BuildStuffLt)Getting your project off the ground (BuildStuffLt)
Getting your project off the ground (BuildStuffLt)Johannes Brodwall
 
Remote pair programming (BuildStuffLt)
Remote pair programming (BuildStuffLt)Remote pair programming (BuildStuffLt)
Remote pair programming (BuildStuffLt)Johannes Brodwall
 
DevDay.lk - Bare Knuckle Web Development
DevDay.lk - Bare Knuckle Web DevelopmentDevDay.lk - Bare Knuckle Web Development
DevDay.lk - Bare Knuckle Web DevelopmentJohannes Brodwall
 
Extreme Programming Live - JavaZone
Extreme Programming Live - JavaZoneExtreme Programming Live - JavaZone
Extreme Programming Live - JavaZoneJohannes Brodwall
 
2013 09-11 java zone - extreme programming live
2013 09-11 java zone - extreme programming live2013 09-11 java zone - extreme programming live
2013 09-11 java zone - extreme programming liveJohannes Brodwall
 
2013 08-07 agile 2013 - remote pair programming
2013 08-07 agile 2013 - remote pair programming2013 08-07 agile 2013 - remote pair programming
2013 08-07 agile 2013 - remote pair programmingJohannes Brodwall
 
WeActuallyBuildStuff - Extreme Programming Live
WeActuallyBuildStuff - Extreme Programming LiveWeActuallyBuildStuff - Extreme Programming Live
WeActuallyBuildStuff - Extreme Programming LiveJohannes Brodwall
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web developmentJohannes Brodwall
 
Agile Programming Live - AgilePrague2012
Agile Programming Live - AgilePrague2012Agile Programming Live - AgilePrague2012
Agile Programming Live - AgilePrague2012Johannes Brodwall
 
Agile Contracts - AgilePrague2012
Agile Contracts - AgilePrague2012Agile Contracts - AgilePrague2012
Agile Contracts - AgilePrague2012Johannes Brodwall
 
Experience Agile Programming
Experience Agile ProgrammingExperience Agile Programming
Experience Agile ProgrammingJohannes Brodwall
 
Experience Agile Programming - Kiev
Experience Agile Programming - KievExperience Agile Programming - Kiev
Experience Agile Programming - KievJohannes Brodwall
 

Mehr von Johannes Brodwall (20)

Build Your Stuff with Privacy by Design
Build Your Stuff with Privacy by DesignBuild Your Stuff with Privacy by Design
Build Your Stuff with Privacy by Design
 
The new new mobile web
The new new mobile webThe new new mobile web
The new new mobile web
 
Remote Pair Programming (Agile India)
Remote Pair Programming (Agile India)Remote Pair Programming (Agile India)
Remote Pair Programming (Agile India)
 
Getting your project off the ground (BuildStuffLt)
Getting your project off the ground (BuildStuffLt)Getting your project off the ground (BuildStuffLt)
Getting your project off the ground (BuildStuffLt)
 
Remote pair programming (BuildStuffLt)
Remote pair programming (BuildStuffLt)Remote pair programming (BuildStuffLt)
Remote pair programming (BuildStuffLt)
 
DevDay.lk - Bare Knuckle Web Development
DevDay.lk - Bare Knuckle Web DevelopmentDevDay.lk - Bare Knuckle Web Development
DevDay.lk - Bare Knuckle Web Development
 
Extreme Programming Live - JavaZone
Extreme Programming Live - JavaZoneExtreme Programming Live - JavaZone
Extreme Programming Live - JavaZone
 
2013 09-11 java zone - extreme programming live
2013 09-11 java zone - extreme programming live2013 09-11 java zone - extreme programming live
2013 09-11 java zone - extreme programming live
 
2013 08-07 agile 2013 - remote pair programming
2013 08-07 agile 2013 - remote pair programming2013 08-07 agile 2013 - remote pair programming
2013 08-07 agile 2013 - remote pair programming
 
WeActuallyBuildStuff - Extreme Programming Live
WeActuallyBuildStuff - Extreme Programming LiveWeActuallyBuildStuff - Extreme Programming Live
WeActuallyBuildStuff - Extreme Programming Live
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web development
 
Agile Prague Coding Dojo
Agile Prague Coding DojoAgile Prague Coding Dojo
Agile Prague Coding Dojo
 
Agile Programming Live - AgilePrague2012
Agile Programming Live - AgilePrague2012Agile Programming Live - AgilePrague2012
Agile Programming Live - AgilePrague2012
 
Agile Contracts - AgilePrague2012
Agile Contracts - AgilePrague2012Agile Contracts - AgilePrague2012
Agile Contracts - AgilePrague2012
 
Smidig Stykkpriskontrakt
Smidig StykkpriskontraktSmidig Stykkpriskontrakt
Smidig Stykkpriskontrakt
 
Experience Agile Programming
Experience Agile ProgrammingExperience Agile Programming
Experience Agile Programming
 
Agile Contracts
Agile ContractsAgile Contracts
Agile Contracts
 
Smidig ansvarsprosjekt
Smidig ansvarsprosjektSmidig ansvarsprosjekt
Smidig ansvarsprosjekt
 
Kiev Coding Dojo
Kiev Coding DojoKiev Coding Dojo
Kiev Coding Dojo
 
Experience Agile Programming - Kiev
Experience Agile Programming - KievExperience Agile Programming - Kiev
Experience Agile Programming - Kiev
 

Bare-Bones Software Architecture

  • 1. Agile Architecture XP Days 2012 Johannes Brodwall, Chief scientist Exilesoft Global
  • 2. What is an architect? From greek Arkhi-Tecton Tecton: Builder Arkhi: Chief. Like “Arch angel” Or “Arch villain”
  • 3. What is an architect? “Chief builder”
  • 4. What is an architect? (Exilesoft definition)
  • 5. A solution architect is someone who understands the problem of the customer and uncovers and communicates a feasible solution
  • 6. 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)
  • 7. Uncover problem vision, stakeholders, usage flow Describe problem context and domain model Describe solution deployment, implementation model
  • 8. • Describing architecture • Simplifying architecture • Delivering architecture • Delivering software
  • 11. • Understanding problem • Uncovering solution • Communicating architecture
  • 12. Understanding the problem
  • 14. For some stakeholder Who has a responsibility The Bare-bones architecture workshop Is a type of activity Which gives a capability. Unlike most relevant alternative This has a distinguishing attribute.
  • 15. For __________________ Who ________________ The _________________ Is a _________________ Which ________________. Unlike ______________________ This _______________________.
  • 16. Participant? ??? ??? Who are they? Description Description What do they do? Duties Duties Why do they care? Values Values
  • 18.
  • 19. Example vision statement
  • 20. 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.
  • 21. 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.
  • 22.
  • 24. Speaker Attendee Organizer Description Description Description • Experienced • Knows about agile • Volunteer • New speaker • Works in project • Works in evenings • Passionate • Norwegian • Has network Duties Duties Duties • Register talk • Pay for conference • Select talks • Upload slide • Get approval to go • Follow up • Give talk payments Values Values Values • Easy selection process • Constructive • Easy registration • Good information feedback on talk overview • Easy CfP • Never lose a participant • Fast answer • Financial transparency
  • 25. Sponsor Description • Busy • Manager • Not very interested Duties • Provide logo • Pay sponsorship Values • Informal communication • Easy evaluation
  • 27. Attendance 1. Agile project practitioner wants to learn 2. Attendee goes to Smidig website 3. Attendee registers 4. Attendee pays using Paypal 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 with Print Company 9. Attendee shows up at Smidig and has an excellent time
  • 28.
  • 29. 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
  • 31. Uncovering a solution
  • 33. Participant Speaker Organizer Paypal Smidig2011.no Printing company
  • 34. Example domain model
  • 35. 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
  • 37. Web user Developer html/http git push git push git pull Smidig- conference http Paypal github git.heroku (Rails) smtp Heroku Smtp.dreamhost.com smidigdb PostgreSQL
  • 39. 1. Find controller Router 2. Dispatch action 3. Find model Controller Model class 4. Manipulate model Database Model 5.? Save model 6. Render model with view template View template View template
  • 40. 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. UPDATE 8. Redirect /users/<id> users SET …
  • 41. 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 User 5. Render /app/views/users 6. Get attributes show.html.erb
  • 43. 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
  • 44. /Uncovering a solution
  • 45. Communicating a solution
  • 46.
  • 47. Vision Stakeholders Usage flow Context Domain model Deployment Implementation
  • 48. Does the architect have to do this herself?
  • 50.
  • 51. /Communicating a solution
  • 55. I need a volunteer
  • 56. For some stakeholder Who has a responsibilty The system name Is a type of system Which gives a capability. Unlike most relevant alternative This has a distinguishing attribute.
  • 57. Participant? ??? ??? Who are they? Description Description What do they do? Duties Duties What do they care Values Values about?
  • 58. …. 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
  • 62. Frugalflights.com 1. 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 SMS 1. 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!
  • 63. User User Who are they Who are they • … • … What do they do? What do they do? • … • … What do they value? What do they value? • … • … User User Who are they Who are they • … • … What do they do? What do they do? • … • … What do they value? What do they value? • … • …
  • 65. What actors did you mention in scenario?
  • 66. Context: Frugalflights.com 1. A customer wants cheap vacations 2. The customer signs up for daily or weekly notifications of special flight offers (where?) 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 SMS 1. Variation: The customer accepts the offer on the system website 7. The System books the tickets on behalf of the customer (where?) 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!
  • 67. Domain: Frugalflights.com 1. A customer wants cheap vacations 2. 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 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 (=> “sends notification”?) • Variation: The System notifies customer of any matching offers via email 6. The customer accepts the offer via SMS (=> “send acceptance”) 1. 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 (=> “sends confirmation”?) 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!
  • 68. Example domain model
  • 69. What concepts did you mention in scenario?
  • 71. Which servers are involved in production?
  • 73. How does the code work?
  • 74. Statnett electricity reserves 1. Grid operator want to maintain balance of electric production and consumption 2. 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 production 3. A spike occurs in the consumption or production 4. Grid operator sees list of available reserves per power plant 1. Alternative: Operator filters the list by grid market area 5. Grid operator selects a reserve to regulate for spike 6. Grid operator enters power usage on the regulation 1. Alternative: The system verifies that regulation is valid 7. Grid operator communicates the regulation to producer’s operation center using phone 1. Future: The system sends the regulation to the producer as XML/http 8. Balance is restored 9. At end of hour, system sends usage to pricing system (NOIS) (XML/http) via Sterling Integrator 10. Some time later, pricing system sends price for usage via SI 11. System sends price capacity usage to accounting system via SI 12. Accounting system pays producer for usage
  • 76. What surprised you? What did you learn? Your plan to change how you work?
  • 78. Tomorrow: Make your system shine!
  • 79. Thank you jbr@exilesoft.com http://johannesbrodwall.com http://exilesoft.com http://twitter.com/jhannes • Vision • Stakeholders • Usage flows
  • 80. • Lasagna architecture • Feature oriented architecture • Deployment constraints
  • 82. Person- Person- Person- PersonDao Controller Service Repository Person- Person- Person- PersonDao Controller- Repository ServiceImpl Impl Impl Impl Session- Factory
  • 83. Controllers Services Managers Workers Repositories
  • 84. Controllers DTO Services Mapping Domain Managers Workers Repositories
  • 85.
  • 87. Tidying up art (Ursus Wehrli)
  • 88.
  • 89. Feature oriented architecture
  • 90.
  • 91. Coherence • What changes together lives together
  • 92.
  • 93. Tolerance • What should be different can be different
  • 94.
  • 95. Meaning • What is central in domain is central in code
  • 96.
  • 97. Your thinking is contrained by technology fashion:
  • 98. Controllers DTO Services Mapping Domain Managers Workers Repositories
  • 99. Your solution is constrained by deployment
  • 100. Web user Browser JSON/http Controller DTO? Web Application Consumer DTO SOAP Service DTO Web Service Database
  • 101. Web user html/http Controller Web Application DAO Database
  • 102. Web user html/http Reverse proxy html/http Controller Web Application DAO Database
  • 103. Web user Browser JSON/http DTO? Controller Web Application DAO Database
  • 104. Web user Controller Rich client Consumer DTO Web service Service DTO Web Application Database
  • 105. Web user Controller Rich client DTO Objects over http DTO Web Application Database
  • 106. Web user External client Browser JSON/http Controller DTO? Web Application Consumer DTO SOAP Service DTO Web Service DAO Database
  • 107. Web user External client Browser JSON/http Service Controller DTO Web Application DAO Database