问题描述
最近我的一个朋友问我关于 N 层架构的问题,我能够通过示例向他解释 1、2 和 3 层架构.但是当我想给出超过 3 层的例子时,我被卡住了.我用谷歌搜索并寻求帮助,但找不到任何像样的例子.
Recently a friend of mine asked me about N-Tier architectures and I was able to explain to him about 1, 2 and 3 tier architectures with examples. But I was stuck when I wanted to give examples for more than 3 tiers. I googled and binged for help, but could not find any decent examples.
它被命名为 N-tier 的事实让我觉得N"可以是从 1 开始的任何数字.但我找不到任何关于 4 或 5 层的例子.
The fact that it is named N-tier makes me think that 'N' can be any number starting from 1. But I couldn't find any examples for 4 or 5 tier.
有人可以分享一些涉及 3 层以上的 N 层架构的例子吗?
Can somebody share some examples of N-tier architectures that involves more than 3 tiers?
推荐答案
- 基础服务:例如数据库、目录服务、文件和打印服务,硬件抽象.这一层越来越多地被称为平台.
- 业务领域层:应用服务器,如 JavaEE,包括 EJB、DCOM 或 CORBA 服务对象.提供业务功能,增加使用 SOA 和微服务.
- 演示层:例如Java Servlets/JSP、ASP、PHP.这一层将越来越多地包括 WebServices 作为业务层服务的代理和适配器.
- 客户端层:瘦客户端(如浏览器上的 HTML 页面)和富客户端(如 Java WebStart &闪光.
- 在 Java EE 中,通常将业务领域层划分为数据访问(实体 Bean)和业务服务(会话 Bean).
- 在企业 SOA(面向服务的架构)中,ESB(企业服务总线) 通常作为第 1 层和第 1 层之间的附加层存在.2. 它可能是平台供应的一部分.
- 在 Mashup 中,您可以在第 3 层和第 3 层之间有一个聚合层.4.
- In Java EE it is common to divide the Business Domain tier into Data-Access (Entity Beans) & Business Services (Session Beans).
- In an Enterprise SOA (Service Oriented Architecture) the ESB (Enterprise Service Bus) would typically exist as an additional tier between tiers 1 & 2. It may be part of the platform provision.
- In Mashups you could have an aggregation tier between tier 3 & 4.
被称为 N-Tier 的转变反映了从旧的客户端-服务器到第一个 3-Tier 然后是 4-Tier 的日益组件化架构的转变.层的定义特征是一个明确定义的接口,关注点分离.
The move to being called N-Tier is a reflection of the move to increasingly componentised architectures from the older client-server to first 3-Tier then 4-Tier. The defining characteristic of a tier is a clearly defined interface with a separation of concerns.
这篇关于4 层(用于 N 层)架构的示例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!