Web 开发中前端、后端和中间件的区别 [英] Difference between frontend, backend, and middleware in web development

查看:106
本文介绍了Web 开发中前端、后端和中间件的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有人可以简洁地比较/对比前端、后端和中间件(中间件"?)之间的差异.

I was wondering if anyone can compare/contrast the differences between frontend, backend, and middleware ("middle-end"?) succinctly.

是否存在重叠的情况?是否存在它们必须重叠且前端/后端不能分离的情况?在瓶颈方面,哪一端与哪类瓶颈相关?

Are there cases where they overlap? Are there cases where they MUST overlap, and frontend/backend cannot be separated? In terms of bottlenecks, which end is associated with which type of bottlenecks?

推荐答案

这里有一个细分:

前端层 -> 用户界面层通常由 HTML、Javascript、CSS、Flash 和各种服务器端代码(如 ASP.Net、经典 ASP、PHP 等)组成.认为这是最接近的以代码形式提供给用户.

Front-end tier -> User Interface layer usually consisting of a mix of HTML, Javascript, CSS, Flash, and various server-side code like ASP.Net, classic ASP, PHP, etc. Think of this as being closest to the user in terms of code.

中间件,中间层 -> 后一层,通常称为系统的管道"部分.Java 和 C# 是编写此部分的常用语言,可以将其视为 UI 和数据之间的粘合剂,可能是 Web 服务或 WCF 组件或其他 SOA 组件.

Middleware, middle-tier -> One tier back, generally referred to as the "plumbing" part of a system. Java and C# are common languages for writing this part that could be viewed as the glue between the UI and the data and can be webservices or WCF components or other SOA components possibly.

后端层 -> 数据库和其他数据存储通常在此级别.Oracle、MS-SQL、MySQL、SAP 和各种现成的软件会想到这个软件,它是数据的最终处理.

Back-end tier -> Databases and other data stores are generally at this level. Oracle, MS-SQL, MySQL, SAP, and various off-the-shelf pieces of software come to mind for this piece of software that is the final processing of the data.

任何这些之间都可以存在重叠,因为您可以将所有内容都倒入一个层中,例如 ASP.Net 网站,该网站使用生成 Javascript 的内置 AJAX 功能,而后面的代码可能包含数据库命令,使后面的代码包含两者中间层和后端层.或者,可以使用 VBScript 作为所有层,使用 ADO 对象并将所有三层合并为一层.

Overlap can exist between any of these as you could have everything poured into one layer like an ASP.Net website that uses the built-in AJAX functionality that generates Javascript while the code behind may contain database commands making the code behind contain both middle and back-end tiers. Alternatively, one could use VBScript to act as all the layers using ADO objects and merging all three tiers into one.

同样,在某些情况下,可以将中间件与前端或后端结合起来.

Similarly, taking middleware and either front or back-end can be combined in some cases.

瓶颈通常有几个不同的层次:

Bottlenecks generally have a few different levels to them:

1) 数据库或后端处理 -> 这可能与工资单、销售或其他任务不同,其中数据库的吞吐量使事情陷入困境.

1) Database or back-end processing -> This can vary from payroll or sales or other tasks where the throughput to the database is bogging things down.

2) 中间件瓶颈 -> 这将是一些 Web 服务可能达到容量但前端和后端有带宽来处理更多流量的地方.或者,可能有一些服务器是系统的一部分,而不是 UI 部分或原始数据,使用 Biztalk 或 MSMQ 之类的东西可能会成为瓶颈.

2) Middleware bottlenecks -> This would be where some web service may be hitting capacity but the front and back ends have bandwidth to handle more traffic. Alternatively, there may be some server that is part of a system that isn't quite the UI part or the raw data that can be a bottleneck using something like Biztalk or MSMQ.

3) 前端瓶颈 -> 这可能是客户端或服务器端问题.例如,如果您使用一台低端 PC 并让它加载包含大量下载数据的网页,则客户端可能是瓶颈所在.同样,如果服务器受到 Amazon.com 或其他高流量网站有时可能收到的请求的冲击,它可能会排队请求.

3) Front-end bottlenecks -> This could client or server-side issues. For example, if you took a low-end PC and had it load a web page that consisted of a lot of data being downloaded, the client could be where the bottleneck is. Similarly, the server could be queuing up requests if it is getting hammered with requests like what Amazon.com or other high-traffic websites may get at times.

其中一些内容有待解释,因此无论如何都不是完美的,YMMV.

Some of this is subject to interpretation, so it isn't perfect by any means and YMMV.

需要考虑的是某些系统可以有多个前端或后端.例如,内容管理系统可能会为网站访问者提供一种查看前端内容的方法,但是内容编辑器如何能够更改网站上的数据呢?提取这些数据的能力可以被看作是前端,因为它是一个 UI 组件,或者它可以被看作是一个后端,因为它被内部用户使用,而不是普通公众查看站点.因此,这里有一些上下文需要说明.

Something to consider is that some systems can have multiple front-ends or back-ends. For example, a content management system will likely have a way for site visitors to view the content that is a front-end but what about how content editors are able to change the data on the site? The ability to pull up this data could be seen as front-end since it is a UI component or it could be seen as a back-end since it is used by internal users rather than the general public viewing the site. Thus, there is something to be said for context here.

这篇关于Web 开发中前端、后端和中间件的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆