设计模式与框架 [英] Design patterns vs Frameworks

查看:85
本文介绍了设计模式与框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能说明两者之间的真正区别是什么吗?

Can someone illustrate what really is the difference between the two?

推荐答案

即使它们是两个截然不同的东西,一个可以说他们都解决了软件体系结构问题

Even though they are two very different things, one can argue they both solve a software architecture problem


  • 设计模式可以解决许多软件体系结构问题(有关创建,行为,并发...)的信息,并使用不同的预定义 design 。 (设计是架构主题的实现

框架基于 好莱坞原则 (不要打电话给我们,我们打电话给您),您在其中实现指定的一些高级要求,并让框架完成其余工作,调用实现。

a framework is based on the Hollywood Principle ("Don't call us, we call you"), where you implement some high level requirements as specified, and leave the framework do the rest of the work, calling your implementations.

主要区别是范围内聚力


  • 设计模式具有 范围


  • 类设计模式(涉及类)

  • 业务设计模式(涉及业务工作流)

  • 应用程序设计模式(涉及应用程序)

框架有一个 范围

例如, 。 NET是一个框架 ,其组成为:

framework has a large scope:
For instance, .NET is a framework composed of:


  • 一种语言(C#)

  • 运行时环境(CLR)

  • 库的集合

    只需开发所需的内容,然后让.Net框架调用您的类即可。

这篇关于设计模式与框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆