AdvancedSoftwareEngineering
Lecture1:
IntroductiontoSoftwareEngineering
Prof.HaroldLiu
2
Content
Basicconceptofsoftwareengineering
Computerbasedsystemsengineering
SoftwareProcess
Basicelementsofsoftwareprojectmanagement
3
1.WhatisSoftware
Software=program+data+document
Customizedsoftware
Genericsoftware,Shrinkwrappedsoftware
Embeddedsoftware
Safetycriticalsoftware
COTS(CommercialOfftheShelf)
Iwillcreateasoftwaretoupdatethedatabase.
(somesoftware,apieceofsoftware,asoftwaresystem)
Categorizedbyitsfunctionalities,scale/size,operational
method,requiredreliability,etc.
4
2.WhatisSoftwareEngineering?
Fall,1968,NATOTechnicalCommitteeconvenednearly50
firstclassprogrammers,computerscientistsandindustry
giants,discusshowtocopewith"softwarecrisis".FritzBauer
atthemeetingforthefirsttimeputforwardthe"Software
Engineering"concept.
Theestablishmentanduseofsound engineeringprinciplesin
ordertoobtaineconomicallysoftwarethatisreliableand
worksefficientlyonrealmachines.” ‐‐‐ FritzBauer,1968
5
IEEEDefinition:Softwareengineeringis
(1)thesystematic,standardized,measurablemethodisapplied
tosoftwaredevelopment,operationandmaintenanceofthe
process,theupcomingengineeringappliedtosoftware
developmentprocessthinking
(2)researchinto(1)
Softwareengineeringgoals:lowcost,highquality,ontime
delivery
6
EssentialCharacteristicsofSoftwareEngineering
Concernedabouttheconstructionoflargeprograms
Howtocontrolthecomplexity
Constantlychangingsoftwarerequirements
Aimedatimprovingtheefficiencyofsoftware
development
Teamworkisthekeytothesuccessfulimplementationof
softwareengineering
Softwaremusteffectivelysupportitsusers
Culturalbackgrounddifferenceforsoftwareproduct
creation.
7
5.WhatisSoftwareProcess
Softwareprocessisthedevelopmentofsoftwareproductsfora
groupofactivitiesandtheirresults.
Allsoftwareprocesscontainsfourbasicactivities:Software
description,softwaredevelopment,softwarevalidationand
softwareevolution.
Differentsoftwareprocessesorganizedindifferentwaysinthese
fouractivities,whichmayaffecttheresultsoftheprogressof
events.
Differentbodiesmaybeusedtoproducethesametypeof
processproducts.
8
Benefits
Asoftwareprocessdefinesthatinordertoachievethegoals,what
peopleneedinwhatwayatwhattimewhatkindofworkdone (Goal,
Who,When,How,What)
ForCustomer,User,Developer,Manager,awidelyapplicable
softwareprocessallowsallstakeholderstobetterunderstandtheir
roleandothers’ role,aswhattodoatwhattime.
Promotetheintegrationprocesstoobtainthe"bestsoftware
process.“
Makethecompany'sinternaltrainingstandardized.
Duetotherepeatabilityofthesoftwareprocess,usefulforthe
developmentschedulearrangementsandcostestimates.
9
6.WhatisSoftwareProcessModel
ModelsandModeling
Softwareprocessmodelisbuiltfromaparticular
perspectiveonthenatureofthesoftwareprocess
description.
Softwareprocessmodelincludesavarietyof
activitiesthatareconstitutingthesoftwareprocess,
softwareproducts,aswellasallstakeholders
10
Fromadifferentperspectiveofthesoftwareprocess
described,yougetadifferenttypeofprocessmodels.They
are:
Workflowmodel:Describesthesequenceofaseriesof
activities,inputs,outputsandinterdependencie.Herewe
refer“Activities”ashumanactivity.
Datastreamoractivitymodel:thesoftwareprocessdescribed
asasetofactivities,eachofwhichcompletescertaindata
conversion.Thereferredlevelofactivityinthismodelis
belowtheworkflowmodel.
Role/actionmodel:Describesthedifferentrolesinvolvedin
thesoftwareprocessanditsresponsibleactivities.
11
Paradigm,Methodology
WaterfallModel
WaterfallModelwithMaintenanceCircle
WaterfallModelwithPrototyping
SpiralModel
VModel
PhasedDevelopmentModel
IncrementalandIterativeModel
RationalUnifiedProcess
12
7.Costsanddistributions
Softwarecostsdependontheadoptedsoftware
processandthetypeofsoftwarebeingdeveloped.
Generaldistributionof costs:
Description:Design:Development:Integrationand
Test(15:25:20:40)%
Highdemandsoftwaresystems:integration/testing
50:50%
Fromsoftwareevolution
Frommaintenance
Webbasedecommercesystem
13
8.Methodologies
StructuredMethod,byDeMarco,1978,YourdonE.
andConstantineL.et.al.
JacksonSystemDevelopment,1983
ObjectOrientedMethod,byBooch,1994;
Rumbaugh etal,1991Æ DesignPatterns
14
UML(UnifiedModelingLanguage)
In1994,OOprinciplehasbeenthroughouttheentire
softwarelifecycle,italreadyhasanimpacton50+
OOA&Dmethods.
UMLisakindofmodelinglanguageforvisualization,
decription,structuringanddocumentation,mainlyfor
theanalysisanddesignphaseofsystemmodeling.
15
UML2.0
1994
Booch Method
Rumbaugh OMT
Coad/Yourdon
FireSmith
Method
JacobsonOOSE
……
1995.10
UnifiedMethod0.8
1996.6UML0.9
12companiesincl
RationalformupUML
organization,andthen
UML1.0.
In1997.1,submittedto
OMG
1997.11.4,OMG
adoptedUML1.1
In2002,UML2.0is
published
16
RUP
ByIBMRational
Highlights
Usecasedrivenfunctionality
architecturecentricdesign
Iterativeandincrementaldevelopmentsimplementation
UsingUMLandothertools
17
TendencyforChangewhenUsingOO
Paradigm(Jacobsonetal.1995)
HighFunctionality
HighInterfacewiththeoutsideworld
MediumSequencesofbehavior
MediumPassiveobject’sattribute
LowLonglivedinformationstructures
LowObjectsderivedfromtheapplication
ProbabilityforchangeCharacteristicofSWproduct/project
18
9.WhatisCASE
ComputerAidedSoftwareEngineering(CASE)
Abunchoftoolstosupportthesoftware
enegnieeringprocess
Lowerendtools:togeneratecodes
Highendtools
todrawenterprisemodelandapplication
requirementsspecifications
19
10.ProblemsofSoftwareEngineering
Legacysystems
Changingrequirements
Delivery
Systemcomplexityanddetails(Marsprobefailure)
Technologicaluncertainty(andinturntheunderstandingof
developers)
Communicationbarriers
Requirementuncertainty
Constantchangesleadtothesoftwaredegradation
Artificialandthemarketrisk
Costs,reliability,productivity,reusabilityproblems
20
11.Moralresponsibility
Professionalethics isveryimportant
Alwayskeepemployerandclients’ informationconfidential
Realisticallyexpresshis/herabilitytowork,donotacceptwork
beyondthecapability.
Shouldbeawareofthelawsrelatedtopatents,copyrights,etc.
Avoidcomputermisuse.
ACM/IEEE/BCSandotherorganizationsissuedaCodeof
ProfessionalConductandEthics(involvingonlybasicmoral
behavior)
21
Content
BasicConceptofSoftwareEngineering
ComputerbasedSystemEngineering
SoftwareProcess
Basicelementsofsoftwareprojectmanagement
22
1.SystemOverallCharacteristics
Functional
Nonfunctional:reliability,security,privacy,safety
issues
Whatrelatesthesystemreliability
HW
SW
Operational
23
2.SystemandItsSurvivingEnvironment
Environmentisamusthave
Environmentwillaffectthesystem'sfunctionalityand
performance.
Intheenvironmentthereexisitaseriesofinteractionswith
othersystems.Thus,theenvironmentcanbetreatedasa
standalonesystem.
Systemsengineermustunderstandthesystemenvironment
Inmanycases,thesystemistochangetheenvironment.
Asystemcanbeaffectedbyenvironmentalchanges,andsucheffects
maybedifficulttoestimate.
24
3.SystemModeling
Systemmodelingdescribesthecomponentsofthesystem
andtheirrelationships(systemarchitecture)
Systemarchitectureisgenerallydescribedinblockdiagram.
Subsystems
Functionalcomponentscanbedividedintosixcategories:
Sensors:Gatherinformationfromtheenvironment.
Actuators:incurtheenvironmentalchanges
Computingcomponents:givenaninput,performcalculationsand
produceoutput.
Communications
Scheduling:coordinationofoperationsbetweencomponents.
Interface
25
4.ProcessforSysEngineering
Req Def
Sys Design
Component dev
Sys integration
Sys installation
Sys evolvement
Sun-set
26
Subsystemdevelopment:
Parallel
Frequentmodificationsbeyondthescopeofa
subsystemmayhappen(HW?SW?)
Systemintegrationbyincrementalprocess
Hardtoestimatetheexacttimingfora
subsystem
Accurateerrorpositioning(whichsubsystem
causesthefailure?)toreducethe
disagreementofdifferentsubcontractors
27
5.BuyingSoftwares
Whatisthebestwayofpurchase?Whoisthebest
provider?
Beforepurchasing,systemleveldescriptions and
architecturaldesignmustbedone,tomakesure
which“subsystem” needstobepurchased.
Whoisthecontractor,andwhoisthesubcontractor.
28
Client
Contractor
Subcon2Subcon1
Subcon3
29
Content
BasicConceptofSoftwareEngineering
ComputerbasedSystemEngineering
SoftwareProcess
Basicelementsofsoftwareprojectmanagement
30
1.SoftwareProcessModel
Anabstractrepresentationofthesoftwareprocess
Inpractice,multiplemodelsareused.
Fourkindsofmodels
Lifecyclemodel(waterfall)
Evolutionarydevelopmentmodel
Formalmethods
Reuseorienteddevelopmentmodel (OO)
31
Waterfall
Waterfall
ClassicLifeCycleModel
LinearSequentialModel
Prob Def
Req Analy
HighlevelDesign
Lowleveldesign
coding
testing
maintenance
Dependenciesbetweenany
twosubsequentstages
Deferdevelopmentafter
designs
Toensurequality
32
Pros
Developmentprocessisessentiallyinalinear
sequence,manageable
Basedon"clearandcomprehensive
requirements“,thus abletoachievesatisfactory
results
33
Costofchanges
Afterrelease
TheImpactofChanges
Definition
Development
1.5~6x
••••••
1x
60~100x
34
Proj Plan
Req Analy
HighlevelDesign
LowlevelDesign
Coding
Testing
Maintenance
Circle
Plan
Req Analysis
Operations
Justification
coding
design
WaterfallModel
withMaintenanceCircle
35
EvolutionDevelopmentModel
Basedontheinitialrequirement,firstdevelopa
prototypeforclients.Then,basedonthefeedback,
continuouslyimprovethesystemuntil satisfactory.
Requirementscanbeconstantlychanged.
Twowaysofdoingit:
Workingwithclientstogetheruntildelivery
Prototypeistounderstandtheclients’ needs.
36
Problemsofevolutiondevprocess
Whereis“process”?
Noclearsystemarchitecture
Inpractice,weusethecombinedmodel:
WaterfallModelwithPrototyping
VModel
PhasedDevelopmentModel
IncrementalandIterativeModel
SpiralModel
37
Maintenance
Req Analysis
HighlevelDesign
Lowleveldesign
Codingandunittesting
Integrationtesting
Delivery
Prototyping
Systemtesting
Validate
Verify
WaterfallModel
withPrototyping
38
VModel
39
PhasedDevelopmentModel
40
TheIncrementalandIterativeModel
IncrementalDevelopment
IterativeDevelopment
create
create
format
create
formatedit
create
More
styles
Easy
quick
create
More
styles
Paste
easy
create
styles
Paste
clumsy
41
ExamplesinAgile
42
BenefitsofIncrementalDevelopment
Candelivertheproductwithmainfunctionalities
withinshortperiodoftime
Graduallyincreasetheprovidedfunctionalities,so
thatusershaveampletimetolearnandadaptto
thenewproject
43
SpiralModel
44
BenefitsofSpiral Model
Softwarereuse
Softwarequalityisimportantfordev
Reduceunnecessary/surplustesting
Nodifferencebetweensoftwaremaintenanceand
development
45
RationalUnifiedProcess
Iterativeandincrementaldevelopment
Usecasedriven
ProjectManagement
Environment
BusinessModeling
Implementation
Test
Analysis&Design
Preliminary
Iteration(s)
Iter.
#1
Phases
ProcessWorkflows
Iterations
SupportingWorkflows
Iter.
#2
Iter.
#n
Iter.
#n+1
Iter.
#n+2
Iter.
#m
Iter.
#m+1
Deployment
Configuration&ChangeMgmt
Requirements
Elaboration TransitionInception Construction
Inaniteration,you
walkthroughall
workflows
46
FormalMethods
Similartothewaterfallmodel,but
Requirementdescriptionsarehighlyreplyon
mathematics(e.g.,notations,equations...)
Aseriesoftransformationsleadtoexecutable
programs
Cleanroom ProcessbyIBM
47
OperationalSpecificationModel
Operational
Specification
(problem
oriented)
Transformed
Specification
(implementation
–oriented)
TEST
Executeand
Revise
System
Requirements
(sometimesinformal
orincomplete)
Delivered
System
48
TransformationalModel
Transformn
Formal
Specification
problemoriented
Transform2
TEST
Comparewith
requirements;
Updateasneeded
System
Requirements
(sometimesinformal
orincom
p
lete)
Delivered
System
Transform1
FormalDevelopmentRecord
Sequenceof
transformations
Plusrationaleforthem
49
2.SoftwareDescriptions
Feasibilitystudyreport
Requirementanalysis
Requirementdescriptions
Requirementvalidations
50
3.SoftwareDesigns
Architecturaldesign
Subsystemabstractdescription
Interfacedesign
Componentdesign
Datastructuredesign
Algorithmdesign
51
4.SoftwareValidation
Unittesting
Functionalmoduletesting
Subsystemtesting
Systemtesting
Deliverytesting(α、β、λ)
52
5.SoftwareEvolution
Definition:Softwareevolutionisthetermusedinsoftware
engineering (specificallysoftwaremaintenance)toreferto
theprocessofdevelopingsoftware initially,thenrepeatedly
updatingitforvariousreasons.
Thenatureofsoftwareflexibilitydeterminesthatsoftware
evolutionisamust
AvoidexpensiveHWmodifications
Canberegardedasanintegratedprocessbetweendevand
maintenance
53
6.SoftwareAutomation
CASE
Limitations
Byessence,softwareengineeringisacreativeactivity
Softwareprocessemphasizestheteamwork
54
Content
BasicConceptofSoftwareEngineering
ComputerbasedSystemEngineering
SoftwareProcess
Basicelementsofsoftwareprojectmanagement
55
SoftwareProjectManagement
cleardistinctionwithotherprojectmanagement.
SoftwarePMneedstotakeavarietyofdifferenttasks,oneof
themostimportantactivitiesareprojectplanning,estimating
costsandschedulecontrol.
Projectmilestoneissththatisexpectedandplanned.When
reachingamilestone,PMneedstoreporttheprogresstothe
mangementboard.
Inordertoeffectivelytrack/controltheprojectprogress,PM
canuseavarietyofcharts/diagrams.
Shouldidentifyandassesstheprojectrisk,determinethe
likelihoodoftheserisksandconsequences.
56
1.WhattoManage?
Peoplemanagement
Costestimations
Qualitycontrol
Processimprovement
Softwareconfigurationmanagement
57
2.ProjectPlanning
Essenceistoestimatethepotentialrisksandadopt
effectivemethodtosolvetheproblems
Contents:
Projectplan
Qualityplan
Configurationmanagementplan
Maintenanceplan
Trainingplan
58
3.ResourcePlanning
PMneedstoestimatetheamountof“resources” to
useinordertocompletetheproject,andorganize
theseresourcesinanoptimalway.Theyare:
HW
SW
Costs
Space
People
Time
59
4.RiskManagement
Identifythepotentialrisksandmaketheplan,tomaximally
lowertheirimpacttotheproject
Threetypesofrisks
Productthathaveimpactonthesoftwarequalityand
performance
Projectthathaveimpactontheprojectprogressand
resources
Businessthathaveimpactonthesoftwarecompany
and/orclients
Howtomanagetherisks?
Identification,analysis,plan,andmonitoring
60
PotentialSoftwareRisks
BizPeer
competition
BizTechchange
SomeCASEtoolsareveryexpensiveproductPoorCASEperf
OverbudgetProject&
product
Underestimate
thesystemscale
Project&
product
Description
delay
inevitableprojectChangeofreq
e.g.,orderedHWisnotdeliveredprojectLackofHW
projectReorg
ExperiencedstaffsprojectStaffquit
Descriptions
TypeRisks
61
RiskAnalysis
NegligibleMediumCodes generated by CASE tools are
inefficient
TolerableHighUnderestimate the software size
Tolerable MediumLack of training
TolerableMediumClients not sure of the req
TolerableHighCASE tools cannot be used
SignificantHighUnderestimate the dev efforts (time)
SignificantMediumDatabase problem
SignificantHighRe-org
SignificantMediumReq change leads to re-design
SignificantMediumDefect on re-useable components
SignificantMediumStaff report sickness at important stage
SignificantHighLack of qualified staff
SignificantLowFinancial problems, to cut the budget
consequencePossibilityRisks
62
CausesofSoftwareRisks
ProgressisdelayedUnderestimatethesoftware
size,timing,defects
plan
Toomuchchanges,clientcomplaintsChange,misunderstanding,
communications
req
UsingtoolsarenoteasyCASE toolstools
Reorg,financialproblemsOrg
Tasksarenotassignedproperly,team
internalchaos
Recruitment,staffchanging
jobs,training
Staff
HW/SWdeliverydelay,exposestoo
manytechproblems
DB,reuseablecomponents,or
COTS
Tech
ExamplesPotentialrisksType
63
RiskManagementStrategies
PurposehighperformanceDBDBperformance
Draftareporttothemgmtteam,explaintheimpacttotheprojectReorg
Evaluatetheimpactofchange,increasethetraceabilityofthedev
process
Req change
PurposereliablecomponentsComponentdefect
Reformthedevteam,flexibletaskassignment,efficient
communications.
Staffsickness
Tellclientsthepotentialrisks/delaythismaycauserecruitment
Draftareporttothemgmtteam,explaintheimpacttotheprojectFinancialproblems
StrategiesRisks