SlideShare uma empresa Scribd logo
1 de 21
© Martin Fowler, 1998




               Martin Fowler

                        fowler@acm.org
http://ourworld.compuserve.com/homepages/Martin_Fowler



Page 1                                            © Martin Fowler 8/13/98




                What We Will Cover (1)
q Background to UML
q Outline process
q Grand Tour of Techniques
         â   Use Cases
         â   Class Diagrams
         â   CRC Cards
         â   Both kinds of Interaction Diagrams
         â   Package Diagrams
         â   State Diagrams
         â   Activity Diagrams
         â   Design by Contract




   http://ourworld.compuserve.com/homepages/Martin_Fowler
Page 2                                            © Martin Fowler 8/13/98




                                                                            1
OO Methods


                                      Coad
                                       Coad
                                               Wirfs-Brock / /
                                                Wirfs-Brock
  Late 80’s                                        RDD
                                                    RDD
  early 90’s          Odell / /OOIE                                      Shlaer / /
                       Odell OOIE                                         Shlaer
                                                                          Mellor
                                                                           Mellor

                               Rumbaugh / /      Jacobson / /
                                                  Jacobson
                   Booch        Rumbaugh
                    Booch         OMT             Objectory
                                                   Objectory
                                   OMT




Page 3                                                           © Martin Fowler 8/13/98




                   Evolution of the UML

1988-92        Many analysis and design books
1993           Standardization not a priority
1994           Jim Rumbaugh joins Rational (Grady
               Booch)
1995           Booch/Rumbaugh unified method
               released, Rational buys Objectory (Ivar
               Jacobson), OMG task force launched
               (chairs Mary Loomis and Jim Odell)
Jan 97         UML 1.0 submitted to OMG as proposal
Mid 97         OMG proposals unified behind UML 1.1
Late 97        OMG adopts UML 1.1 as OMG UML 1.0
Spr 98         OMG to issue UML 1.2 (minor changes)


Page 4                                                           © Martin Fowler 8/13/98




                                                                                           2
Unified Modeling Language
                             (UML)
q Developed by the three amigos: Booch,
  Jacobson and Rumbaugh at Rational
         â Many contributions through OMG process
q Notation and semantics, not process
q Organizations preparing processes
         â Rational: Objectory (Unified Process)
         â HP: Fusion




Fowler M with Scott K, UML Distilled:
Applying the Standard Object Modeling
Language, Addison-Wesley, 1997

 www.rational.com/uml

Page 5                                             © Martin Fowler 8/13/98




                                        UML Books

q Three amigos books
         â User Guide, Reference, and Unified Process
         â End 98
q Fowler: UML Distilled, Addison-Wesley
         â Concise guide, assumes you know OO design
q Larman: Applying UML and Patterns, Prentice
  Hall
         â Intro to Objects using UML
q Martin and Odell, OO Methods a Foundation,
  Prentice Hall
         â Conceptual Modeling
q Douglass, Real-Time UML, Addison-Wesley
         â Real Time

Page 6                                             © Martin Fowler 8/13/98




                                                                             3
Use-cases


q A use case is a typical interaction with the
  system
         â Recognizable value to the user - meets a goal
         â Testable




         What would be some use cases for a Word
                       Processor?




                 http://members.aol.com/acockburn

Page 7                                                    © Martin Fowler 8/13/98




              Incremental Development
                                Development
Exploration
                    1   2     ...




                            Finishing         Finishing



                     Goal: Reduce Risk




 Cockburn A. Surviving Your Object-
 Oriented Project, Addison-Wesley, 1998
 McConnell S. Rapid Development,
 Microsoft Press 1996

Page 8                                                    © Martin Fowler 8/13/98




                                                                                    4
Development

q Break into increments
          â Build a few use-cases
          â Analysis, design, implementation, testing, and
            integration
          â Demo to user and verify functional tests for those
            use-cases
          â Step length 2 weeks to 2 months
q Do high risk and high priority use-cases first
q Time box the steps
          â Cannot slip dates, may put off use-cases



 Goal: Have clear milestones to measure progress
                 Goal: Tackle high risks early
Page 9                                               © Martin Fowler 8/13/98




                                         Exploration
 q Gather use-cases
          â One or two paragraphs
 q Outline conceptual model
          â Find key abstractions in conceptual problem
 q Baseline technical architecture
          â Try out key pieces of technology and how they fit
            together
          â Determine key packages and interfaces
 q About 1/5 of project length




  Goal: Gain understanding to reduce risks in later
                   development

Page 10                                              © Martin Fowler 8/13/98




                                                                               5
Dividing Use Cases
q Capture basic order information
          â Customer, date received
          â Line items: quantity and product
q Price order
          â Rules vary with products, different price thresholds
            and options.
          â May be combination rules
q Discount plans
          â Customers may be members of various discount
            plans.
          â Plans apply various discounts to orders
          â A particularly involved discount plan is the “bonnie
            prince” plan


                   How many use cases here?

Page 11                                                     © Martin Fowler 8/13/98




              Granularity of Use Cases

                                                   Take Order




                                                   Price Order




           Take Order
                                               Customer Discounts




                                                 Bonnie Prince
                                                 Discount Plan




                                               Combination Pricing
                                                     Rules




Page 12                                                     © Martin Fowler 8/13/98




                                                                                      6
The «extends» Notion
                                           Take Order

                        «extends»                          «extends»




                         Price Order                    Customer Discounts




                                                                  «extends»
                  «extends»



                     Combination Pricing                  Bonnie Prince
                          Rules                           Discount Plan




q Simple case and variations



Page 13                                                                          © Martin Fowler 8/13/98




                                            Use-case Diagram
                                                                                       Use Case
          Actor
                                                              Set Limits
                                                                             «uses»

                     Trading Manager
                                                              Analyze Risk
                                                                               «uses» Valuation



                                        Trader               Price Deal



                                                  «extends» Capture Deal
                                                                                         Salesman
                                    Limits Exceeded


q Shows use cases and links between them
          â Actors
          â Uses and extends
q Can be useful but not essential
Page 14                                                                          © Martin Fowler 8/13/98




                                                                                                           7
Cockburn’s Style

q Base on the goal of a user
q Consider main course scenario
          â Everything goes well and goal succeeds
          â Capture as sequence of steps
q Take each step in the use case
          â Ask what can go wrong
          â Can we recover, if so how
          â Each step may be another use case with its own
            goal
q Capture variations in main course
q Note priority, time to be done in, and frequency


                   http://members.aol.com/acockburn

Page 15                                               © Martin Fowler 8/13/98




                                            Abuse Cases

q Decomposition
          â Temptation to drive design
          â Takes time (for little value)
q Abstraction
          â Loses users
          â Less value in testing
q GUI prototypes
          â False sign of progress
          â Encourages scope growth
q Denying choice
          â System v user use cases



                  Have you seen these traps?

Page 16                                               © Martin Fowler 8/13/98




                                                                                8
Class Diagrams

     Order                 Association                  Customer
  Date received
                    ]                             1     Name
  isPrepaid                                             Address
  Number                                                Credit Rating
  Price              Constraint
                                  Generalization
  Dispatch
  Close
                    {Orders for a customer with poor
    1               credit rating must be prepaid}


                                               Corporate           Personal
                                               Customer            Customer
          ]                                    Contact Name        Credit card #
                          Attributes           Credit Rating
  Order Line
                                               Credit Limit
  product                                      Remind
  quantity
  price                                Class


                                                      Operations


Page 17                                                            © Martin Fowler 8/13/98




                      Modeling Perspectives


          q Conceptual
                  â Describes people’s perception of the world
                  â Independent of software
          q Specification
                  â Interfaces of classes (types)
          q Implementation
                  â Internal features of a class




    Cook, S. and Daniels, J. Designing Object Systems: object-
    oriented modeling with Syntropy, Prentice Hall
    International, Hemel Hempstead, UK, 1994.

Page 18                                                            © Martin Fowler 8/13/98




                                                                                             9
Association
An employee must have a single department


                 1       [                     [
  Department                    Employee                        Skill
                                                    [


                       notation
                       for cardinalities



 q Defines connections between instances
          â Conceptual: employees must have a single
            department
          â Specification: you can ask an employee object for
            its department (and change it)
          â Implementation: employee has a pointer to a
            department
 q Uni-directional and bi-directional
Page 19                                                 © Martin Fowler 8/13/98




                                           Generalization
A nurse is a kind of a person
                                   Person




                             Doctor         Nurse


q Conceptual: all nurses are people
q Specification: (subtyping) nurse satisfies the
  interface of person (substitutable)
q Implementation: nurse is a subclass of person
  (inherits data and behavior)

            At what stages would you use which
                       perspective?
Page 20                                                 © Martin Fowler 8/13/98




                                                                                  10
Dangers of Class Diagrams



q Emphasis on structure of classes
           â   May lead to data models
           â   De-emphasis on behavior
           â   Lost in details
           â   Over-powerful abstractions




           How can you tell when you have the right
                            model?



Page 21                                           © Martin Fowler 8/13/98




                            Class, Responsibility,
                              Collaboration: CRC
                            Order
          Check Items are in Stock          Order Line
          Determine the price               Order Line
          Check for valid payment           Customer
          Dispatch to delivery
          address




          q Developed by Ward Cunningham and
            Kent Beck
          q Informal technique
          q Concentrates on behavior, not data



Page 22                                           © Martin Fowler 8/13/98




                                                                            11
Interaction (Sequence)
     an Order Entry
                                             Diagrams
                                an Order             an Order Line         a Stock Item
        window
                        prepare()

                                           * prepare()
                                                               hasStock :=
                Message                                          check()                     Condition
Object
                                      Iteration                 [hasStock]
                                                                 remove()
                                                                                   needsReorder :=
                                                                                   needsToReorder()


                                                                                               self
                                                                                               delegation
                                                              return
                                                                                   [needsReorder] new
                                                                                                   a Reorder
                                                                                                      Item



                                                              [hasStock] new
                                                                                                                  a Delivery
                                                                                                                    Item



                         deletion
                                                                                      creation


           q Many objects in one use-case
 Page 23                                                                                                 © Martin Fowler 8/13/98




                        Interaction (Collaboration)
                                                                                            Diagrams
  :Order Entry Window                      Object

                1:prepare()


                                    message
           :Order                                                           self                      sequence
               1.1*[for all order    1.1.1: hasStock := check ()
                                                                            delegation                number
               lines]: prepare ()    1.1.2:[hasStock] remove ()

 talisker line : Order Line                                          talisker stock : Stock Item      1.1.2.1: needsReorder :=
                                                                                                      needToReorder ( )

                                                                                       1.1.2.2: [needsReorder] new
                    1.1.3:[hasStock] new



     : Delivery Item                                                       : reorder item




    q Numbering shows sequence
    q Control symbols
       â * For iteration   Which form would you
       â [ ] For condition         use?

 Page 24                                                                                                 © Martin Fowler 8/13/98




                                                                                                                                   12
Key Books for Base
                               Techniques
 q Implementation focus: Booch, G. Object-
   oriented Analysis and Design With
   Applications, (Second Edition), Benjamin /
   Cummings, Redwood City, CA, 1993.
 q Conceptual Focus: Martin, J. And Odell, J.
   Object Oriented Methods: a Foundation, (UML
   Edition) Prentice Hall, Englewood Cliffs, NJ,
   1998).
 q For Responsibilities: Wirfs-brock R, Wilkerson
   B and Wiener L (1990) Designing Object-
   oriented Software, Prentice Hall, Englewood
   Cliffs NJ.



Page 25                                                  © Martin Fowler 8/13/98




                                                       Patterns
      …projects fail despite the latest
      technology for lack of ordinary
      solutions.


                                Ralph Johnson and Ward Cunningham



q Patterns are the key to going beyond the
  basics
q “Gang of Four” book
q Pattern Languages of Programming (PLoP)
  conference




                    http://www.hillside.net/patterns

Page 26                                                  © Martin Fowler 8/13/98




                                                                                   13
Design Pattern: Proxy



                Subject
                request()




                                            realSubject.request()
 Real Subject                Proxy
   request()    1           request()

q Provide a surrogate or placeholder for another
  object to control access to it

Gamma, E., Helm, R., Johnson, R. and Vlissides, J. Design
Patterns: elements of reusable object-oriented software, Addison-
Wesley, Reading, MA, 1995.
Page 27                                                  © Martin Fowler 8/13/98




                             Analysis Patterns




                             Scenario                    Timepoint
                                        [           1
                                1

                               [
                1            Scenario   [
 Instrument                                                Money
                        [    Element               1

q Prices of instruments change over time
q Hypothetical combinations of prices
q Prices of one instrument can affect others
  Create a scenario to capture the real or
  hypothetical state of the market.
Page 28                                                  © Martin Fowler 8/13/98




                                                                                   14
Packages
      Stocks
     Pricer UI                                               Portfolio UI       Martin, R.C. Designing
                                                                                Object-Oriented C++
                                                                                Applications Using the
                                 GUI Library                                    Booch Method, Prentice
    Stocks
                                                                                Hall, Englewood Cliffs,
                                                         Portfolio
    Pricer                                              Application
                                                                                NJ, 1995.

                                                                                                    Dependency


                                                                                                                        Package
    Stocks                                                                                 Scenario
                                                        Positions
   Database                                                                                Manager


  q Classes grouped into packages (categories)
  q Dependency (visibility) relationships
    between packages
  q Classes within package marked public or
    private
Page 29                                                                                                         © Martin Fowler 8/13/98




                                                          Harel Statechart

          H                         Wait                                                  Open
                                                              close safe




  candle removed [door closed]                 door opened                                        key turned [candle in]




                                                             Active

                                                                                          Lock
                                                 catch released / reveal lock
                           Catch                                                 exit / hide lock




                                                                                              key turned [candle out]



                                                                                          Final

                                                   H                        entry / release killer rabbit




    q Single object in many use-cases
Page 30                                                                                                         © Martin Fowler 8/13/98




                                                                                                                                          15
Simple Activity Diagram
                H




                                            q Similar to a flow chart
          Receive Order




          Assign Goods to
               Order




             Authorize           [failed]
                                               Cancel Order
             Payment

                    [suceeded]


          Dispatch Order




Page 31                                                          © Martin Fowler 8/13/98




                                              Decision Notation
                H




                                            q More similar to flow
          Receive Order                       chart notation


          Assign Goods to
               Order



                      [payment rejected]
                                               Cancel Order


                 [payment authorized]



          Dispatch Order




Page 32                                                          © Martin Fowler 8/13/98




                                                                                           16
Introducing Parallel Behavior

                            H



                      Receive Order




  Assign Goods to                      Authorize          [failed]
                                                                          Cancel Order
       Order                           Payment

                                            [suceeded]




                      Dispatch Order




 q Sequence is independent


Page 33                                                                                        © Martin Fowler 8/13/98




                                                     Adding Iteration
                                       H



                                  Receive Order




    *[for each line item]

                    Assign Goods to
                         Item

                                                   Authorize         [failed]
                                                                                Cancel Order
[need to reorder]                                  Payment

                                                        [suceeded]

   Reorder Goods
                                            [stock assigned to all items and payment authorized]



                                 Dispatch Order




q Iteration also occurs in parallel

Page 34                                                                                        © Martin Fowler 8/13/98




                                                                                                                         17
Multiple Diagrams (1)
                                            H



                                      Receive Order




          *[for each line item]


                        Check Line Item


                     [in stock]


                        Assign Goods to
                             Item

                                                       Authorize         [failed]
                                                                                       Cancel Order
    [need to reorder]                                  Payment

                                                            [suceeded]

       Reorder Goods
                                                  [stock assigned to all items and payment authorized]



                                      Dispatch Order




q Order could be held up for stock

Page 35                                                                                                       © Martin Fowler 8/13/98




                                     Multiple Diagrams (2)
                                                                                          H




                                                                                        Receive
                                                                                    Incoming Goods




                                                                                        Choose
                                                                                      outstanding
                                                                                      order items

                                                              *[for each chosen item]

                                                                                    Assign Goods to
                                                                                         Item




                         [stock assigned to all
                         items and payment                                                          [all chosen items assigned]
                          authorized]

                                                                                      Add Remainder
                                                  Dispatch Order
                                                                                         to Stock



q May also lead to dispatch order
Page 36                                                                                                       © Martin Fowler 8/13/98




                                                                                                                                        18
Combining Diagrams
                         H
                                                                       H


                     Receive
                 Incoming Goods                                 Receive Order




                                   *[for each line item]
                     Choose
                   outstanding
                   order items                                                                    Authorize
                                                Check Line Item
                                                                                                  Payment
          *[for each
          chosen item]
                                             [in stock]                              [suceeded]               [failed]
                 Assign Goods to
                      Item                      Assign Goods to
                                                     Item
                                                                                                          Cancel Order


          [all chosen                                        [need to reorder]
          items
          assigned]
                                                                     Reorder Goods

               Add Remainder
                  to Stock

                                                           [stock assigned to all items and payment authorized]



                                              Dispatch Order




Page 37                                                                                              © Martin Fowler 8/13/98




                                            Design by Contract
                                 Square Root
          q       Inputs
                   â x : Real Number
          q       Output
                   â result : Real Number
          q       Pre-condition
                   â x      0                                              o Also uses class
          q       Post-condition                                             invariants
                   â result * result == x
          q       Exceptions
                   â none
                Meyer, B. Object-Oriented Software Construction,
                Prentice-Hall, New York, 1996
                Meyer, B. “Applying “Design by Contract”,” IEEE
                Computer, 25,10, (1992), pp. 40–51.
                www.eiffel.com
Page 38                                                                                              © Martin Fowler 8/13/98




                                                                                                                               19
CASE Tools

                   Evaluate what you are getting

          q Design Document
                   â   Drawing facilities
                   â   Repository reports
                   â   Uses right set of UML for you?
                   â   Selectivity
          q Code Generation
                   â Can you work with the code?
                   â Updated code fed back into model?


               What is your favorite CASE tool?


Page 39                                                 © Martin Fowler 8/13/98




                                              Translation
       Capture
    specifics of    Domain Analysis
       domain
                                       Model Compiler       Final System
 Rules for your        Archetypes
      platform




q Advocated by Shlaer/Mellor
          â Basic idea also used by ObjectTime
4 Easy regeneration of system to different
  platforms
4 Can reuse the archetypes
8 Does it work in practice?

Page 40                                                 © Martin Fowler 8/13/98




                                                                                  20
Why use these techniques?




q Start small, add notation as needed
q Experiment with different things
          â throw away what does not work
          â different teams have different needs
q UML can communicate with programmers and
  domain experts



Page 41                                            © Martin Fowler 8/13/98




                 A method is not enough



q Using a method will not make or break your
  project



q The choice of training and mentoring will make
  or break your project




Page 42                                            © Martin Fowler 8/13/98




                                                                             21

Mais conteúdo relacionado

Último

Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Destaque (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Martin Fowler's 1998 Guide to UML Modeling Techniques

  • 1. © Martin Fowler, 1998 Martin Fowler fowler@acm.org http://ourworld.compuserve.com/homepages/Martin_Fowler Page 1 © Martin Fowler 8/13/98 What We Will Cover (1) q Background to UML q Outline process q Grand Tour of Techniques â Use Cases â Class Diagrams â CRC Cards â Both kinds of Interaction Diagrams â Package Diagrams â State Diagrams â Activity Diagrams â Design by Contract http://ourworld.compuserve.com/homepages/Martin_Fowler Page 2 © Martin Fowler 8/13/98 1
  • 2. OO Methods Coad Coad Wirfs-Brock / / Wirfs-Brock Late 80’s RDD RDD early 90’s Odell / /OOIE Shlaer / / Odell OOIE Shlaer Mellor Mellor Rumbaugh / / Jacobson / / Jacobson Booch Rumbaugh Booch OMT Objectory Objectory OMT Page 3 © Martin Fowler 8/13/98 Evolution of the UML 1988-92 Many analysis and design books 1993 Standardization not a priority 1994 Jim Rumbaugh joins Rational (Grady Booch) 1995 Booch/Rumbaugh unified method released, Rational buys Objectory (Ivar Jacobson), OMG task force launched (chairs Mary Loomis and Jim Odell) Jan 97 UML 1.0 submitted to OMG as proposal Mid 97 OMG proposals unified behind UML 1.1 Late 97 OMG adopts UML 1.1 as OMG UML 1.0 Spr 98 OMG to issue UML 1.2 (minor changes) Page 4 © Martin Fowler 8/13/98 2
  • 3. Unified Modeling Language (UML) q Developed by the three amigos: Booch, Jacobson and Rumbaugh at Rational â Many contributions through OMG process q Notation and semantics, not process q Organizations preparing processes â Rational: Objectory (Unified Process) â HP: Fusion Fowler M with Scott K, UML Distilled: Applying the Standard Object Modeling Language, Addison-Wesley, 1997 www.rational.com/uml Page 5 © Martin Fowler 8/13/98 UML Books q Three amigos books â User Guide, Reference, and Unified Process â End 98 q Fowler: UML Distilled, Addison-Wesley â Concise guide, assumes you know OO design q Larman: Applying UML and Patterns, Prentice Hall â Intro to Objects using UML q Martin and Odell, OO Methods a Foundation, Prentice Hall â Conceptual Modeling q Douglass, Real-Time UML, Addison-Wesley â Real Time Page 6 © Martin Fowler 8/13/98 3
  • 4. Use-cases q A use case is a typical interaction with the system â Recognizable value to the user - meets a goal â Testable What would be some use cases for a Word Processor? http://members.aol.com/acockburn Page 7 © Martin Fowler 8/13/98 Incremental Development Development Exploration 1 2 ... Finishing Finishing Goal: Reduce Risk Cockburn A. Surviving Your Object- Oriented Project, Addison-Wesley, 1998 McConnell S. Rapid Development, Microsoft Press 1996 Page 8 © Martin Fowler 8/13/98 4
  • 5. Development q Break into increments â Build a few use-cases â Analysis, design, implementation, testing, and integration â Demo to user and verify functional tests for those use-cases â Step length 2 weeks to 2 months q Do high risk and high priority use-cases first q Time box the steps â Cannot slip dates, may put off use-cases Goal: Have clear milestones to measure progress Goal: Tackle high risks early Page 9 © Martin Fowler 8/13/98 Exploration q Gather use-cases â One or two paragraphs q Outline conceptual model â Find key abstractions in conceptual problem q Baseline technical architecture â Try out key pieces of technology and how they fit together â Determine key packages and interfaces q About 1/5 of project length Goal: Gain understanding to reduce risks in later development Page 10 © Martin Fowler 8/13/98 5
  • 6. Dividing Use Cases q Capture basic order information â Customer, date received â Line items: quantity and product q Price order â Rules vary with products, different price thresholds and options. â May be combination rules q Discount plans â Customers may be members of various discount plans. â Plans apply various discounts to orders â A particularly involved discount plan is the “bonnie prince” plan How many use cases here? Page 11 © Martin Fowler 8/13/98 Granularity of Use Cases Take Order Price Order Take Order Customer Discounts Bonnie Prince Discount Plan Combination Pricing Rules Page 12 © Martin Fowler 8/13/98 6
  • 7. The «extends» Notion Take Order «extends» «extends» Price Order Customer Discounts «extends» «extends» Combination Pricing Bonnie Prince Rules Discount Plan q Simple case and variations Page 13 © Martin Fowler 8/13/98 Use-case Diagram Use Case Actor Set Limits «uses» Trading Manager Analyze Risk «uses» Valuation Trader Price Deal «extends» Capture Deal Salesman Limits Exceeded q Shows use cases and links between them â Actors â Uses and extends q Can be useful but not essential Page 14 © Martin Fowler 8/13/98 7
  • 8. Cockburn’s Style q Base on the goal of a user q Consider main course scenario â Everything goes well and goal succeeds â Capture as sequence of steps q Take each step in the use case â Ask what can go wrong â Can we recover, if so how â Each step may be another use case with its own goal q Capture variations in main course q Note priority, time to be done in, and frequency http://members.aol.com/acockburn Page 15 © Martin Fowler 8/13/98 Abuse Cases q Decomposition â Temptation to drive design â Takes time (for little value) q Abstraction â Loses users â Less value in testing q GUI prototypes â False sign of progress â Encourages scope growth q Denying choice â System v user use cases Have you seen these traps? Page 16 © Martin Fowler 8/13/98 8
  • 9. Class Diagrams Order Association Customer Date received ] 1 Name isPrepaid Address Number Credit Rating Price Constraint Generalization Dispatch Close {Orders for a customer with poor 1 credit rating must be prepaid} Corporate Personal Customer Customer ] Contact Name Credit card # Attributes Credit Rating Order Line Credit Limit product Remind quantity price Class Operations Page 17 © Martin Fowler 8/13/98 Modeling Perspectives q Conceptual â Describes people’s perception of the world â Independent of software q Specification â Interfaces of classes (types) q Implementation â Internal features of a class Cook, S. and Daniels, J. Designing Object Systems: object- oriented modeling with Syntropy, Prentice Hall International, Hemel Hempstead, UK, 1994. Page 18 © Martin Fowler 8/13/98 9
  • 10. Association An employee must have a single department 1 [ [ Department Employee Skill [ notation for cardinalities q Defines connections between instances â Conceptual: employees must have a single department â Specification: you can ask an employee object for its department (and change it) â Implementation: employee has a pointer to a department q Uni-directional and bi-directional Page 19 © Martin Fowler 8/13/98 Generalization A nurse is a kind of a person Person Doctor Nurse q Conceptual: all nurses are people q Specification: (subtyping) nurse satisfies the interface of person (substitutable) q Implementation: nurse is a subclass of person (inherits data and behavior) At what stages would you use which perspective? Page 20 © Martin Fowler 8/13/98 10
  • 11. Dangers of Class Diagrams q Emphasis on structure of classes â May lead to data models â De-emphasis on behavior â Lost in details â Over-powerful abstractions How can you tell when you have the right model? Page 21 © Martin Fowler 8/13/98 Class, Responsibility, Collaboration: CRC Order Check Items are in Stock Order Line Determine the price Order Line Check for valid payment Customer Dispatch to delivery address q Developed by Ward Cunningham and Kent Beck q Informal technique q Concentrates on behavior, not data Page 22 © Martin Fowler 8/13/98 11
  • 12. Interaction (Sequence) an Order Entry Diagrams an Order an Order Line a Stock Item window prepare() * prepare() hasStock := Message check() Condition Object Iteration [hasStock] remove() needsReorder := needsToReorder() self delegation return [needsReorder] new a Reorder Item [hasStock] new a Delivery Item deletion creation q Many objects in one use-case Page 23 © Martin Fowler 8/13/98 Interaction (Collaboration) Diagrams :Order Entry Window Object 1:prepare() message :Order self sequence 1.1*[for all order 1.1.1: hasStock := check () delegation number lines]: prepare () 1.1.2:[hasStock] remove () talisker line : Order Line talisker stock : Stock Item 1.1.2.1: needsReorder := needToReorder ( ) 1.1.2.2: [needsReorder] new 1.1.3:[hasStock] new : Delivery Item : reorder item q Numbering shows sequence q Control symbols â * For iteration Which form would you â [ ] For condition use? Page 24 © Martin Fowler 8/13/98 12
  • 13. Key Books for Base Techniques q Implementation focus: Booch, G. Object- oriented Analysis and Design With Applications, (Second Edition), Benjamin / Cummings, Redwood City, CA, 1993. q Conceptual Focus: Martin, J. And Odell, J. Object Oriented Methods: a Foundation, (UML Edition) Prentice Hall, Englewood Cliffs, NJ, 1998). q For Responsibilities: Wirfs-brock R, Wilkerson B and Wiener L (1990) Designing Object- oriented Software, Prentice Hall, Englewood Cliffs NJ. Page 25 © Martin Fowler 8/13/98 Patterns …projects fail despite the latest technology for lack of ordinary solutions. Ralph Johnson and Ward Cunningham q Patterns are the key to going beyond the basics q “Gang of Four” book q Pattern Languages of Programming (PLoP) conference http://www.hillside.net/patterns Page 26 © Martin Fowler 8/13/98 13
  • 14. Design Pattern: Proxy Subject request() realSubject.request() Real Subject Proxy request() 1 request() q Provide a surrogate or placeholder for another object to control access to it Gamma, E., Helm, R., Johnson, R. and Vlissides, J. Design Patterns: elements of reusable object-oriented software, Addison- Wesley, Reading, MA, 1995. Page 27 © Martin Fowler 8/13/98 Analysis Patterns Scenario Timepoint [ 1 1 [ 1 Scenario [ Instrument Money [ Element 1 q Prices of instruments change over time q Hypothetical combinations of prices q Prices of one instrument can affect others Create a scenario to capture the real or hypothetical state of the market. Page 28 © Martin Fowler 8/13/98 14
  • 15. Packages Stocks Pricer UI Portfolio UI Martin, R.C. Designing Object-Oriented C++ Applications Using the GUI Library Booch Method, Prentice Stocks Hall, Englewood Cliffs, Portfolio Pricer Application NJ, 1995. Dependency Package Stocks Scenario Positions Database Manager q Classes grouped into packages (categories) q Dependency (visibility) relationships between packages q Classes within package marked public or private Page 29 © Martin Fowler 8/13/98 Harel Statechart H Wait Open close safe candle removed [door closed] door opened key turned [candle in] Active Lock catch released / reveal lock Catch exit / hide lock key turned [candle out] Final H entry / release killer rabbit q Single object in many use-cases Page 30 © Martin Fowler 8/13/98 15
  • 16. Simple Activity Diagram H q Similar to a flow chart Receive Order Assign Goods to Order Authorize [failed] Cancel Order Payment [suceeded] Dispatch Order Page 31 © Martin Fowler 8/13/98 Decision Notation H q More similar to flow Receive Order chart notation Assign Goods to Order [payment rejected] Cancel Order [payment authorized] Dispatch Order Page 32 © Martin Fowler 8/13/98 16
  • 17. Introducing Parallel Behavior H Receive Order Assign Goods to Authorize [failed] Cancel Order Order Payment [suceeded] Dispatch Order q Sequence is independent Page 33 © Martin Fowler 8/13/98 Adding Iteration H Receive Order *[for each line item] Assign Goods to Item Authorize [failed] Cancel Order [need to reorder] Payment [suceeded] Reorder Goods [stock assigned to all items and payment authorized] Dispatch Order q Iteration also occurs in parallel Page 34 © Martin Fowler 8/13/98 17
  • 18. Multiple Diagrams (1) H Receive Order *[for each line item] Check Line Item [in stock] Assign Goods to Item Authorize [failed] Cancel Order [need to reorder] Payment [suceeded] Reorder Goods [stock assigned to all items and payment authorized] Dispatch Order q Order could be held up for stock Page 35 © Martin Fowler 8/13/98 Multiple Diagrams (2) H Receive Incoming Goods Choose outstanding order items *[for each chosen item] Assign Goods to Item [stock assigned to all items and payment [all chosen items assigned] authorized] Add Remainder Dispatch Order to Stock q May also lead to dispatch order Page 36 © Martin Fowler 8/13/98 18
  • 19. Combining Diagrams H H Receive Incoming Goods Receive Order *[for each line item] Choose outstanding order items Authorize Check Line Item Payment *[for each chosen item] [in stock] [suceeded] [failed] Assign Goods to Item Assign Goods to Item Cancel Order [all chosen [need to reorder] items assigned] Reorder Goods Add Remainder to Stock [stock assigned to all items and payment authorized] Dispatch Order Page 37 © Martin Fowler 8/13/98 Design by Contract Square Root q Inputs â x : Real Number q Output â result : Real Number q Pre-condition â x 0 o Also uses class q Post-condition invariants â result * result == x q Exceptions â none Meyer, B. Object-Oriented Software Construction, Prentice-Hall, New York, 1996 Meyer, B. “Applying “Design by Contract”,” IEEE Computer, 25,10, (1992), pp. 40–51. www.eiffel.com Page 38 © Martin Fowler 8/13/98 19
  • 20. CASE Tools Evaluate what you are getting q Design Document â Drawing facilities â Repository reports â Uses right set of UML for you? â Selectivity q Code Generation â Can you work with the code? â Updated code fed back into model? What is your favorite CASE tool? Page 39 © Martin Fowler 8/13/98 Translation Capture specifics of Domain Analysis domain Model Compiler Final System Rules for your Archetypes platform q Advocated by Shlaer/Mellor â Basic idea also used by ObjectTime 4 Easy regeneration of system to different platforms 4 Can reuse the archetypes 8 Does it work in practice? Page 40 © Martin Fowler 8/13/98 20
  • 21. Why use these techniques? q Start small, add notation as needed q Experiment with different things â throw away what does not work â different teams have different needs q UML can communicate with programmers and domain experts Page 41 © Martin Fowler 8/13/98 A method is not enough q Using a method will not make or break your project q The choice of training and mentoring will make or break your project Page 42 © Martin Fowler 8/13/98 21