Architecture of CMS in ASP.NET

xiaoxiao2021-03-06  92

Author: BUILDER.COM in the company's regular meeting, your boss've arranged a new task. This task is not difficult, everything you have to do is to build a "simple" Microsoft .NET content management system (CMS) for your company's website. When you leave the conference hall, you may have just started to feel embarrassed: Why no one tried to get this task, you even remember that when you declare this project, you have a few colleagues hide, what is going on? You may not know, this new task will force you to learn many new technologies, such as HTML, JavaScript, ASP.NET, C #, SQL, XML, ADO.NET, .NET Remoting, network services, etc. You also need to master several concepts, such as N-layer (N-Tier) architecture, database development, version control, workflow, personalization, and security, etc. Whether you think this, you are undoubtedly a good project, because the development process will force you to learn a lot. The only regret is that no one will immediately realize how much enlightenment you have completed this "simple" project. There is a lot of articles to talk about building your "simple" CMS (content management system). Going along this road, we will explore numerous technologies and concepts related to CMS development. The technologies we mentioned in the opening article will appear one by one in our implementation. That let us start this series from the basic architecture (ie, three layers and multi-layer architectures). The CMS three-layer architecture I have been praised in the three-layer architecture of CMS (Content Management System), but it is already a long time. The CMS three-layer architecture and the standard three-layer client / server architecture are basically corresponding. The CMS three-layer architecture does not have something difficult to understand, all of which are some common things. Each layer of it corresponds to an element necessary in an architecture: interaction, operation (manipulation), and storage. These three layers are: indicating the layer - processing and the user's interaction, communication. Business Logic layer - Handling the information required by the user. Database Layer - All data processed by the storage system. The straightforward representation of the CMS three-layer architecture is shown in Figure A. The layers shown in Figure A are located on different machines. In fact, multiple layers may exist in the same computer, but distribute them in multiple computers, can better assign the CMS system load. Figure A

The CMS three-layer architecture CMS N layer architecture is simple, the CMS N layer architecture is to decompose the individual layers of the CMS three-layer architecture into multiple layers, as shown in FIG. The benefits of decomposition of layers is to make better coordination of each layer to increase system performance; this also makes the system on more computers, which can reduce the system due to the specified computer consumption, the bottleneck, Thereby, the system load is improved. Figure B

What is the layer of CMS N layer architecture representing? Although the representation is not more important than other layers, it is almost all glory - because it is the only layer of CMS users can see. This layer is responsible for the interaction of CMS and users. The representation is actually composed of two parts: the web client and the web server. The web client resides in the user's computer, usually used to accept the table (FORM) of the web browser. The web server is located on the web host address to generate a dynamic web page and form a form of a CMS system. The web client communicates with the web server side by "Request-Response". The web client issues a request to the web server, and the web server responds according to the request. The web client uses HTTP's request. Such as: Get / 1.0 User-Agent: Mozilla / 4.0 (compatible; msie 5.0; windows nt) host: www.contentmgr.comWeb Servers respond Using the http response. For example: http / 1.1 200 OKServer: Microsoft -IIS / 5.0Date: Thu, 12 Jul 2002 19:19:52 GMTConnection: Keep-AliveContent-Length: 1270Content-Type: text / htmlSet-Cookie: ASPSESSIONIDQQQGQGDC = MOFPDBPCPNIBACIBDCIOFCCL; path = / Cache-control: private < Body> ... HTML embedded in response from the web server, which indicates what content displayed by the browser; JavaScript is used to implement the basic functionality of the client. Recently, other technologies, such as the Java Applet and ActiveX components start popular, but the web server is initially issued, most of which use HTML, which includes the server to notify the client to use what HTML is used. Techniques to take over the response of the execution process behind. What is the logical layer of the transaction? Retest once, the function of the transaction logic layer can be placed on a single server (three-layer architecture), or can be distributed to multiple servers (N-layer architecture). The functionality of the transaction logic layer includes the following three parts: access (access and saving) the data of the database layer. Get data from the representation layer. Perform the necessary calculations and / or process data. The transaction logic layer acquires data from the database layer and processes the data based on the needs of the representation. The transaction logic layer can also obtain the data provided by the layer, and process it according to the needs of the database layer. Many logic of the CMS transaction logic layer is related to the other two layers. Under Microsoft.net, this logic is mostly reduced due to the help of ADO.NET, .NET Remoting, and Web servers. With the .NET, the most complex logic of this layer is used to process transaction logic for calculation and processing data tasks (with C # or Managed C ). What is the name of the database layer database layer tells us what its task is; it is used to process CMS data. An uncomfortable place is that its data storage and retrieval feature is not limited to the database. It can be a single or a series of flat files, which may be an XML format. However, data usually still exists in the database.

转载请注明原文地址:https://www.9cbs.com/read-105764.html

New Post(0)