什么是组件驱动开发? [英] What is Component-Driven Development?

查看:83
本文介绍了什么是组件驱动开发?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

组件驱动的开发一词开始得到广泛使用.与控制反转有关.

Component-Driven Development term is starting to get used widely, esp. in connection with Inversion of Control.

  1. 这是什么?
  2. 它可以解决什么问题?
  3. 什么时候合适,什么时候不合适?

推荐答案

这是什么?

What is it?

我认为您答案中的定义很好地涵盖了这个问题.虽然,我对此提出质疑,为什么定义包含组件需要显式定义其依赖关系.组件的一个典型示例是ActiveX控件-他们需要显式定义其依赖项吗?

I think the definition in your answer covers this question well. Although, I question why the definition includes that a component needs to explicitly define its dependencies. A canonical example of a component is an ActiveX control - do they need to explicitly define their dependencies?

它可以解决什么问题?

What problems does it solve?

管理复杂性.它试图让您仅考虑组件的实现来解决这一问题.一个人只需要编写组件,而不需要则必须考虑如何组合或管理它们.这是由组件外部的一些框架或基础结构完成的,而对组件作者而言并不重要.

Management of complexity. It seeks to address that by allowing you to only ever think about the implementation of the component. One should only need to author components, one should not to have to think about how to combine or manage them. That is done by some framework or infrastructure external to the component, and unimportant to the component author.

什么时候合适,什么时候不合适?

When is it appropriate and when not?

在琐碎的或一次性的应用程序中不一定合适.组件体系结构中的不良气味是,如果您花时间在思考或工作在基础结构上来管理和组合组件,而不是组件本身.

Not necessarily appropriate in a trival or throw-away application. The bad smell in a component architecture, is if you are spending time on thinking or working on the infrastructure to manage and combine components, rather than the components themselves.

这篇关于什么是组件驱动开发?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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