Softwaredevelopmentapproaches(viewsandopinions)

上传人:xx****x 文档编号:240563442 上传时间:2024-04-15 格式:PPT 页数:35 大小:197.50KB
收藏 版权申诉 举报 下载
Softwaredevelopmentapproaches(viewsandopinions)_第1页
第1页 / 共35页
Softwaredevelopmentapproaches(viewsandopinions)_第2页
第2页 / 共35页
Softwaredevelopmentapproaches(viewsandopinions)_第3页
第3页 / 共35页
资源描述:

《Softwaredevelopmentapproaches(viewsandopinions)》由会员分享,可在线阅读,更多相关《Softwaredevelopmentapproaches(viewsandopinions)(35页珍藏版)》请在装配图网上搜索。

1、Software development approaches(views and opinions)Bjarne StroustrupAT&T Labs Research1My perspectiveResearcherResearch managerProgrammer/designerTeacherConsultant(not on a fee basis)C/C+communityUnix/WindowsSystems programming/embedded systemsNot primarilyITProductionApplications 2OverviewGeneralit

2、iesTool chainsProject-focused discussionProgramming techniquesC+based(thats what I know best)StandardsEverybody got a fewSo what can we do to make progress?(provocative horror show its Halloween)3GeneralitiesOur civilization runs on computersMore and more of a computer is softwareMore and more of ou

3、r environment contain computersWe needMore softwareBuilt in less timeMore reliableWith more“features”“High tech”v.s.“Cheap labor”Curious trends:lots of“tech”with expensive laborBecause software is crucial,money talks(shouts!)Makes it hard to make technical decisions4CommunitiesThe software developme

4、nt community has fracturedWeb designersVB programmersAnalysts/designersTraditional skilled programmersC/free-software hackersAcademic FP-communityLicensed company X internals specialistsThese groups dont understand each others languages,tools,and work methodsEach group has sub-groups who dont unders

5、tand each others languages,tools,and work methodsE.g.C,C+,Java,AdaThis is not just specializationTower of Babel5Modularity and communication“separating things are easy”Its having separate entities communicate thats hardHave“reuse”succeeded or failed?Certainly the hype was wrong(surprise!)Huge compon

6、entsCompilers,operating systems,communications packagesTiny componentssubroutinesMedium-sized componentsThis is where it gets interesting/difficultPlug-ins,some CORBA objects,some COM components,libraries6Buzzwords“Objects”are not everything(I promised you that they wouldnt be)Are useful in their pr

7、oper rolesIDLs(Interface Definition Languages)Try to become systems development platformsData definitions,actions,Language independencereduces expressiveness,has binding costsA language independent language is an oxymoronIntegrated development environmentsMonoliths,proprietary,try to do everything f

8、or everybody7Tool chainsI love ascii!(unicode is also ok)Human readable and writeableKey to modularityHard to make proprietaryExamplesUnix intermediary formatsHTMLXMLPostscriptSource code8A common,simple,problemSimple distributed computingNo shared memoryNo real masterSome communication asynchronous

9、Sometimes communications failSometimes modules failOnemoduleAnother moduleA third module9A common,simple,problemPick a module/communication systemCORBA,COM,.net,Java,Now,have you chosen?Programming languageVendorPerformance limitsDatabase systemDevelopment platformHardware supplierEducation for your

10、 developersCulture10XTI/XPRRelated problemsProgramming distributed systemsMarshalling/unmarshallingMultitude of IDL“standards”Poor C+bindingsSerializationXML reading/writingProgram manipulation11Distributed programming in ISO C+“as similar as possible to non-distributed programming,but no more simil

11、ar”/use local object:X x;A a;std:string s(abc);/x.f(a,s);/use remote object:remote_proxy x;x.connect(my_host);A a;std:string s(abc);/x.f(a,s);12Program manipulation:XTI/XPRC+sourceC+compilerSymbol table XPRgeneratorXPR RPCgeneratorObject codeXTIIDLXMLXTI13XPRstruct B int xx;Char*f(const int*);templa

12、testruct D:private virtual B,protected B2 int zz;char*(*f)(int);list vector lst;B:class xx:int publicf:(:*const int)*charD:class#base:B virtual private#base:B2 protectedzz:int publicf:*(int)*char publiclst:listvector publicC+sourceXPR14XPR(eXternal Program Representation)Easy/fast to parseEasy/fast

13、to writeCompactRobust:Read/write without using a symbol tableLR(1),strictly prefix declaration syntaxHuman readableHuman writeableCan represent almost all of C+directlyNo preprocessor directivesNo multiple declarators in a declarationNo,or MV(m,v2)/operator+(MV(m,v2),v3)-MVV(m,v2,v3)/operator=(v,MVV

14、(m,v2,v3)-mul_add_and_assign(v,m,v2,v3);18Function ObjectsFunction objectsEssential for flexibilityEfficientin practice,more so than inline functionsimportant:sort()vs.qsort()Some find them tedious to writeStandard function objectse.g.,less,plus,mem_funCan be automatically written/generatedVector v2

15、=m*v+k;/matrix and vector librariesfind_if(b,e,0 x&x=max);/lambda libraries19Object-oriented ProgrammingHide details of many variants of a concepts behind a common interfacevoid draw_all(vector&vs)typedef vector:iterator VI;for(VI p=vs.begin();p!=vs.end(),+p)p-draw();Provide implementations of these

16、 variants as derived classes20Class HierarchiesOne way(often flawed):class Shape/define interface and common stateColor c;Point center;/public:virtual void draw();virtual void rotate(double);/;class Circle:public Shape /*/void rotate(double)/*/;class Triangle:public Shape /*/void rotate(double);/*/;

17、21Class HierarchiesShapeCircleTriangleUsers22Class HierarchiesFundamental advantage:you can manipulate derived classes through the interface provided by a base:void f(Shape*p)p-rotate(90);p-draw();You can add new Shapes to a program without changing or recompiling code such as f()23Class Hierarchies

18、Another way(usually better):class Shape/abstract class:interface only/no representationpublic:virtual void draw()=0;virtual void rotate(double)=0;virtual Point center()=0;/;class Circle:public Shape Point center;double radius;Color c;/*/;class Triangle:public Shape Point a,b,c;Color c;/*/;24Class Hi

19、erarchiesShapeCircleTriangleUsers25Class HierarchiesOne way to handle common state:class Shape/abstract class:interface onlypublic:virtual void draw()=0;virtual void rotate(double)=0;virtual Point center()=0;/;class Common Color c;/*/;/common state for Shapesclass Circle:public Shape,protected Commo

20、n/*/;class Triangle:public Shape,protected Common /*/;class Logo:public Shape /*/;/Common not needed26Class HierarchiesShapeCircleTriangleUsersCommonLogo27Multiparadigm ProgrammingThe most effective programs often involve combinations of techniques from different“paradigms”The real aims of good desi

21、gnRepresent ideas directlyRepresent independent ideas independently in code28Algorithms on containers of polymorphic objectsvoid draw_all(vector&v)/for vectorsfor_each(v.begin(),v.end(),mem_fun(&Shape:draw);template void draw_all(C&c)/for all standard containersfor_each(c.begin(),c.end(),mem_fun(&Sh

22、ape:draw);template void draw_all(For first,For last)/for all sequencesfor_each(first,last,mem_fun(&Shape:draw);29Vintage 1997 slideOur suppliers prefer us to use their proprietary languages30StandardsFormal standardsISO,IEEEConsortiaCORBA,W3CCorporateMicrosoft,SunUsers are always underrepresented31W

23、hat can we do to make progress?Computer scienceHasnt had a Copernicus,a Galileo,a Tycho Brahe,or a NewtonNo accepted basic model of our worksNo accepted standard for what an experiment isNo accepted standard for measurementNo predictive integration of experimental results and mathHasnt had a Hippocr

24、atesNo accepted definition of professionalismAs a science or an engineering disciplineWe lack a shared scientific foundationWe lack a shared base of established practiceWe lack a shared culture(history,heroes)32What can we do to make progress?Huge gaps between“academic”understanding and industrial p

25、racticeMuch effective software development is cottage industry and craft“best practices”are often defeated in fair competitionMarketing dominatesNon-system builders make crucial technical decisionsWithout acknowledging that the decisions are technicalHuge variation between different groups doing sim

26、ilar projectsTools(incl.Languages)TechniquesSociology(separation of tasks,management style)33What can we do to make progress?We must measure and classifyMeasure things that are meaningful and usefulDevelop the ability to predictWe must develop tools for measurementPerformanceComplexityReliabilityEff

27、ectiveness of techniquesWho might be able to do this?Academia:no(doesnt have the right problems)Industry:no(doesnt have the freedom to experiment)Industry and academia:maybeGenius needed(methodologists cannot be primary)Its going to take far longer than we would like34What can we do to make progress

28、?Actually,Im mostly an optimistBecause we are making progressBut Im less of an optimist than I used to beEducationBetter educated people drowned by the half-educatedMarketing dominance of much educationTrainingAcademic disengagement from real-world problemsProgramming languagesMuch code in“Pidgin-C”Much emphasis on the half-educatedDesignStill lack of feedbackProcess obsessionToolsOften drown us in incidental complexityScienceIm still waiting35

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!