设计模式---创建型模式


转载请注明来自:http://blog.csdn.net/ndzjx/article/details/77884906



























附美文一篇:(来自2017上半年软件设计师试题)



 

    The beauty of software is in its function,in its internal structure,   软件的美,在她的功能中,在她的结构中,也在她的团队创建她的方式中。
and in the way in which it is created by a team. To a user,a program        对于用户来说,一个程序通过直观简单的界面来呈现正确的功能,是美的。
with just the right features presented through an intuitive and simple       对于一个软件设计者,以简单直观的方式分隔内部结构,最小化内部耦合,是美的。
interface is beautiful.To a software designer,an internal structure         
that is partitioned in a simple and intuitive manner,and that minimizes     对于开发者和经理,一个积极的开发团队每周都会取的重大进展,生产无缺陷的代码,是美的。
internal coupling is beautiful.To developers and managers ,a motivated 
team of developers making significant progress every week,and producing 
defect-free code,is beautiful.There is beauty on all these levels.          所有这些层次,都存在‘美’。
    our world needs software--lots of software. Fifty years ago software     我们的世界需要软件--大量的软件。五十年前,软件是在几台大而昂贵的机器上运行的。
was something that ran in a few big and expensive machines. Thirty years     三十年前,是在大多数公司和工业环境中运行的。
ago it was something that ran in most companies and industrial settings. 
Now there is software running in our cell phones,watches,appliances,      现在我们的手机,手表,电器,汽车,玩具和工具都有软件,并且对于新的更好的软件的需求不会停止。
automobiles,toys,and tools. And need for new and better software never 
stops.As our civilization grows and expands,as developing nations build     随着文明的发展和扩大,随着发展中国家建立基础设施,随着发达国家努力实现更高的效率,
their infrastructures,as developed nations strive to achieve ever greater 
efficiencies,the need for more and more Software continues to increase.     越来越多的软件的需求不断增加。
It would be a great shame if,in all that software,there was no beauty.     如果在所有软件中没有‘美’的话,这将是一个极大的羞耻。
    We know that software can be ugly. We know that it can be hard to use,  我们知道软件可能是丑陋的。我们知道她可能很难使用,不可靠,不小心结构化。
unreliable ,and carelessly structured. We know that there are software      我们知道有些软件系统的纠结和粗心的内部结构使得它们变得昂贵和难以改变。
systems whose tangled and careless internal structures make them expensive   
and difficult to change. We know that there are software systems that present   我们知道有一些软件系统通过尴尬和繁琐的界面呈现其功能。 
their features through an awkward and cumbersome interface. We know that        我们知道有软件系统崩溃和不当行为。
there are software systems that crash and misbehave. These are ugly systems.    这些是丑陋的系统。
Unfortunately,as a profession,software developers tend to create more       不幸的是,作为一个专业,软件开发人员倾向于制造丑陋的系统,而不是美的系统。
ugly systems than beautiful ones.
    There is a secret that the best software developers know. Beauty is             这有一个优秀的软件开发者都知道的秘密。美比丑更成本低,美比丑更快。
cheaper than ugliness. Beauty is faster than ugliness. A beautiful software         一个美的软件系统相对于丑的软件系统,可以用更少的时间,更少的钱来建造和维护。
system can be built and maintained in less time,and for less money ,than an 
ugly one. Novice software developers don't. understand this. They think that        新的软件开发者不知道这个。他们认为他们必须快速,快速地做一切。
they have to do everything fast and quick. They think that beauty is impractical.   他们认为美是不切实际的。
No! By doing things fast and quick,they make messes that make the software stiff, 大错特错!他们快速,快速地做一切,使软件僵硬,难以理解!
and hard to understand,Beautiful systems e flexible and easy to understand.        而美的系统是灵活易懂的。
Building them and maintaining them is a joy. It is ugliness that is impractical.    建造和维护她们是一种乐趣。相反,丑陋才真正是不切实际!
Ugliness will slow you down and make your software expensive and brittle.           丑陋会减慢你的速度,使你的软件昂贵而脆弱。
Beautiful systems cost the least build and maintain,and are delivered soonest.     (最后告诉你)美的系统成本最低,维护成本最低,交货时间最短。
























  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Java设计模式是一组经过实践验证的面向对象设计原则和模式,可以帮助开发人员解决常见的软件设计问题。下面是常见的23种设计模式: 1. 创建型模式(Creational Patterns): - 工厂方法模式(Factory Method Pattern) - 抽象工厂模式(Abstract Factory Pattern) - 单例模式(Singleton Pattern) - 原型模式(Prototype Pattern) - 建造者模式(Builder Pattern) 2. 结构型模式(Structural Patterns): - 适配器模式(Adapter Pattern) - 桥接模式(Bridge Pattern) - 组合模式(Composite Pattern) - 装饰器模式(Decorator Pattern) - 外观模式(Facade Pattern) - 享元模式(Flyweight Pattern) - 代理模式(Proxy Pattern) 3. 行为型模式(Behavioral Patterns): - 责任链模式(Chain of Responsibility Pattern) - 命令模式(Command Pattern) - 解释器模式(Interpreter Pattern) - 迭代器模式(Iterator Pattern) - 中介者模式(Mediator Pattern) - 备忘录模式(Memento Pattern) - 观察者模式(Observer Pattern) - 状态模式(State Pattern) - 策略模式(Strategy Pattern) - 模板方法模式(Template Method Pattern) - 访问者模式(Visitor Pattern) 4. 并发型模式(Concurrency Patterns): - 保护性暂停模式(Guarded Suspension Pattern) - 生产者-消费者模式(Producer-Consumer Pattern) - 读写锁模式(Read-Write Lock Pattern) - 信号量模式(Semaphore Pattern) - 线程池模式(Thread Pool Pattern) 这些设计模式可以根据问题的特点和需求来选择使用,它们提供了一些可复用的解决方案,有助于开发高质量、可维护且易于扩展的软件系统。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值