Open architectures, by definition, are changing. They're hard to maintain because it's difficult to see into the future when designing the API and anticipate every possible need. But if the API remains constant, and you've designed effective mechanisms for modifying by addition rather than rewriting (e.g. declarative configuration, data-driven applicatons), open architectures can be very effective.
There's nothing wrong with a closed architecture for those problems that are well known and relatively static. Open isn't always necessary. The choice has to do with the nature and rate of change.
A closed layered architecture means that any given layer (or tier) can only use the services of the next immediate layer, whereas in an open layer architecture a given layer can make use of any of the layers (or tiers) below it. Closed layer architecture promotes independence between layers by reducing dependencies.
发布评论
评论(2)
以下是 Bob Martin 对开放式和封闭式架构的最早定义之一:
http://www .objectmentor.com/resources/articles/ocp.pdf
根据定义,开放架构正在发生变化。 它们很难维护,因为在设计 API 时很难预见未来并预测每一个可能的需求。 但是,如果 API 保持不变,并且您已经设计了通过添加而不是重写进行修改的有效机制(例如声明性配置、数据驱动的应用程序),那么开放架构可能会非常有效。
对于那些众所周知且相对静态的问题,封闭式架构并没有什么问题。 开放并不总是必要的。 选择与变化的性质和速度有关。
Here's one of the earliest definitions of open and closed architectures from Bob Martin:
http://www.objectmentor.com/resources/articles/ocp.pdf
Open architectures, by definition, are changing. They're hard to maintain because it's difficult to see into the future when designing the API and anticipate every possible need. But if the API remains constant, and you've designed effective mechanisms for modifying by addition rather than rewriting (e.g. declarative configuration, data-driven applicatons), open architectures can be very effective.
There's nothing wrong with a closed architecture for those problems that are well known and relatively static. Open isn't always necessary. The choice has to do with the nature and rate of change.
封闭分层架构意味着任何给定层(或层)只能使用下一个直接层的服务,而在开放层架构中,给定层可以使用其下面的任何层(或层)。 封闭层架构通过减少依赖性来促进层之间的独立性。
A closed layered architecture means that any given layer (or tier) can only use the services of the next immediate layer, whereas in an open layer architecture a given layer can make use of any of the layers (or tiers) below it. Closed layer architecture promotes independence between layers by reducing dependencies.