Docstoc

Introduce UML

Document Sample
Introduce UML Powered By Docstoc
					                                      ®




         IBM Software Group




Object-Oriented Analysis and Design
Module 2b: Introduction to UML




                              1
Objectives
  Brief introduction of the Unified Modeling
   Language (UML)
  Explain what the UML represents
  Define the type of process that best relates
   to the UML.




                        2
What Is the UML? – Explanation 1
  The UML is a language for
      • Visualizing
      • Specifying
      • Constructing
      • Documenting
   the artifacts of a software-intensive system.




                        3
The UML Is a Language for Visualizing
  Communicating conceptual
   models to others is prone to
   error unless everyone involved
   speaks the same language.
  There are things about a
   software system you can’t
   understand unless you build
   models.
  An explicit model facilitates
   communication.


                         4
The UML Is a Language for Specifying
  The UML builds models that are precise,
   unambiguous, and complete.




                        5
The UML Is a Language for Constructing
  UML models can be directly connected to a
   variety of programming languages.
     Maps to Java, C++, Visual Basic, and so on
     Tables in a RDBMS or persistent store in an
      OODBMS
     Permits forward engineering
     Permits reverse engineering




                          6
The UML Is a Language for Documenting
 The UML addresses documentation of system architecture,
  requirements, tests, project planning, and release
  management.

                                             Use Case Diagram                                                                                                                                                     Deployment Diagram
                                                                                                                                                                                                                                             ºÐ»ê ȯ°æÀÇ Çϵå¿þ¾î¹× ³×Æ®¿÷À¸·ÎÀÇ Á¤º¸ ½Ã½ºÅÛ ¿¬°á ¸ðµ¨
                                                                                                                                                                                                                    - À©µµ¿ì 95 : Ŭ¶óÀ̾ðÆ®
                                                                                                                                                                                                                  - À©µµ¿ì NT: ÀÀ¿ë¼-¹ö
                                                                                                                                                                                                                                    - À¯´Ð½º ¸Ó½Å: ÀÀ¿ë ¼-¹ö ¹× µ¥ÀÌŸ ¼-¹ö, Åë½Å ¼-¹ö
                                                                                                                                                                                                                             - IBM ¸ÞÀÎÇÁ·¹ÀÓ: µ¥ÀÌŸ ¼-¹ö, Åë½Å ¼-¹ö




                                                                                                                                                                                                                                                                                                                           Windows95
                                                                                                                                                                                                                                  Window95

                                                                                                                                                                                                                                                                                                                                                                                                    Windows95

                                                                  Use Case 1

                                                                                                                                                                                                                       ¹®¼-°ü¸®
                                                                                                                                                                                                                             Ŭ¶óÀ̾ðÆ®.EXE
                                                                                                                                                                                                                                                                                                                                                                                          ¹®¼-°ü¸® ¾ÖÇø´




                                                                                                                                                                                                                                                                                     Windows
                                                                                                                                                                                                                                                                                      NT



             Actor A                                                                                                                                                                            Actor B
                                                                  Use Case 2                                                                                                                                                                                                                                                                                Solaris




                                                                                                                                                                                                                                                                                  ¹®¼-°ü¸® ¿£Áø.EXE




                                                                                                                                                                                                                                                                                                                                                                                                                  Alpha
                                                                                                                                                                                                                                                                                                                                                                                                                  UNIX
                                                                                                                                                                                                                                                                                                                                                       ÀÀ¿ë¼-¹ö.EXE


                                                                                                                                                                                                                                                           Windows
                                                                                                                                                                                                                                                            NT




                                                                                                                                                                                                                                                                                                                                           IBM


                                                              Use Case 3                                                                                                                                                                                                                                                                  Mainframe




                                                                                                                                                                                                                                                                                                                                  µ¥ÀÌŸº£À̽º¼-¹ö




                                                                                                                                                                                                                                                                                                                                   DocumentList

                                                                               mainWnd                            fileMgr :                         document :                          gFile    repository
                                                                                                                                                                                                                                                                                                                                                                                                    Document
                                                                                                                                                                                                                                              FileMgr
                                                                                                                  FileMgr                           Document
                                              user
                                                                                                                                                                                                                                                                                                                                  add( )
                                                                                                                                                                                                                                                                                                                                                                                          name : int
                                                                                                                                                                                                                                                 fetchDoc( )                                                                           delete( )
                                                                                                                                                                                                                                                                                                                                                                                        docid : int
                                                                                                                                                                                                                                                      sortByName( )
                                                                                                                                                                                                                                                                                                                                                                                                numField : int




                                                     1: Doc view request ( )                                                                                                                                                                                                                                                                                                         get( )
                  ƯÁ¤¹®¼-¿¡ ´ëÇÑ º¸±â¸¦
                »ç¿ëÀÚ°¡ ¿äûÇÑ´Ù.                                                                                                                                                                                                                                                                                                                                                                                                 read() fill the
                                                                                                                                                                                                                                                                                                                                                                                     open( )

                                                                                                                                                                                                                                                                                                                                                                                                                          code..
                                                                                                                                                                                                                                                                                                                                                                                      close( )

                                                                                                 2: fetchDoc( )                                                                                                                                                                                                                                                                       read( )
                                                                                                                                                                                                                                                                                                            FileList

                                                                                                                                                                                                                                                                                                                                                                                              sortFileList( )
                                                                                                                                                                                                                                                                                                                                               fList
                                                                                                                                                                                                                                                                                                                                                                                        create( )
                                                                                                                              3: create ( )
                                                                                                                                                                                                                                                                                                                                                                                                fillDocument( )
                                                                                                                                                                                                                                                                                                         add( )

                                                                                                                                                                                                                                                                                                           delete( )
                                                                                                                                                                                                                                                                                                                                           1
                                                                                                                                                    4: create ( )




                                                                                                                                                                      5: readDoc ( )




                 È-ÀÏ°ü¸®ÀÚ´Â Àоî¿Â                                                                                          6: fillDocument ( )
                 ¹®¼-ÀÇ Á¤º¸¸¦ ÇØ´ç ¹®¼-
                  °´Ã¼¿¡ ¼³Á¤À» ¿äûÇÑ´Ù.

                                                                                                                                                                                                                                                                 rep


                                                                                                                                                                      7: readFile ( )

                                                                                                                                                                                                                                                                                                                    File
                                                                                                                                                                                                                                                  Repository




                                                                                                                                                    8: fillFile ( )
                                                                                                                                                                                                                                          (from Persistence)
                                                                                                                                                                                                                                                                                                          read( )                                               GrpFile


                   È-¸é °´Ã¼´Â ÀоîµéÀÎ                                            9: sortByName ( )                                                                                                                                                name : char * = 0
                   °´Ã¼µé¿¡ ´ëÇØ À̸§º°·Î
                  Á¤·ÄÀ» ½ÃÄÑ È-¸é¿¡
                                                                                                                                                                                                                                                                                                                                                                      read( )
              º¸¿©ÁØ´Ù.                                                                                                                                                                                                                      readDoc( )
                                                                                                                                                                                                                                                                                                                                                                      open( )
                                                                                                                                                                                                                                             readFile( )
                                                                                                                                                                                                                                                                                                                                                                        create( )

                                                                                                                                                                                                                                                                                                                                                                       fillFile( )




                                            Sequence Diagram                                                                                                                                                                                               Class Diagram


                                                                                                                                                                                                              7
What Is the UML ? – Explanation 2
(Primary goals in design of UML)
 provide users a ready-to-use, expressive visual
  modeling language to develop and exchange
  meaningful models
 provide extensibility and specialization mechanisms to
  extend the core concepts
 be independent of particular programming languages
  and development processes
 provide a formal basis for understanding the modeling
  language
 encourage growth of OO tools market
 support higher-level development concepts such as
  collaborations, frameworks, patterns, and components
 integrate best practices  8
History of the UML
                                               UML 2.0
                                                  (2004)


                                               UML 1.5
                                               (March, ‘03)


             UML                               UML 1.1
           Partners’                           (Sept. ‘97)
           Expertise
                                               UML 1.0
                                               (Jan. ‘97)


                       UML 0.9 and UML 0.91
                       (June ‘96)            (Oct. ‘96)
                                                              Public
                              Unified Method 0.8              Feedback
                              (OOPSLA ’95)


                                    Booch ’93      OMT - 2



    OOSE    Other               Booch ‘91          OMT - 1
           Methods
                                        9
Inputs to the UML

                    Rumbaugh         Booch          Jacobson

              Meyer                                         Fusion
     Before and after                                       Operation descriptions,
     conditions                                             message numbering

                Harel                                       Embley
          State charts                                      Singleton classes,
                                                            High-level view


      Gamma, et.al                                          Wirfs-Brock
Frameworks, patterns,                                       Responsibilities
notes

          Shlaer- Mellor      Selic, Gullekson, Ward      Odell
          Object lifecycles   ROOM (Real-Time             Classification
                              Object-Oriented Modeling)



                                         10
Conceptual Model of UML




                          11
UML By Example - Nine Diagram Forms
  Static structure diagrams
    (1) Class and (2) Object diagrams
  (3) Use case diagrams
  Interaction diagrams
    (4) Sequence and (5) Collaboration diagrams
  (6) State machine diagrams (Statecharts)
  (7) Activity diagrams
  Implementation diagrams
    (8) Component and (9) Deployment diagrams

                         12
Use Case Diagram

                    View Report Card




                   Register for Courses


       Student

                          Login

                                          Course Catalog

                    Select Courses to
                         Teach

       Professor

                     Submit Grades




                                  13
Class Diagram

                                 1
        RegisterForCoursesForm                   RegistrationController
                                             1

                                                    0..1



                                 0..1

              1                       0..*
    Student                Schedule                           CourseOffering
                    0..*                               0..4




                                        14
Object Diagram




                 15
Sequence Diagram

       : Student   :RegisterForCoursesForm    :RegistrationController   :CourseCatalogSystem   : Course Catalog


             1: create schedule( )
                                     2: get course offerings( )
                                                               3: get course offerings(forSemester)
                                                                                   4: get course offerings( )



                                     5: display course offerings( )


                                     6: display blank schedule( )




 ref
                                                        Select Offerings


                                                          16
Collaboration Diagram

                                       5: display course offerings( )
                                       6: display blank schedule( )




               1: create schedule( )                                                                : Course Catalog
                                         : RegisterForCoursesForm



   : Student
                                          2: get course offerings( )
                                                                                             4: get course offerings( )

                                                             3: get course offerings(forSemester)

                                           : RegistrationController                           : CourseCatalogSystem




                                                               17
State Machine Diagram


                                                    Hired


                       accepted                Assistant
             Applied                   H       Professor

                                                       maxPapers


      rejected                                  Tenured


                                                        seniority

                       retired
                                               Professor

                                                            H


                                   takeSabbatical               return


                                                     Hiatus



                                  18
Activity Diagram

                            Select Course


                                              [ delete course ]
                                                                  Delete Course
                             [ add course ]




                  Check                         Check
                 Schedule                     Pre-requisites




            [ checks completed ]      [ checks failed ]



                Assign to                       Resolve
                 Course                         Conflicts


                 Update
                 Schedule




                                               19
Component Diagram




                    20
Deployment Diagram

                              <<client workstation>>
                                        PC
                               StudentApplication

                                           0..2000
                      <<Campus LAN>>
                                      1


                            <<application server>>
                             Registration Server
                      1
                          CourseCatalogSystemAccess    1
    <<Campus LAN>>        CourseRegistrationProcess        <<Campus LAN>>
                          BillingSstemAccess
                 1
                                                           1
   <<legacy RDBMS>>                                            <<legacy>>
     Course Catalog                                               Billing
                                                                 System




                                      21
Relationship Between UML Diagram Forms




                      22
A Language Is Not Enough to Build a System




                   Team- Based
                   Development




              Modeling        Unified
              Language        Process


                         23
What Type of Process Most Benefits the UML?
  The UML is largely process independent. A
   process fully benefits from the UML when
   the process is:
     Use-case driven
     Architecture centric
     Iterative and incremental




                           24
Review: A Use-Case Driven Process
  Use cases defined for a system are the
   basis for the entire development process.
  Benefits of use cases:
     Concise, simple, and understandable by a wide
      range of stakeholders.
     Help synchronize the content of different
      models.

                                         Check Balance




             Customer

                        Withdraw Money




                          25
Review: An Architecture-Centric Process
  A system’s architecture is used as a
   primary artifact for conceptualizing,
   constructing, managing, and evolving the
   system under development.
  Benefits:
     Intellectual control over a project to manage its
      complexity and to maintain system integrity.
     Effective basis for large-scale reuse.
     A basis for project management.
     Assistance in component-based development.


                            26
Review: An Iterative and Incremental Process
  Critical risks are resolved before making
   large investments.
  Initial iterations enable early user feedback.
  Testing and integration are continuous.
  Objective milestones focus on the short
   term.
  Progress is measured by assessing
   implementations.
  Partial implementations can be deployed.


                         27
Review: Iterative Development
  Iteration 1           Iteration 2                Iteration 3
    R                       R                        R
         D                       D                         D
                C                          C                     C
                    I                          I                     I
                        T                            T                   T


                                T I ME

  Earliest iterations address greatest risks.
  Each iteration produces an executable
   release, an additional increment of the
   system.
  Each iteration includes integration and test.
                                      28
Review
  What is the UML? Describe each
   of its four benefits.
  What process characteristics best
   fit the UML? Describe each
   characteristic.
  What is an iteration?




                       29
30

				
DOCUMENT INFO
Shared By:
Stats:
views:29
posted:4/14/2011
language:English
pages:30