欢迎来到麦多课文档分享! | 帮助中心 海量文档,免费浏览,给你所需,享你所想!
麦多课文档分享
全部分类
  • 标准规范>
  • 教学课件>
  • 考试资料>
  • 办公文档>
  • 学术论文>
  • 行业资料>
  • 易语言源码>
  • ImageVerifierCode 换一换
    首页 麦多课文档分享 > 资源分类 > PPT文档下载
    分享到微信 分享到微博 分享到QQ空间

    THE SOFTWARE DESIGN PROCESS.ppt

    • 资源ID:373352       资源大小:1.11MB        全文页数:38页
    • 资源格式: PPT        下载积分:2000积分
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    二维码
    微信扫一扫登录
    下载资源需要2000积分(如需开发票,请勿充值!)
    邮箱/手机:
    温馨提示:
    如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如需开发票,请勿充值!如填写123,账号就是123,密码也是123。
    支付方式: 支付宝扫码支付    微信扫码支付   
    验证码:   换一换

    加入VIP,交流精品资源
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    THE SOFTWARE DESIGN PROCESS.ppt

    1、THE SOFTWARE DESIGN PROCESS,CSCE 315 Programming Studio Spring 2010,Design when?,Software design activity that turns requirements to a plan or an outline of code When software design takes place varies (size, required quality, e.g., affect). Two opposite ends: Full detailed spec before anything prog

    2、rammed Design takes place during construction (at the keyboard)Usually a mix More often than not, some design in front of a keyboard,Outline,Challenges in Design Design Concepts Heuristics Practices,Challenges in Design,Design is a “wicked” problem Rittel, Webber 73 A problem that can only be (clear

    3、ly) defined by solving it Only after “solving” it do you understand what the needs actually are e.g. Tacoma Narrows bridge “Plan to throw one away” Problem of this class Design problems are not “wicked”,Challenges in Design,Process is Sloppy Mistakes Wrong, dead-end paths Stop when “good enough” It

    4、is not a bad thing that design is a sloppy activity Cheap to correct errors when nothing built yet Tradeoffs and Priorities Goodness of a design dependent on priorities Fast develoment time? Scalable? High-performance? Adaptable Designers task to strike the right balance Priorities can change,Challe

    5、nges in Design,Restrictions are necessary Constraints improve the result Force simplifications and generalizations Nondeterministic process Not one “right” solution A Heuristic process Rules of thumb vs. fixed process Emergent Evolve and improve during design, coding,Brooks: Accidental vs. Essential

    6、 Difficulties,Accidental difficulties have been and are addressed Better languages, better IDEs, better debuggers, etc. Essential difficulties unavoidable Even with a perfect programming language, software must precisely model parts of real world. This is inherently complex.,Primary goal of software

    7、 design,Managing Complexity,Managing Complexity,All other goals secondary Goal of minimizing complexity suggests two goals Minimize the amount of complexity that a human (programmer) must deal with at any one point of time Minimize accidental complexity,Levels of Design,Software system as a whole Di

    8、vision into subsystems/packages Classes within packages Data and routines within classes Internal routine designWork at one level can affect those below and above. Design can be iterated at each level,Key Design Concepts,Most Important: Manage Complexity Software already involves conceptual hierarch

    9、ies, abstraction Goal: minimize how much of a program you have to think about at once Should completely understand the impact of code changes in one area on other areas,Good Design Characteristics,Minimal complexity,Favor “simple” over “clever”,Good Design Characteristics,Minimal complexity Ease of

    10、maintenance,Imagine what maintainer of code will want to know Be self-explanatory,Good Design Characteristics,Minimal complexity Ease of maintenance Loose coupling,Keep connections between parts of programs minimized Avoid n2 interactions! Abstraction, encapsulation, information hiding,Good Design C

    11、haracteristics,Minimal complexity Ease of maintenance Loose coupling Extensibility,Should be able to add to one part of system without affecting others,Good Design Characteristics,Minimal complexity Ease of maintenance Loose coupling Extensibility Reusability,Design so code could be “lifted” into a

    12、different system Good design, even if never reused,It should be pointed out that the preparation of a library sub-routine requires a considerable amount of work. This is much greater than the effort merely required to code the sub-routine in its simplest possible form. Whe52,Good Design Characterist

    13、ics,Minimal complexity Ease of maintenance Loose coupling Extensibility Reusability High fan-in,For a given class, have it used by many others Indicates reuse effective,Good Design Characteristics,Minimal complexity Ease of maintenance Loose coupling Extensibility Reusability High fan-in Low-to-medi

    14、um fan-out,Do not use too many other classes Complexity management,Good Design Characteristics,Minimal complexity Ease of maintenance Loose coupling Extensibility Reusability High fan-in Low-to-medium fan-out Portability,Consider what will happen if moved to another environment,Good Design Character

    15、istics,Minimal complexity Ease of maintenance Loose coupling Extensibility Reusability High fan-in Low-to-medium fan-out Portability Leanness,Dont add extra parts Extra code will need to be tested, reviewed in future changes,Good Design Characteristics,Minimal complexity Ease of maintenance Loose co

    16、upling Extensibility Reusability High fan-in Low-to-medium fan-out Portability Leanness Stratification,Design so that you dont have to consider beyond the current layer,Good Design Characteristics,Minimal complexity Ease of maintenance Loose coupling Extensibility Reusability High fan-in Low-to-medi

    17、um fan-out Portability Leanness Stratification Standard Techniques,Use of common approaches make it easier to follow code later Avoid unneeded exotic approaches,Design Heuristics,Rules-of-thumb “Trials in Trial-and-Error” Understand the Problem Devise a Plan Carry Out the Plan Look Back and Iterate,

    18、Find Real-World Objects,Standard Object-Oriented approach Identify objects and their attributes Determine what can be done to each object Determine what each object is allowed to do to other objects Determine the parts of each object that will be visible to other objects (public/private) Define each

    19、 objects public interface,Form Consistent Abstractions,View concepts in the aggregate “Car” rather than “engine, body, wheels, etc.” Identify common attributes Form base class Focus on interface rather than implementation Form abstractions at all levels Car, Engine, Piston,Inheritance,Inherit when h

    20、elpful When there are common features,Information Hiding,Interface should reveal little about inner workings Example: Assign ID numbers Assignment algorithm could be hidden ID number could be typed Encapsulate Implementation Details Do not set interface based on what is easiest to use Tends to expos

    21、e too much of interior Think about “What needs to be hidden”,More on Information Hiding,Two main advantages Easier to comprehend complexity Localized effects allow local changes Issues: Circular dependencies A-B-A Global data (or too-large classes) Performance penalties Valid, but less important, at

    22、 least at first,Identify Areas Likely to Change,Anticipate Change Identify items that seem likely to change Separate these items into their own class Limit connections to that class, or create interface thats unlikely to change Examples of main potential problems: Business Rules, Hardware Dependenci

    23、es, Input/Output, Nonstandard language features, status variables, difficult design/coding areas,Keep Coupling Loose,Relations to other classes/routines Small Size Fewer parameters, methods Visible Avoid interactions via global variables Flexible Do not add unnecessary dependencies e.g. using method

    24、 that is not unique to the class it belongs to,Kinds of Coupling,Data-parameter (good) Data passed through parameter lists Primitive data types Simple-object (good) Module instantiates that object Object-parameter (so-so) Object 1 requires Object 2 to pass an Object 3 Semantic (bad) One object makes

    25、 use of semantic information about the inner workings of another,Examples of Semantic Coupling,Module 1 passes control flag to Module 2 Can be OK if control flag is typed Module 2 uses global data that Module 1 modifies Module 2 relies on knowledge that Module 1 calls initialize internally, so it do

    26、esnt call it Module 1 passes Object to Module 2, but only initializes the parts of Object it knows Module 2 needs Module 1 passes a Base Object, but Module 2 knows it is actually a Derived Object, so it typecasts and calls methods unique to the derived object,Design Patterns,Design Patterns, by “Gan

    27、g of Four” (Gamma, Helm, Johnson, Vlissides) Common software problems and solutions that fall into patterns Provide ready-made abstractions Provide design alternatives Streamline communication among designers,More on Design Patterns,Given common names e.g. “Bridge” builds an interface and an impleme

    28、ntation in such a way that either can vary without the other varyingCould go into much more on this,Other Heuristics,Strong Cohesion All routines support the main purpose Build Hierarchies Manage complexity by pushing details away Formalize Class Contracts Clearly specify what is needed/provided Ass

    29、ign Responsibilities Ask what each object should be responsible for,More Heuristics,Design for Test Consider how you will test it from the start Avoid Failure Think of ways it could fail Choose Binding Time Consciously When should you set values to variables Make Central Points of Control Fewer plac

    30、es to look - easier changes,More Heuristics,Consider Using Brute Force Especially for early iteration Working is better than non-working Draw Diagrams Keep Design Modular Black Boxes,Design Practices (we may return to these),Iterate Select the best of several attempts Decompose in several different ways Top Down vs. Bottom Up Prototype Collaborate: Have others review your design either formally or informally Design until implementation seems obvious Balance between “Too Much” and “Not Enough” Capture Design Work Design documents,


    注意事项

    本文(THE SOFTWARE DESIGN PROCESS.ppt)为本站会员(eveningprove235)主动上传,麦多课文档分享仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文档分享(点击联系客服),我们立即给予删除!




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1 

    收起
    展开