Layer-3 architecture-rethink, layer-3 rethink

Source: Internet
Author: User

Layer-3 architecture-rethink, layer-3 rethink

The third layer is over for a while, and I have summarized it above. In the previous article, I was wondering why I didn't knock on a login form for VB. NET.

Now, this blog shows you how to rethink about logging on to the form. I started to reconstruct the charging system of the data center. I knocked on a VB. NET version in the past two days.

Data center login form, suddenly found wrong, did not add the content in the design mode, so intend to re-push, the next step is to add the factory + reflection and then try again

And other models to create the legendary layer-7. But I still want to sum up, because this simple login form exactly describes the three layers.

The login form of VB. NET has a deep understanding of the three layers.

Link to the previous summary (http://blog.csdn.net/zhangzijiejiayou/article/details/38226135)

See the three-tier package diagram below.


This package diagram reflects the relationships between the UI, BLL, DAL, and Model. As we have already mentioned in the previous summary, we will not talk about it here.

In my previous blog, I also mentioned that the sequence chart can reflect the relationship between the three layers. In addition, the principle of the sequence chart is basically based on the three layers of thinking,

Although I didn't understand Layer 3 at that time, I only knew that there was a human-computer interaction interface and a judgment. There was a database where information flows between the three,

After learning the three layers, I felt suddenly enlightened and knew the specific mechanism of the data stream. With the basic three-tier architecture of the package diagram, I will lead you

Analyze how data streams are transmitted.

The following is a sequence chart of the login hull I drew.


In fact, with the time sequence diagram, we know how the data stream flows, and it is easier to get started after coding. The code will not be provided. I hope you will

Start thinking, think, and do it yourself.

I have been paying for the IDC for several days, and I have been thinking about it for several days. Although I have never had a clue, I have a better understanding of the three layers.

Previously, I went deep into it. Although there have been no clear progress in the past few days, a new understanding of previous knowledge is also a harvest.



What is a layer-3 architecture?

MVC is short for three words: Model, View, and Controller ). The purpose of the MVC model is to achieve the functional division of the Web system. The Model layer implements the business logic in the system, which can usually be implemented using a JavaBean or EJB. The View layer is used for interaction with users. It is usually implemented using JSP. The Controller layer serves as a bridge between Model and View. It can dispatch user requests and select an appropriate View for display, it can also interpret user input and map them to operations that can be performed at the model layer.

Directory

MVC and template concepts
How does MVC work? View
Model
Controller
Why use MVC?
Advantages of MVC: low coupling
High reusability and Applicability
Low Cost of Life Cycle
Rapid deployment
Maintainability
Conducive to Software Engineering Management
Disadvantages of MVC
Development Method Java Web Application Development
. NET Web Application development
Php Web Application Development
Common MVC Components
Introduction to Model 1 and Model 2 in Struts
Model 2
Struts structure and processing process
Development Using Struts Framework
MVC and template concepts
Model View Controller (MVC) Model-View-Controller MVC originally exists in objective t
In the op program, M is the exponential data model, V is the user interface, and C is the controller. Use MVCcopyright: Apple Inc.
The purpose is to separate the implementation code of M and V so that the same program can use different forms of representation. For example, you can use a column chart or pie chart to represent a batch of statistical data. The purpose of C is to ensure synchronization between M and V. Once M changes, V should be updated synchronously. Model-View-controller (MVC) is a software design model invented by Xerox PARC for programming language Smalltalk-80 in 1980s. It has been widely used. In recent years, it has been recommended to be the design model of Oracle's Sun Company Java EE platform, and is welcomed by more and more developers who use ColdFusion and PHP. Model-View-controller mode is a useful toolbox, which has many advantages but also has some disadvantages.
How MVC works
MVC is a design pattern that forcibly separates the input, processing, and output of an application. MVC applications are divided into three core components: model, view, and controller. They process their own tasks.
View
A view is the interface on which the user sees and interacts with it. For older Web applications, a view is an interface composed of HTML elements. In New Web applications, HTML still plays an important role in the view, however, some new technologies have emerged, including Macromedia Flash and some identification languages such as XHTML, XML/XSL, and WML and Web services. how to process the application interface becomes increasingly challenging. One major benefit of MVC is that it can process many different views for your applications. In fact, there is no real processing in the view. Whether the data is stored online or an employee list, as a view, it is just a way to output data and allow users to manipulate it.
Model
The model represents enterprise data and business rules. Among the three components of MVC, the model has the most processing tasks. For example, it may use component objects such as EJBs and ColdFusion Components to process databases. The data returned by the model is neutral, that is, the model has nothing to do with the data format, so that a model can provide data for multiple views. Because the Code applied to the model can be reused by multiple views only once, code duplication is reduced.
Controller
The Controller accepts user input and calls models and views to fulfill user requirements. Therefore, when you click a hyperlink on a Web page and send an HTML form, the controller does not output anything or process anything. It only receives the request and... the remaining full text>

Role of a layer-3 Architecture

Three layers: presentation layer (USL), business logic layer (BLL), data access layer (DAL)
1. Data access layer: it is the operation layer for raw data (in the form of database or text files that store data), instead

It refers to raw data, that is, operations on data, rather than databases, providing data services for the business logic layer or presentation layer.

2: business logic layer: This layer is mainly used to address specific problems. It can also be understood as a pair of operations on the data layer.

If the data layer is a building block, the logic layer is the construction of these building blocks.

3: Presentation Layer: It mainly indicates the WEB mode, or the WINFORM mode. The WEB mode can also be expressed

: Aspx. If the logic layer is quite powerful and complete, the logic layer can be improved regardless of how the presentation layer is defined and changed.

Provide services.

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.