开发者

What are the benefits of an N-layered architecture?

What are the benefits 开发者_JAVA百科of an N-layered architecture? How does that make an application better?


From here:

  • Other applications will be able to reuse the functionality exposed by your layers.
  • You will be able to distribute your layers over multiple physical tiers. This can make a very good impact on your application by improving performance (sometimes), scalability and fault tolerance.
  • The maintenance of your application is easier because of the low coupling between layers.
  • Adding more functionality to your application is made easier.
  • Layers make your application more testable.
  • Building a well formed layers makes the orientation in your application more easier.
  • Having your application not layered means that you have to deal with all security threats in one place which is very difficult. Having your application distributed to layers makes it much easier for design and implement
  • Without a good deployment plan it is not trivial to distribute your layers over multiple physical tiers in distributed computing. You need to plan ahead your layers when you create a distributed application.


Maintenance of and enhancements to the solution are easier due to the low coupling between layers, high cohesion between the layers, and the ability to switch out varying implementations of the layer interfaces.

Other solutions should be able to reuse functionality exposed by the various layers, especially if the layer interfaces are designed with reuse in mind.

Distributed development is easier if the work can be distributed at layer boundaries.

Distributing the layers over multiple physical tiers can improve scalability, fault-tolerance, and performance. For more information, see the Tiered Distribution pattern.

Testability benefits from having well-defined layer interfaces as well as the ability to switch out various implementations of the layer interfaces.

Summary

Benifits are

  1. Reuse of layers
  2. Support for standardization
  3. Dependencies are kept local
  4. Exchangeability


Firs of all, layered architecture is a type of "Modular Design". Hence, in order to appreciate the benefits of layered architecture, one needs to know what modular design is. Secondly, it is a special type of modular design, specifically organized to manage dependencies in order to minimize tight coupling, thus achieving the objectives of modular design - autonomous modles/components. When we have autonomous/independent modules, then they can be reused, extended, tested, and so on, compared to the case where the architecture/design is not modular.

I have an article about layered architecture, where I discuss these things in more detail. It might be helpful.

Layered Architecture Explained

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜