Wrox's C # Advanced Programming Third Edition Part 1 Chapter 1 (22-23)

xiaoxiao2021-03-06  114

1.4.1.1 Characteristics of ASP.NET

First, it is also the most important, the ASP.NET page is structured. That is to say, each page is a valid class inherited from .NET System.Web.ui.page, and you can override some methods, these methods will call throughout the page (you can think of these methods) ONApplication_Start and OnSession_Start events like it were similar to the ONApplication_Start events under the ASP. Because you can directly place the page directly in the event handler, the ASP.NET page is easy to understand.

Another advantage of the ASP.NET page is that you can create it with Visual Studio .NET, you can also create the commercial logic and data access components used here on the ASP.NET page with the same development environment. A Visual Studio .NET project or solution contains all files associated with an application. Moreover, you can also debug your ASP page in this editor, which is much better than the original Visual InterDev. Configuring the web server for InterDev and engineering to support them to debug a headache.

The clearest thing is that the post-code characteristics of ASP.NET allow you to further structure your method. ASP.NET allows you to isolate the server-side features on page code, individually in a class, this class will be compiled into a DLL file, and this DLL will be placed in the lower-level directory of the HTML section. The top of the page does not have a back code indication to connect the file and its DLL. When the hook is requested, the web server will initiate the corresponding events in the DLL file generated by the rear code generated by the page.

Finally, but it is also important, the increase in performance in ASP.NET is remarkable. Comparing classic ASP pages are interpreted, each request is interpreted, the web server caches the compiled ASP.NET page. This means that the request for the ASP.NET page will be much more faster than before.

ASP.NET also makes it easy to write an audio-based form, which you can use in your intranet. Traditional form-based applications provide a feature-rich user interface (rich client), but it is difficult to maintain them because of these user interface programs on different machines. For this reason, when people need a powerful user interface, people need to provide users with a wide range of support, people rely on form-based applications.

However, with the arrival of IE5 and Navigator 6, the advantages of form-based applications are increasingly not obvious. IE 5 is consistent with DHTML and fully sound support, allowing programmers to create web-based applications that are identical to the original rich client environment. Of course, such an application is necessary and standard in IE, but Navigator is not supported. In many industrial conditions, standardization is now normal.

1.4.1.2 Web Forms

In order to make the establishment web page easier, Visual Studio .NET provides Web Forms. They allow you to create an ASP.NET page with a way to create a Visual Basic 6 or C Builder window. The corresponding code will appear in the form by dragging a Toolbox space in the form. Finally, you only need to write programs for events in each space. When you use a C # to create a web form, you are actually creating a C # class inherited from the Page base class, and an ASP.NET page specifies that this class is its post code. Of course, you create a web form does not have to use C #, you can also use Visual Basic .NET or other .NET language.

In the past, difficulties in developing web applications have made many teams don't like to develop web applications. If you want to successfully develop web applications, you must master a lot of different technologies, such as VBScript, ASP, DHTML, JavaScript, and more. By applying the concept of the form to the web page, the Web makes web development quite simple. WEB control

The controls used in the web form are different from the ActiveX control. They are some XML tags in the ASP.NET namespace. When requested a page, the web jammer dynamically converts it to HTML and client scripts. Surprisingly, the web server can have several ways to perform the control of the server, and make corresponding transformations depending on the request of the requested visitors. This means that it is very simple to write a general user interface for the web page, and don't worry about your page, you will run on what kind of viewer, because Web considers it for you.

You can use C # or Visual Basic .NET to expand your web form toolbox. Building a new server-side control thing is very simple, implement .NET's System.Web.ui.WebControls.WebControl class is OK.

1.4.1.3 XML Web Service

Today, the HTML page occupies most applications in the World Wide Web. However, there is a way to communicate with each other in the Web of the device via an XML computer. In the future, the computer can use Web and XML to exchange information rather than adopting dedicated lines and proprietary formats, such as Electronic Data Interchange (EDI). The XML Web service is designed to serve the service Web, and the remote computer can provide dynamic information and analyze and reformat it before it is finally displayed. XML Web Services provides a simple way to provide information between computers in XML.

Technically, the XML web service on .NET is an ASP.NET page that returns XML instead of HTML to the client. Such a page contains a DLL that is derived from the back code from the Web Service class. Visual Studio .NET IDE provides an engine that simplifies web services development.

One organization mainly has two reasons to use XML Web services. The first reason is that the XML Web service is dependent on HTTP, and the XML Web service can utilize existing networks as a medium for information transmission. Another reason is that the data format XML used by the XML Web service is self-description, non-special, platform independent.

1.4.2 Creating Windows Forms

Although C # and .NET is ideal for developing web development, they still provide good support for the development of so-called fat client or client applications, which must be installed on the end user's machine and execute. These features are provided by Windows Forms.

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

New Post(0)