The three-tier structure of MVC is: user interface layer, business logic layer, and database layer.

Source: Internet
Author: User
Tags hp ux

Layer 2 client-server

Layer 3 client-middleware-Server

The three layers are: user interface layer, business logic layer, and database layer.
The user interface layer is responsible for processing user input and output to the user, but is not responsible for interpreting the meaning (for efficiency reasons, it may verify validity before the user input is transferred up ), this layer is usually developed using front-end tools (such as VB, Vc, and Asp). The business logic layer is the bond between the upper and lower layers, which establishes the actual database connection, generate an SQL statement based on your request to retrieve or update the database and return the result to the client. This layer usually exists in the form of a dynamic link library and is registered to the server registry) the interface that it communicates with the client conforms to a specific component standard (such as COM and CORBA) and can be developed using any tool that supports this standard; the database layer stores and retrieves data.

If you don't want to talk about the big concept, you can say that there are a lot of practical applications. The front-end uses Pb and Delphi to organize the interface and some necessary elements and perform simple processing (not involving databases). Middleware (IBM CICs, or BEA Tuxedo ), process the business parts that need to operate the database. For example, you can calculate the fees involved in an application form and then pass it to the front-end. The bottom layer is the database, and many large Oracle databases are used. Of course, the bottom layer is Unix. Currently, many of the Minicomputers are Sun Solaris and hp ux. In this case, middleware provides services and organizes themProgram. Take CICs as an example. There are three types of front-ends: C/C ++, Java, Pb/Delphi/VB. Because the middleware service itself is written in C/C ++/COBOL hybrid SQL (PRO C in Oracle), the C/C ++ interface is very simple, install a CICs client. Java uses some objects (never used), petabytes, and so on. It also needs to declare objects, just as simple as declaring non-sqlca transaction objects in petabytes. The communication between middleware and data follows the Xa specification and involves two groups of C APIs. If you are interested, please take a look. I don't know. Isn't that complicated?

Next let's talk about it.Why middleware?This is my understanding.
1. performance problemsIt mainly refers to accessing the database, which is the main bottleneck in the large system. There is no problem when there are few terminals for direct database connection. But think about the banking, telecommunications industry, and hundreds of terminal programs that are fully connected, a program will have many connections, and even powerful Oracle will not be able to stand it. In addition, frequent access to many short SQL statements will enable and disconnect many connections. High overhead. After middleware is used, it maintains a fixed number of connections with the database (some middleware collects money based on the number of connections), and from the line point of view, this line is better than the terminals in various places, short distance, and high speed and stability. All the key parts are processed in middleware, which will deal with databases in batches. There is another benefit. The database server is generally the same, and more consistency is the problem. Middleware servers support multiple servers, dynamically balancing loads, and connecting multiple servers to a DB server. It is easy to understand by drawing a chart, and you can increase the business volume in the future.

2. Security IssuesThe above industry is very important. Each terminal can directly operate the database, which means that the database has permissions. For example, the data of banks and China Telecom is money, which is very dangerous. In addition, you must pay attention to the transaction integrity during the interruption.

3. update and maintenanceAs the business part is centralized in middleware, updates are well updated. Think about hundreds of interruptions. Once the entire version goes wrong or is updated, it is a project.

4. scalabilityYou can add servers as mentioned above.
It should be noted that a layer is not slow, because the middleware is written in C/C ++ and SQL, and the compilation efficiency is very high.

The above are just some of my contacts. It is certainly not comprehensive and I am still learning it. I can search for it online using CICs or tuxedo and find many MiddlewareArticleSome are for commercial purposes. Don't trust them all.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.