Recognize web design patterns
This article is published in "Program Spring and Autumn" 2004 1
Summary
This article describes some basic methods and points for improving WebForm programming under the .NET framework.
Keyword
Design mode, ASP.NET, Webform, MVC, Page Controller, Front Controller, Page Cache
table of Contents
Introduction
Classic WebForm architecture
Design mode
WebForm in MVC mode
WebForm in Page Controller mode
Webform in Front Controller mode
Webform in Page Cache mode
Reference resources
Download address
Author information
introduction
I remember that Microsoft has just launched the ASP.NET, giving people the shock is that the development web program is no longer a traditional web page, and like the application application, the Microsoft is called WebForm. But two years later, there are quite a few developers still extend the idea of writing scripts to build another WebForm, without playing the advantage of ASP.NET, and this article hopes to inspire some new ideas to inspire readers through instances. .
Due to limited space, this paper is impossible to show the reader to the reader's WebForm through a complex web application, but if only a small program does not use the mode. For ease of understanding, I hope you can imagine it into a small module in a large system (if the code is part of the large system, it is very important).
The download address of all source programs is given at the end of this article.
Classic WebForm architecture
First, look at a simple application, the database is designed below, Portal is a parent table of the Subject, a pair of associations by PortalID, and the program needs to display different Subject lists according to Portalid.
Follow us to write WebForm's general habits, first drag and drop a DROPDOWNLIST on the page, a DataGrid, a Button control:
WebForm.aspx: