18

N-Tiered 和 N-Layered 架构/设计是什么意思?

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

如果是,有什么区别?

4

3 回答 3

22

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

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

于 2009-07-25T15:37:49.133 回答
17

N层是指系统的“分布式”层(即服务器和客户端),而n层是指独立程序中的层;尽管两者经常互换使用,但有些人认为存在显着差异(就像我上面提到的那个),正如维基百科上多层架构多层架构的第一段所见解释了这种差异。

于 2009-07-25T15:35:40.837 回答
1

SCEA 学习笔记解释了分层架构和分层架构之间的 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. 
于 2010-11-09T22:45:08.897 回答