The volleyball scoring program of MVC--(ii) Structure outline design

Source: Internet
Author: User
Tags html form

This program is mainly based on the MVC4 framework, so that the application input, processing and output mandatory separation, so that software maintainability, scalability, flexibility and packaging has been improved,

The MVC application is divided into three core parts:Model,view, Controller.

One

Architectural Fundamentals:

MVC is a design pattern that makes it mandatory to separate the input, processing, and output of an application. UseAn MVC application is divided into three core parts: model, view, controller. Each of them handles their own tasks.

View 
A view is an interface that the user sees and interacts with. On the old-fashionedFor Web applications, the view is theHTML elements of the interface, in the newWeb application,HTML still plays an important role in the view, but some new technologies are emerging, includingMacromedia Flash and ElephantXhtmlXml/xsl,wml and some other identity languages and web services. 

How to handle an application's interface becomes increasingly challenging. mvc a big benefit is that it can handle many different views of your application. There is really no real processing happening in the view, whether the data is stored online or an employee list, as a view, it is simply a way to output data and allow the user to manipulate it.  

model  
Model represents enterprise data and business rules. In the three parts of MVC, the model has the most processing tasks. For example, it may use artifact objects such as ejbs and coldfusion components to process the database. The data returned by the model is neutral, meaning that the model is independent of 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, it reduces the repetition of the code.  

Controller   The
controller accepts user input and invokes models and views to complete the user's needs. So when you click the hyperlink in the web page and send the html form, the controller itself does not output anything and does any processing. It simply receives the request and decides which model component is called to process the request, and then uses which view to display the data returned by the model processing.  

Division of Responsibilities:

1, the view renders the user interaction interface.

2, the model provides data for multiple views

3, the controller handles the user's interaction

Module partitioning and interactive design:

A . Model: Binding Data

1. Encapsulate the required data.

Two . View: Renders the data to the user.

1.creatview--Effect: Insert data page and insert data into data table.

2.EditView ——— Role: Data modification page, showing the details of a piece of data, and can modify it.

3.deleteview--effect: Deletes a piece of data.

4.detailsview--function: A data detail page that shows the details of a particular piece of data.

5.indexview--function: Select the identity page, the user chooses the identity.

Three . Controller: Receives a user request for analysis to render the result back to the user

1.homecontroller--Main method: Select User, return "Indexview".

2.specatorcontroller--Main method: Return "searchindex.cshtml", return "searchju.cshtml", return "searchscore.cshtml".

3.scorecontroller--Main methods: Return "Indexview", return "Creatview", return "EditView", return "Deleteview", return " DetailsView ".

3.teamcontroller--Main methods: Return "Indexview", return "Creatview", return "EditView", return "Deleteview", return " DetailsView ".

3.jucontroller--Main methods: Return "Indexview", return "Creatview", return "EditView", return "Deleteview", return " DetailsView ".

The diagram of each module interaction is as follows:

The volleyball scoring program of MVC--(ii) Structure outline design

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.