uml design & modelling - telemark university...
TRANSCRIPT
WeekAssignmentUMLDesign&Modelling
Hans-PetterHalvorsenB.Lund.Lunch.Available:http://www.lunchstriper.no,http://www.dagbladet.no/tegneserie/lunch/
2017.01.31
WeekAssignment1. CreateUMLdiagramsforyourpartofthe
systemandtheoverallsystem.2. StartImplement/UpdateCodeaccordingtothe
UMLDesignTheUMLdiagramswithdescriptionsshouldbepartoftheRequirementsandDesigndocument(s):SRS/SDD→SRD
SeeNextSlidesformoredetails...
AllDocuments,Code,etc.shouldbeuploadedtoVisualStudioTeamServices(VSTS)
Introduction
Hans-PetterHalvorsen,M.Sc.
UMLDesign&Modelling
RequirementsAnalysis
Design
Implementation
Testing
Maintenance
PlanningDeployment
SRS
SDD
STD
Code
InstallationGuides
UserGuides
GanttChart
withERDiagram,UMLDiagrams,CADDrawings
TestDocumentation
SoftwareRequirementsSpecifications
SoftwareDesignDocumentsSystemDocumentation
TestPlan
ProjectPlanning
End-UserDocumentation
SystemDocumentation
SoftwareTestDocumentation
SDPSoftwareDevelopment
Plan
GanttChart
TheSoftwareDevelopment
Lifecycle(SDLC)
WhyspendtimeonRequirements&Design?
SoftwareDevelopmentLifeCycle(SDLC)
Costperdefectsandchanges
TypicalSoftwareDocumentation
High-LevelRequirementsandDesignDocuments
UserManuals
SystemDocumentation
InstallationGuides
TestPlans
TestDocumentation
DetailedRequirementsandDesignDocuments
ERDiagram(Database)UMLDiagrams(Code)
Time
Start
Finish
HowtoTest/WhattoTest
CADDrawings,etc.
1.Planning
2.Testing
3.End-userDocumentation(Thepeoplethatshallactuallyusethesoftware)
TechnicalStuff
Howtouseit
Howtoinstallit
Proofthatyouhavetestedandthatthesoftwareworksasexpected
(Thestakeholders,thesoftwareteam;architects,UXdesigners,developers)
(QApeople)
(SuperUser/ITdep.)
WHATHOW
(EndUser)ProjectM
anagem
ent(Ga
nttC
hart,etc.)
(SRS)(SDD)
(STP)(STD)
SoftwareDevelopmentPlan (SDP)
2.Requierements/Design
SoftwareRequirements&DesignRequirements(WHAT):• WHAT thesystemshoulddo• DescribewhatthesystemshoulddowithWordsandFigures,etc.• SRS – SoftwareRequirementsSpecificationSoftwareDesign(HOW):• HOW itshoulddoit• Examples:GUIDesign,UML,ERdiagram,CAD,etc.• SDD – SoftwareDesignDocument
Note!Manydon'tseparateSRSandSDDdocuments,butincludeeverythinginaRequirements&DesignDocument(SRD).èInpractice,RequirementsandDesignareinseparable.
SRS/SDDDocument(s)
DatabaseDiagram(s)
UMLDiagrams
WrittenHigh-LevelRequirements
SystemSketches,FlowCharts,etc.
CADDrawings
DiagramsasFigures+Descriptionsofeach
DiagramsasFigures+OverallDescriptionsanddescriptionsforeachtable
DiagramsasFigures+Descriptionsofeach
DesignSketches-bothSystemArcitecture
andGUImockups
UseCaseDocument?
etc.
etc.
Usefulwhenyourprojectinvolveshardware
RequirementsAnalysis
Documents
ThefollowingDocumentsshouldbe“finished”*withinthisWeekAssignment!• SoftwareDevelopmentPlan(SDP)• SoftwareRequirementsandDesign(SRD)
*Buttheycanandshouldbecontinuouslyupdatedthroughouttheprojectchangesoccur
UML• ThefollowingUMLdiagramsforyoursystemshouldbecreated:1. UseCase Diagrams2. Sequence Diagrams3. Class Diagrams
• UMLTools:WewilluseVisualStudioEnterprise(orMSVisio)asourUMLTool.
• IncludetheUMLdiagramsaspartofyourrequirementsanddesigndocument(s)
SeeNextSlidesformoredetails...
CreatingUML- ApracticalApproach
WrittenRequirements
UseCaseDiagramsCreateUseCasesfromyour
writtenRequirements
Agraphical/visualrepresentationoftheRequirements
WHATthesystemshalldo
SequenceDiagrams
HOW
WHAT
DESIGN
TypicallycreateoneSequenceDiagramforeachUseCase
ClassDiagram
YougettheClassNamesfromthedifferentSequenceDiagrams
12
34
CreateoneClassDiagramthatgivesanoverviewofallyourclassesandtherelationshipbetweenthem
HOW
Interactionsbetweenasystemanditsenvironment
WhyuseUML?• Design
– ForwardDesign:doingUMLbeforecoding.Makesiteasiertocreatethecodeinastrucured manner
– BackwardDesign:doingUMLaftercodingasdocumentation
– WhendoingchangesintheDesign,makesuretoupdatetheCodeaccordingtothenewDesign
• Code– SomeToolscanAuto-generateCodefromUML
diagrams– WhendoingchangesintheCode,makesureto
updatetheUMLDiagrams
http://geek-and-poke.com
UMLResources• Mer omUML:http://slideplayer.no/slide/2081288/• Modellering av objektorienterte systemer:
http://aitel.hist.no/fag/oos/lek02/oos-ls-modellering.pdf• AnIntroductiontoUMLinSoftwareEngineering:
http://home.hit.no/~hansha/documents/subjects/IA4412/resources/uml/BScIaSysEngUML.pdf
• ...
TypesofUMLDiagrams
http://en.wikipedia.org/wiki/Unified_Modeling_Language
UMLDiagramsMainDiagrams:• RequirementsAnalysisPhase(WHAT):
1. UseCaseDiagrams• DesignPhase(HOW):
2. SequenceDiagrams(TypicallyoneSequencediagramforeachUseCase)
3. ClassDiagrams(justoneClassdiagramintotal)
UseCaseDiagram
http://en.wikipedia.org/wiki/Use_case
UseCaseExampleforaRestaurant:
Ausecaseisalistofsteps,typicallydefininginteractionsbetweenarole(knowninUMLasan"actor")andasystem,toachieveagoal.
Theactorcanbeahumanoranexternalsystem.
Actor
UseCase
SequenceDiagram
http://en.wikipedia.org/wiki/Sequence_diagram
ClassDiagram
19http://en.wikipedia.org/wiki/Class_diagram
UMLinVisualStudioEnterprise
http://channel9.msdn.com/Series/Visual-Studio-2012-Premium-and-Ultimate-Overview/Visual-Studio-Ultimate-2012-Improving-architecture-through-modeling
UseCaseandScrum(Agile)• TheTeamworkscloselytogetherwiththeProductOwner
• Lessneedfordetaileddescriptionsandrequirements
• Agile/ScrumusesUserStoriesinstead(whichcouldbeconsideredasalightversionofUseCase)
• TheUserStoriesarethebasefortheProductBacklogandtheSprintBacklog
UMLSummary• YoushouldcreateDesignandSpecifications(includingUML)before
youstartCoding• ButUMLcanalsobeusedtodocumentyourcodeafterwards
(ReverseEngineering)• UMLdiagramsisageneralmethod/standardtodojustthat• Thismakesiteasiertocreatestructuredcode• Agoodwaytodocumentyourcodeproperly.• Coderefactoring:UseUMLaspartofthecontinuouscode
improvementsprocess• Note!Ifyouupdatethecode,makesuretoupdatetheUMLandvice
versa!
Coding• MaketheoverallCodeStructureaccordingtotheUMLDesign
• StartcreatingClasses,etc.accordingtoyourUMLdesign
• MakesurethatyoucodereflectstheUMLdesignregardingclasses,etc.Ifyouupdateyourcode,youneedtoupdatetheUMLdiagramsandviceversa.
• Itisimportantthatwehaveaworkingsoftwareatalltimes(soitcanbereviewed,tested,etc.)!
Hans-PetterHalvorsen,M.Sc.
UniversityCollegeofSoutheastNorwaywww.usn.no
E-mail:[email protected]:http://home.hit.no/~hansha/