软件工程实践者的研究方法答案Word格式文档下载.docx
- 文档编号:22187952
- 上传时间:2023-02-03
- 格式:DOCX
- 页数:12
- 大小:25.32KB
软件工程实践者的研究方法答案Word格式文档下载.docx
《软件工程实践者的研究方法答案Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《软件工程实践者的研究方法答案Word格式文档下载.docx(12页珍藏版)》请在冰豆网上搜索。
13.3designprinciples
softwaredesignisbothaprocessandamodel.thedesignprocessisasequenceofstepsthatenablethedesignertodescribeallaspectsofthesoftwaretobebuilt.itisimportanttonote,however,thatthedesignprocessisnotsimplyacookbook.creativeskill,pastexperience,asenseofwhatmakes“good”software,andanoverallcommitmenttoqualityarecriticalsuccessfactorsforacompetentdesign.thedesignmodelistheequivalentofanarchitect’splansforahouse.itbeginsbyrepresentingthetotalityofthethingtobebuilt(e.g.,athree-dimensionalrenderingofthehouse)andslowlyrefinesthethingtoprovideguidanceforconstructingeachdetail(e.g.,theplumbinglayout).similarly,thedesignmodelthatiscreatedforsoftwareprovidesavarietyofdifferentviewsofthecomputersoftware.
basicdesignprinciplesenablethesoftwareengineertonavigatethedesignprocess.davissuggestsasetofprinciplesforsoftwaredesign,whichhavebeenadaptedandextendedinthefollowinglist:
?
thedesignprocessshouldnotsufferfrom“tunnelvision.”agooddesignershouldconsideralternativeapproaches,judgingeachbasedontherequirementsofthetheresourcesavailabletodothejob,andthedesignconceptspresentedinsection?
thedesignshouldbetraceabletotheanalysismodel.becauseasingleelementofthedesignmodeloftentracestomultiplerequirements,itisnecessarytohaveameansfortrackinghowrequirementshavebeensatisfiedbythedesignmodel.
thedesignshouldnotreinventthewheel.systemsareconstructedusingasetofdesignpatterns,manyofwhichhavelikelybeenencounteredbefore.thesepatternsshouldalwaysbechosenasanalternativetoreinvention.timeisshortandresourcesarelimited!
designtimeshouldbeinvestediepresentingtrulynewideasandintegratingthosepatternsthatalreadyexist.
thedesignshould“minimizetheintellectualdistance”
betweenthesoftwareandtheproblemasitexistsintherealworld.thatis,thestructureofthesoftwaredesignshould(wheneverpossible)mimicthestructureoftheproblemdomain.
?
thedesignshouldexhibituniformityandintegration.adesignisuniformifitappearsthatonepersondevelopedtheentirething.rulesofstyleandformatshouldbedefinedforadesignteambeforedesignworkbegins.adesignisintegratedifcareistakenindefininginterfacesbetweendesigncomponents.
thedesignshouldbestructuredtoaccommodatechange.thedesignconceptsdiscussedinthenextsectionenableadesigntoachievethisprinciple.
thedesignshouldbestructuredtodegradegently,evenwhenaberrantdata,events,oroperatingconditionsareencountered.welldesignedsoftwareshouldnever“bomb.”itshouldbedesignedtoaccommodateunusualcircumstances,andifitmustterminateprocessing,dosoinagracefulmanner.
designisnotcoding,codingisnotdesign.evenwhendetailedproceduraldesignsarecreatedforprogramcomponents,thelevelofabstractionofthedesignmodelishigherthansourcecode.theonlydesigndecisionsmadeatthecodingleveladdressthesmallimplementationdetailsthatenabletheproceduraldesigntobecoded.
thedesignshouldbeassessedforqualityasitisbeingcreated,notafterthefact.
avarietyofdesignconcepts(section13.4)anddesignmeasures(chapters19and24)areavailabletoassistthedesignerinassessingquality.
thedesignshouldbereviewedtominimizeconceptual(semantic)errors.thereissometimesatendencytofocusonminutiaewhenthedesignisreviewed,missingtheforestforthetrees.adesignteamshouldensurethatmajorconceptualelementsofthedesign(omissions,ambiguity,inconsistency)havebeenaddressedbeforeworryingaboutthesyntaxofthedesignmodel.
whenthesedesignprinciplesareproperlyapplied,thesoftwareengineercreatesadesignthatexhibitsbothexternalandinternalqualityfactors.externalqualityfactorsarethosepropertiesofthesoftwarethatcanbereadilyobservedbyusers(e.g.,speed,reliability,correctness,usability).internalqualityfactorsareofimportancetosoftwareengineers.theyleadtoahigh-qualitydesignfromthetechnicalperspective.toachieveinternalqualityfactors,thedesignermustunderstandbasicdesignconcepts.
13.4designconcepts
asetoffundamentalsoftwaredesignconceptshasevolvedoverthepastfourdecades.althoughthedegreeofinterestineachconcepthasvariedovertheyears,eachhasstoodthetestoftime.eachprovidesthesoftwaredesignerwithafoundationfromwhichmoresophisticateddesignmethodscanbeapplied.eachhelpsthesoftwareengineertoanswerthefollowingquestions:
whatcriteriacanbeusedtopartitionsoftwareintoindividualcomponents?
howisfunctionordatastructuredetailseparatedfromaconceptualrepresentationofthesoftware?
whatuniformcriteriadefinethetechnicalqualityofasoftwaredesign?
m.a.jacksononcesaid:
thebeginningofwisdomfora[softwareengineer]istorecognizethedifferencebetweengettingaprogramtowork,andgettingitright.fundamentalsoftwaredesignconceptsprovidethenecessaryframeworkforgettingitright.
13.4.1abstraction
whenweconsideramodularsolutiontoanyproblem,manylevelsofabstractioncanbeposed.atthehighestlevelofabstraction,asolutionisstatedinbroadtermsusingthelanguageoftheproblemenvironment.atlowerlevelsofabstraction,amoreproceduralorientationistaken.problem-orientedterminologyiscoupledwithimplementation-orientedterminologyinanefforttostateasolution.finally,atthelowestlevelofabstraction,thesolutionisstatedinamannerthatcanbedirectlyimplemented.wassermanprovidesausefuldefinition:
thepsychologicalnotionofabstractionpermitsonetoconcentrateonaproblematsomelevelofgeneralizationwithoutregardtoirrelevantlowleveldetails;
useofabstractionalsopermitsonetoworkwithconceptsandtermsthatarefamiliarintheproblemenvironmentwithouthavingtotransformthemtoanunfamiliarstructure...
eachstepinthesoftwareprocessisarefinementinthelevelofabstractionofthesoftwaresolution.duringsystemengineering,softwareisallocatedasanelementofacomputer-basedsystem.duringsoftwarerequirementsanalysis,thesoftwaresolutionisstatedintermsthatarefamiliarintheproblemenvironment.aswemovethroughthedesignprocess,thelevelofabstractionisreduced.finally,thelowestlevelofabstractionisreachedwhensourcecodeisgenerated.
aswemovethroughdifferentlevelsofabstraction,weworktocreateproceduralanddataabstractions.aproceduralabstractionisanamedsequenceofinstructionsthathasaspecificandlimitedfunction.anexampleofaproceduralabstractionwould
bethewordopenforadoor.openimpliesalongsequenceofproceduralsteps(e.g.,walktothedoor,reachoutandgraspknob,turnknobandpulldoor,stepawayfrommovingdoor,etc.).
adataabstractionisanamedcollectionofdatathatdescribesadataobject
chapter12).inthecontextoftheproceduralabstractionopen,wecandefineadataabstractioncalleddoor.likeanydataobject,thedataabstractionfordoorwouldencompassasetofattributesthatdescribethedoor(e.g.,doortype,swingdirection,peningmechanism,weight,dimensions).itfollowsthattheproceduralabstractionopenwouldmakeuseofinformationcontainedintheattributesofthedataabstractiondoor.
manymodernprogramminglanguagesprovidemechanismsforcreatingabstractdatatypes.forexample,theadapackageisaprogramminglanguagemechanismthatprovidessupportforbothdataandproceduralabstraction.theoriginalabstractdatatypeisusedasatemplateorgenericdatastructurefromwhichotherdatastructurescanbeinstantiated.
controlabstractionisthethirdformofabstractionusedinsoftwaredesign.likeproceduralanddataabstraction,controlabstractionimpliesaprogramcontrolmechanismwithoutspecifyinginternaldetails.anexampleofacontrolabstractionisthesynchronizationsemaphoreusedtocoordinateactivitiesinanoperatingsystem.theconceptofthecontrolabstractionisdiscussedbrieflyinchapter14.
13.4.2refinement
stepwiserefinementisatop-downdesignstrategyoriginallyproposedbyniklauswirth.aprogramisdevelopedbysuccessivelyrefininglevelsofproceduraldetail.ahierarchyisdevelopedbydecomposingamacroscopicstatementoffunction(aproceduralabstraction)inastepwisefashionuntilprogramminglanguagestatementsarereached.anoverviewoftheconceptisprovidedbywirth:
ineachstep(oftherefinement),oneorseveralinstructionsofthegivenprogramaredecomposedintomoredetailedinstructions.thissuccessivedecompositionorrefinementofspecificationsterminateswhenallinstructionsareexpressedintermsofanyunderlyingcomputerorprogramminglanguage...astasksarerefined,sothedatamayhavetoberefined,decomposed,orstructured,anditisnaturaltorefinetheprogramandthedataspecificationsinparallel.
everyrefinementstepimpliessomedesigndecisions.itisimportantthat...theprogrammerbeawareoftheunderlyingcriteria(fordesigndecisions)andoftheexistenceofalternativesolutions...
refinementisactuallyaprocessofelaboration.webeginwithastatementof
function(ordescriptionofinformation)thatisdefinedatahighlevelofabstraction.thatis,thestatementdescribesfunctionorinformationconceptuallybutprovidesnoinformationabouttheinternalworkingsofthefunctionortheinternalstructureoftheinformation.refinementcausesthedesignertoelaborateon
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 软件工程 实践 研究 方法 答案