N层与N层架构/设计

时间:2009-07-25 15:24:18

标签: layered

N-Tiered和N-Layered架构/设计意味着什么?

N-Tiered和N-Layered架构/设计之间有什么区别吗?

如果是,有什么区别?

3 个答案:

答案 0 :(得分:17)

人们经常互换使用这两个术语,因为他们可以将架构描述为多层次和多层次。我的看法是,层通常是指某种物理隔离,而层更多是逻辑分离。

例如,我会说一个典型的Web应用程序有一个前端 - 浏览器中显示的内容 - 以及在应用程序服务器上运行的实际应用程序逻辑和数据库。这可以称为3层,因为有数据库服务器,应用程序服务器和客户机。然而,同样可以轻松地引用数据库层,逻辑层和表示(或UI)层。

答案 1 :(得分:14)

N层是指系统(即服务器和客户端)的“分布式”层,而n层是指自包含程序中的层;虽然这两者经常互换使用,但有些人认为存在显着差异(如我上面提到的那个),如维基百科上Multitier architectureMultilayered architecture的第一段所示,解释了差异。 / p>

答案 2 :(得分:0)

这个SCEA Study Notes解释了分层和分层架构之间的JEE差异

Java EE系统的层级

* Client (GUI and Web): GUI directly interacts with web tier. Web uses browser, applets to interact with web server through HTTP. Responsible for direct presentation and interaction with user.
* Web components: processes web requests. Acts as mediator between clients and business components.
* Business: (solves domain-specific) business problems. The abstract business logic processing happens in this tier.
* Integration and Resource: handles connectivity with data stores and other (legacy) systems. 

Java EE系统的层

* Virtual platform (component APIs): used to implement/support business logic. API Components include: JavaBeans, Java Servlets, JavaServer Pages/Faces, Java Message Service API, Java Transaction API, etc.
* Application infrastructure (container): responsible for executing the application. Also provides services like: security, transactions, JNDI, and other connectivities.
* Enterprise services (OS): responsible for the execution environment of the application infrastructure. Provides computing time and access to (abstract) hardware.
* Compute and storage: the hardware or physical server. Provides computing power for the OS.
* Networking infrastructure: responsible for networking services.