Difference between frontend, backend, and middleware in web development

I was wondering if anyone can compare or compare the differences between the interface, backend and middleware ("middle end"?) Succinctly.

Are there any cases when they overlap? Are there any cases where they MUST overlap and the interface / backend cannot be separated? As for bottlenecks, which end is associated with which bottleneck?

+74
architecture web-services
Mar 11 '09 at 22:53
source share
5 answers

Here is one breakdown:

External level β†’ User interface level, usually consisting of a combination of HTML, Javascript, CSS, Flash and various server codes, such as ASP.Net, classic ASP, PHP, etc. Think of it as the closest user in terms of code.

Middleware, middle-tier β†’ One level back, usually called the "plumbing" part of the system. Java and C # are common languages ​​for writing this part, which can be seen as the glue between the user interface and data and can be web services or WCF components or other SOA components.

Base level β†’ Databases and other data warehouses are usually located at this level. Oracle, MS-SQL, MySQL, SAP, and various off-the-shelf software tools come to mind for this piece of software, which is the final data processing.

Overlapping can exist between any of them, since you could pour everything on one layer, for example, on the ASP.Net website, which uses the built-in AJAX function that generates Javascript, and the code behind it may contain database commands in which The code containing the code contains both the middle and back levels. Alternatively, you can use VBScript to act like all layers using ADO objects and merging all three levels into one.

Similarly, in some cases, a combination of middleware and a front or rear interface may be combined.

Bottlenecks usually have several different levels for them:

1) Working with databases or internal processing β†’ It can vary from salary or sales or other tasks when database bandwidth tires things.

2) Intermediate bottlenecks β†’ This may cause some web services to hit capacity, but the front and back have bandwidth to handle more traffic. Alternatively, there may be some server that is part of a system that is not part of the user interface or raw data, which could be a bottleneck using something like Biztalk or MSMQ.

3) Foreground bottlenecks β†’ This could be a client or server problem. For example, if you take a computer with a low level of access and load a web page consisting of a lot of downloaded data, the client may be where this bottleneck is. Similarly, a server can request requests in a queue if it is clogged with requests, for example, that Amazon.com or other sites with high traffic can receive from time to time.

Some of them are subject to interpretation, therefore they are not perfect by any means and YMMV.




EDIT: something that needs to be considered is that some systems may have multiple interfaces or a back-end. For example, a content management system is likely to have the ability for site visitors to view content that is an interface, but what about how content editors can modify data on a site? The ability to raise this data can be considered as an interface, since it is a component of the user interface, or it can be considered as a background, because it is used by internal users, and not for general viewing of the site. So there is something to say about it.

+57
Mar 11 '09 at 23:11
source share
β€” -

Generally speaking, people refer to the level of presentation of the application as its front end, their constant level (database, usually), as the back end, and everything that is between the middle level. This set of ideas is often referred to as three-tier architecture. They allow you to divide your application into more understandable (and verifiable!) Pieces; you can also reuse lower level code more easily at higher levels.

Which code is part of a level that is somewhat subjective; graphic designers tend to think about everything that is not a presentation as the back end, database people think about everything that is in front of the database, like the front end, etc.

However, not all applications must be separated in this way. It is certainly more work to have 3 separate subprojects than just opening index.php and hacking; depending on (1) how long you plan to support the application (2), how complicated you expect the application, you can refuse complexity.

+7
Mar 11 '09 at 23:43
source share

There are 3 questions in your question:

  • Define interface, middle and rear end
  • How and when do they overlap?
  • The usual bottlenecks associated with them.

What JB King described correctly, but this is a concrete, simple version, where in fact he compared the front, middle and bacn to the MVC level. He matched M to the back, V to the front, and C to the middle.

For many, this is just fine, as they come from an ugly world where even MVC is not applied, and you can have direct DB calls in the view.

However, in real complex web applications, you do have two or three different levels: front, middle, and back. Each of them can have an associated database and controller.

The external interface will be visible to the end user. It should not be confused with the front office, which is the user interface for parameters and front management. The interface will usually be a kind of CMS or e-commerce platform (Magento, etc.).

The middle end is optional and is the place of business logic. It will be based on PIM, an MDM tool, or some kind of user database where you enrich your products or your articles (for CMS). It is also the place where you code business functions that need to be shared between different interfaces (for example, between a PC interface and an API-based mobile application). Sometimes an ESB or tool like ActiveMQ will be your middle ground

The context will be the third level, which will depend on the source database or your ERP. This may mean that the API is coming in and reading from your ERP. This may be your supplier database if you are involved in e-commerce. In fact, it really depends on web projects, but it is always the central repository. It will be available either through a DB call, through an API, or a sleeping level, or a fully functional background application

This description means that the answer to the other 2 questions is not possible in this thread, because the bottlenecks really depend on what your 3 ends contain: what JB King wrote remains true for simple MVC architectures.

at the moment the question was asked (5 years ago), perhaps the MVC pattern was not yet so widely accepted. Now there is absolutely no reason why the MVC pattern will not be respected and the view will be tied to database calls. If you read the question "Are there any cases when they MUST overlap and the interface / backend cannot be separated?" in a broader sense, with three different components, then the time when the three-layer architecture is useless, of course. Think of a simple personal blog, you don’t need to pull external data or poll RabbitMQ queues.

+5
Jun 17 '14 at 9:46
source share

Here is an example of a real world that shows the front / middle / rear end.

General description:

  • Frontend is responsible for presenting data to the user. Note the interesting feature that you can have two different interfaces associated with one backend.
  • Backend provides business logic / data management.
  • Middleware (activemq in the picture) is responsible for the system in the system. integration between backends. It is usually installed as a standalone application. enter image description here

Overlap:

There may be a match between the interface and the backend. This is usually due to long-term problems with application maintenance and scalability. Quite common in legacy applications.

Most modern technology stacks encourage developers to strictly separate. For example, in the picture you can see that the backend of the first system has a leisure web service, which is a clear dividing line.

Narrow

Most bottlenecks are mostly caused by the database / network. Databases are in the backend. Regarding network issues, every connection goes through netowrk, so every connection can be slow. With good application design, these problems can be avoided to a large extent.

+3
Jun 13 '17 at 13:36 on
source share

As for networking and security, the backend is by far the most secure (should be) secure node.

The middle part, usually a web server, will be somewhat wild and cut off in many ways from a network of companies. The middle end of a node is usually placed in a DMZ and is segmented from a network with firewall settings. Most server side code analysis is handled on a mid-tier web server.

Going to the backend means going through the middle end, which has a carefully designed set of rules that allow / deny access to vital numbers that are stored on the database server (backend).

+1
Mar 11 '09 at 23:56
source share



All Articles