软件的设计理念

Key Design Concepts

关键的设计概念

Managing complexity is the most important technical topic in software development.

管理的复杂性是软件开发中最重要的技术课题。

The goal of all software-design techniques is to break acomplicated problem into simple pieces. The more independent the subsystems are, the more you make it safe to focus on one bit of complexity at a time.

所有的软件设计技术的目标是打破复杂问题转化为简单的部分。更加独立的子系统,你越能集中在一个点一次安全的复杂性。

design characteristics

设计特点

Minimal complexity

最小的复杂性

* Avoid making “clever” designs. clever designs are usually hard to understand. Instead make “simple” and “easy-to-understand” designs.

*避免“聪明”的设计。聪明的设计通常是难以理解的。相反,使“简单”和“容易理解”的设计。

Ease of maintenance

维护方便

Loose coupling

松散耦合

Extensibility

可扩展性

Reusability

可重用性

High fan-in

高扇入

* having a high number of classes that use a given class. High fan-in implies that a system has been designed to make good use of utility classes at the lower levels in the system.

*具有大量的类,使用一个给定的类。高扇入意味着系统已经在系统中的低水平利用好实用类。

Low-to-medium fan-outside

低到中等风扇外

* having a given class use a low-to-medium number of other classes (<7)

*具有一个给定的类使用一个低的其他类介质数(<7)

Portability

可移植性

Leanness

消瘦

* designing the system so that it has no extra parts. a book is finished not when nothing more can be added but when nothing more can be taken away.

*设计系统使得它没有多余的部分。一本书没有完成时,没有什么可以说如果没有更多的可以带走。

Stratification

分层

* trying to keep the levels of decomposition stratified so that you can view the system at any single level and get a consistent view.

*尽量保持水平分层分解,使您可以查看系统在任何一个水平,得到一个一致的看法。

Standard techniques

标准技术

The steps in designing with objects

在设计对象的步骤

Identify the objects and their attributes (methods and data)

识别对象及其属性(方法和数据)

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-which parts will be public and which will be private.

确定零件的每个对象将是可见的其他对象的哪些部分将被公开,这将是私人的。

Define each object’s public interface

定义每个对象的公共接口

Form Consistent Abstractions

形成一致的抽象

Abstraction is the ability to engage with a concept while safely ignoring some of its details – handling different details at different levels.

抽象与概念的能力而安全地忽略一些细节的不同处理不同的细节–。

A good class interface is an abstraction that allows you to focus on the interface without needing to worry about the internal workings of the class.

一个好的类接口是一个抽象的概念,让你专注于接口,无需担心类的内部运作。

Design Building Blocks: Heuristics

积木:启发式算法设计

Encapsulate Implementation Details

封装实现细节

Encapsulate picks up where abstraction leaves off. you aren’t allowed to look at an object at any level of detail.

封装拿起抽象离开。你不可以看在任何级别的细节的对象。

Inherit – When Inheritance Simplifies the Design

–继承继承时的简化设计

Inheritance simplifies programming because you write a general routine to handle anything that depends on a door’s general properties and then write specific routines to handle specific operations on specific kinds of doors.

继承简化了编程,因为你写的去做任何事情,取决于门的一般性质,然后写具体的程序对特定类型的特定操作的门一般的常规处理。

Hide Secrets (Information Hiding)

隐藏秘密(信息隐藏)

Information hiding is part of the foundation of both structured design and object-oriented design. In structured design, the notion of “black boxes” comes from information hiding. In object-oriented design, it gives rise to the concepts of encapsulation and modularity and it is associated with the concept of abstraction.

信息隐藏技术是基础部分的结构化设计和面向对象设计。在结构设计中,“黑盒子”的概念来源于信息隐藏。在面向对象的设计,它增加了封装和模块化的概念,是抽象的概念,相关的。

One key task in designing a class is deciding which features should be known outside the class and which should remain secret.

在设计一个类是决定哪些功能应该知道班外,应保持秘密的一个关键任务。

Identify Areas Likey to Change

找出可能的变化

Accommodating changes is one of the most chanllenging aspects of good program design. The goal is to isolate unstable areas so that the effect of a change will be limited to one routine, class, or package.

适应变化是一个最具挑战性的方面良好的程序设计。我们的目标是隔离不稳定地区的这样一个变化的影响将是有限的一个例程,类,或包。

areas that are likely to change:

有可能改变地区:

Business rules

业务规则

Hardware dependencies

硬件的依赖性

Input and output

输入和输出

Nonstandard language features

不规范的语言特点

Keep Coupling Loose

保持松耦合

Coupling describes how tightly a class or routing is related to other classes or routines. The goal is to create classes and routines with small, direct, visible and flexible relations to other classes and routines.

描述如何紧密耦合类或路由到其他类或程序有关的。我们的目标是创建类和常规小,直接,可见柔性关系的其他类和例程。

Classes and routines are first and foremost intellectual tools for reducing complexity. If they’re not making your job simpler, they’re not doing thier jobs.

类和例程首先是降低复杂性的知识工具。如果他们不让你的工作更简单,他们没有做他们的工作。

Look for Common Design Patterns

寻找常见的设计模式

Popular Design Patterns

流行的设计模式

Abstract Factory

抽象工厂

Adapter

适配器

Bridge

Composite

复合材料

Decorator

装饰

Facade

立面

Factory Method

工厂方法

Iterator

迭代器

Observer

观察员

Singleton

独生子女

Strategy

策略

Template Method

模板方法

Design Practices

设计实践

Iterate

迭代

Design is an iterative process. You don’t usually go from point A only to point B; you go from point A to point B and back to point A.

设计是一个迭代的过程。你通常不会去从A点到B点只有;你从A点到B点回到A点

Divide and Conquer

分而治之

no one’s skill is big enough to contain all the details of a complex program, and that applies just as well to design. Divide the program into different areas of concern, and then tackle each of those area individually.

没有一个人的能力是大到足以包含所有的复杂程序的细节,这同样适用于设计。把程序划分成不同领域的关注,然后解决这些地区单独。

Top-Down and Bottom-Up Design Approaches

自上而下和自下而上的设计方法

Top-down design begins at a high level of abstraction. You define base classes or other nonspecific design elements. As you develop the design, you increase the level of detail, identifying derived classes, collaborating classes, and other detailed design elements.

自顶向下设计的一个高层次的抽象开始。你定义的基类或其他非特异性的设计元素。当你开发设计,增加你的详细程度,确定派生类,合作类,和其他详细的设计元素。

Bottom-up design starts with specifics and works toward genealities. It typically begins by identifying concrete objects and then generalizes aggregations of objects and base classes from those specifics.

自下而上的设计始于对genealities细节和作品。它通常首先确定具体对象和概括的对象和基类聚合这些细节。

Experimental Prototyping

实验样机

Collaborative Design

协同设计

Capturing Your Design Work

捕捉你的设计工作

Insert design documentation into the code itself

插入到代码本身的设计文档

Capture design discussions and decisions on a wiki

捕捉设计的讨论和决定维基

Write e-mail summaries

写电子邮件的摘要

Use a digital camera

使用数码相机

Save design flip charts

保存设计挂图

Use CRC cards

使用CRC卡片

Create UML diagrams a

创建UML图

时间: 2024-08-14 09:19:45

软件的设计理念的相关文章

多年收集的一些稀有软件2

QQ:365543212 Fuel Economy Calculator v1.1 B.001(汽车工程软件,用于预测车辆燃油消耗率,是目前此类软件中最为全面的,能接收从最新的发动机分析程序Engine Analyzer自动发送来的强大的游标和发动机规格) Psat v5.1 1CD ProScan.v5.1 1CD PowerFlow v3.3p3a for Linux 1CD(Exa公司的汽车外气流计算软件) Rotating Inertia Calculator v1.1 A.000(一款

初识EPC

一.EPC定义 EPC=Event-driven Process Chain(事件驱动过程链) EPC建模方法最初由Keller, N¨uttgens和Scheer博士在1992年发表的EreignisgesteuerteProzesskette(EPK)基础上形成的一种以状态变化驱动进行业务过程(流程)分析的建模方法,EPC的目标是为分层表达企业的抽象业务提供一组易于最终用户识别.简洁的符号和语法,其最简洁的语法可由三部分组成:功能(Functions).事件(Events)和逻辑连接符号.

短视频APP+不同类型社交应用发展分析+化妆品电商

短视频APP——昙花一现还是发展趋势? 在这个互联网与科技并行且飞速发展的时代,各种app不断涌入市场,其中短视频app便是一个典型,美拍,就成功入围2014年十大最火app.而短视频app也势必要成为发展趋势而绝非昙花一现,接下来就让我们一起分析一下它之所以能够引领时代潮流的种种原因. (一)时代背景 1.当前网络上的传播媒体十分多样,诸如微信,微博,QQ等都能够随时随地让人们分享自己的幸福,展示自己的风采,这样一来,便为短视频app提供了更广阔的交流发布空间. 2.短视频app的种类多种多样

架构师修练 I - 超级代码控

可实现的是架构,空谈是概念 So don't tell me the concepts show me the code!  “不懂编码的架构师不是好架构师” 好架构师都是超级代码控. 代码是最好的老师 从代码中学习设计的思想.方法是提升类库设计能力.印证你所了解的概念与理论这就是架构师看代码的观点. 基本准备 一个类库可能有数千个类上万个方法,应该如何去看呢? 在看代码前我们需要进行一些什么样的准备呢 ? 设计模式 - 最标准的23种设计模式基本上要有一个了解,可能一下子不能理解他们的用法,但

[EA]反向工程

最近正在接手Java维护项目iDrive,代码不多,大概在5~6K左右,但是里面的关系有点乱,于是想通过EA反向工程,从Java代码直接生成UML图,利于快速了解其代码结果.http://blog.csdn.net/jsutluo/article/details/6737240 搜索了下,下面这篇文档值得参考. ================通过eclipse生成UML图 笔者在多年的软件开发过程中,阅读过不少成熟软件的源码,通过参考借鉴先进软件的设计理念,少走了很多弯路.多年的经验告诉我要想

C#应用视频教程3.4 Halcon+C#测试

有了前面的基础后,我们来测试一下如何把程序做的更通用,首先是把初始化的方法修改一下,在初始化的时候传递过去HTuple这个对象(改成了全局的变量,以便于不同的方法调用) ? 其次需要有相机打开/相机关闭,图像保存/图像加载的功能(方便我们快速做测试),前面的相机操作已经讲过了,这里图像的加载也只是套用了前面的加载一个静态图像的功能(把绝对地址改成了参数),保存图像调用了Halcon的WriteImage方法 ? 这个方法可以参考范例write_image的这个范例学习(看他导出的C#的程序,稍微

由《战狼2》的角色定位来认识软件测试行业

点击链接加入QQ群 522720170(免费公开课.视频应有尽有):https://jq.qq.com/?_wv=1027&k=5C08ATe <战狼2>上映12天破30亿,成为这个夏天最火的电影.在<战狼2>里,吴京扮演的前特种兵「冷锋」深入非洲一个内乱严重的小国,和队友之间相互配合,完成一系列了不起的挑战,成功撤离了在当地工作的华侨. 在电影里,冷锋和伙伴们的表现让人热血澎湃.在现实生活中,你是否也希望能有像冷锋一样的好伙伴助你完成挑战?那就让小编带你认识认识软件测试这

商翼ERC企业管理软件的核心竞争优势

商翼ERC企业管理系统,历时七年研发完成,是全新一代.未来全面升级替换现行ERP系统的企业信息化管理云计算平台.平台首次采用ERC设计思想与理念,使用平台.行业.企业三级架构模式,是目前国内唯一可以根据企业不同要求,进行独立开发部署的管理系统:也是唯一能够集成客户管理.销售订单管理.财务管理.采购管理.仓库管理.生产管理.品质管理.OA办公.人力资源.行政管理.员工行为管理等完整企业管理功能为一体的云计算管理软件.相比市面上的ERP软件,商翼ERC有其核心竞争优势,具体如下: 拥有数十项核心首创

分布式系统的特点以及设计理念

分布式系统并不是什么新鲜词,在上个世纪七八十年代就已经有各种分布式系统出现.只是在互联网时代,分布式系统才大放异彩,尤其是Google更是把分布式系统运用到了极致.Google整个的软件构架都是基于各种各样的分布式系统,诸如Borg.MapReduce.BigTable等.正是这些分布式系统,使得Google可以处理高并发请求响应以及海量数据处理等.Apache旗下的Hadoop.Spark.Mesos等分布式系统,把大数据处理相关技术变得非常亲民,让更多企业客户体会到了分布式系统的便利. 一.