What are the benefits of an N-layered architecture

2019-07-11 01:41发布

What are the benefits of an N-layered architecture? How does that make an application better?

3条回答
家丑人穷心不美
2楼-- · 2019-07-11 02:19

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.
查看更多
姐就是有狂的资本
3楼-- · 2019-07-11 02:22

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
查看更多
我只想做你的唯一
4楼-- · 2019-07-11 02:23

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

查看更多
登录 后发表回答