27 MarchSoftware Engineering Elaborated StepsWhat is UML?Modeling ReviewModeling Languages and ProcessesUML HistoryOMG Model Oriented ArchitectureWhy Study UML?What UML Is and Isn’tReferencesUML Views: Diagram TypesSlide 12Classification of Diagram TypesUse Case DiagramExample of Use CaseUse Case ExtensionsSlide 17Slide 18Use Case UsageClass DiagramsClass RelationshipsClass Diagram ExampleObject DiagramsSequence DiagramExample Sequence DiagramCollaboration DiagramExample Collaboration DiagramStatechart DiagramExample of Statechart DiagramActivity DiagramExample of Activity DiagramAnd…Example of Component DiagramExample of Deployment DiagramPitfalls of UMLSymptoms of UML Fever (Bell, Queue, March 2005)How would you use these different tools?27 MarchUML: Unified Modeling LanguageSoftware Engineering Elaborated StepsConceptRequirementsArchitectureDesignImplementationUnit testIntegrationSystem testMaintenanceWhat is UML?software blueprint language: common vocabulary for analysts, designers, and programmersnot for the customerapplicable to object-oriented problem solvingbegins with the construction of a modelmodels consist of objects interact by sending messagesattributes: things they knowbehaviors or operations: things they can do stateAlso used for business processesModeling ReviewBased on abstractionlooking only at relevant informationhiding detailsMultiple viewsas orthogonal as possibleeach view has information thatis uniqueappears in other viewscommon information is consistentModeling Languages and ProcessesLanguage: syntaxusually graphicalused to express designProcess: steps to take to create a designMany processes, not a lot of agreementGeneral consensus has built around UML as a languageUML HistoryThree well received models in early 90sGrady Booch (Rational), Object Oriented Analysis and DesignJim Rumbaugh (GE), Object Modeling TechniqueIvar Jacobson (Ericsson), Object Oriented Software EngineeringBy ’95, all three “amigos” were working for Rational (acquired by IBM in 2002)OMG adopted UML in ’97Version 2.0 completed in 2004OMG Model Oriented ArchitectureUML - graphical language for visualizing, specifying, constructing, artifacts MOF - integration framework for metadata and dataSpecification to translate MOF model to text artifacts Query language…CWM - semantic context for interchange of metadataWhy Study UML?software engineering cultural literacyuseful toolnatural model for designlots of good toolsRational generates C++ and Java codeSome people expect tools to generate codegood for prototypinggood for development?Would this be good or bad?What UML Is and Isn’tSyntax onlyStandardizedLanguage and tool independentGeneric enough to beUsable in lots of environmentsAnd leaving you lots of space to misuse itExtendable through “stereotypes” New symbols built up from basic onesUsed to develop a business process modelNot a process (there is a companion one)Referenceswww.uml.orgFowler, UML Distilled, Addison-Wesley3rd edition, 2004, covers 2.0ShortGood summary charts on inside coversUML Views: Diagram TypesUse Case – outside view (scenarios)Class – classes and relationships among themObject – instances instead of classesSequence – how and when objects interact through messagesCollaboration – how objects interact through rolesStatechart – object behaviors as reflected through states (single class)Activity – flow diagram covering multiple classes and their interactionsComponent – analogous to class but for code moduleDeployment – physical configuration of system nodes and their communicationUse caseClassObjectSequenceCollaborationStatechartActivityComponentDeploymentClassification of Diagram TypesDiagram Static/Dynamic PhaseUse case Dynamic RequirementsClass Static DesignObject Static DesignSequence Dynamic DesignCollaboration Dynamic DesignStatechart Dynamic DesignActivity Dynamic DesignComponent Static CodeDeployment Static DeployUse Case DiagramDefines the outside viewElementsActors (stick figures): anything outside the system that interacts with itUse cases (ovals): procedures by which the actor interacts with the systemSolid lines: indicate how actors interactExample of Use CaseUse Case ExtensionsDotted lines: show dependencies between proceduresIncludes (subroutine)Extends (variation)Example of Use CaseExample of Use Case(customer name)Use Case Usagedetermining features (requirements)basis for communicating with clientsgenerating test casesClass DiagramsStatic structure of the system. What interacts, but not what happens.Class notation is a rectangle divided into three partsclass name (abstract classes are in italics) attributesoperationsClass Relationshipsassociation relationship between instances of the two classesmay have a role name to clarify the nature of the associationlink connecting two classesnavigability arrow shows which direction the association can be traversed or queried. Also shows ownershipNo arrow means bidirectionalmultiplicity of an association end is the number of possible instances of the class associated with a single instance of the other end0..1 zero or one instancen . . m n to m instances0..* or * no limit on the number of instances (including none)1 exactly one instance1..* at least one instanceaggregation association in which one class belongs to a collectiondiamond end pointing to the part containing the whole. generalizationinheritance link indicating one class is a superclass of the otherClass Diagram ExampleObject Diagramsobject diagram: instantiates class diagramSequence DiagramInteractions between objectsElementsObjects (oblong boxes or actors)Box implies creationMessages (solid lines for calls, dotted for replies): interactions between objectsMay include iterations and conditionsObject lifelines (dotted lines): life time of objectActivation bar (vertical oblong box on lifeline): thread of control for synchronous systemsExample Sequence DiagramCollaboration DiagramAlternative to sequence diagramLoses timing informationRelative sequence may be added with order numbersFocus on object roles instead of the times that
View Full Document