007.MVC Project Development Steps

Source: Internet
Author: User


Project starting point (requirement) registration
I. Demand analysis Users
Two. Design
Three. Implementation (coding phase): dbmy
1. Implementing the Database: Users
Create a database, create a table, and put the necessary initial test data as needed

2. Code implementation
Step A. Create a new project-ASP. NET MVC Template
Step b. Write the configuration file, set the connection string
Step c. The steps to complete the registration function and addition are similar to the steps of using addition 2
C.1>
Create model users, compile
[Basic correspondence of the entity class and the table in the database]
C.2>
Create controller Users
[Controller-noun]
Create method (Register) method name register
[Whether this feature is: interactivity] or: One request or two related requests
If it is two requests, define a pair of methods with the same name (overloads of the method)
[HttpGet] [HttpPost]
C.3>
1>
Create views, try names best and method names
[Best to create strongly typed views]
2>
Design view to implement input submissions
[View template-common notation]
In the controller two methods set the short point, test!
[Note Modify Global.asax file]
3>
Continue to design the perfect view
C.4>
The method of implementing the Post method body!

A.
Steps in the method body:
1>
Get input, auto complete [model binding]
2>
Processing
Preliminary treatment, primary treatment of core processing (verification, necessary modification)
3>
Output

B.
Core processing, if you want to implement and database interaction, then in the Model folder to add
Entity Access class: Userdal[? DAL]
Method parameters (Entity class object name)
Data access classes: SqlHelper, entities can be reused
Method parameters (String sql)
C.
Implementing Entity Access classes (4OP: adding and deleting)
D.
Implementing a Data Access class (select modification)
E.
Go back to the controller post method and call it.
Complete the Post method completely!

007.MVC Project Development Steps

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.