Overview of ASP.NET[1]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

Overview of ASP.NET
ASP.NET consists of several different technologies, including Web Forms, Web
Services, server controls, HTML controls, and validation controls, as shown
in Figure 6.1. All these technologies, working together, make it possible
(and some might even say "easy") to create robust, maintainable, scalable
Web applications. You'll use Web Forms to lay out the user interface of
your applications, using server controls as the basis for user interaction.
(If you're importing an existing HTML or ASP page, you might use the other
set of controls, HTML controls, which don't provide as rich an experience
for users, nor are they as easy to work with, programmatically, as server
controls. For new pages, you'll most likely want to use the new server
controls.) In addition, the set of validation controls (actually, just a
subset of the total set of server controls) makes it easy for you to
validate user input, either on the client side, on the server side, or
both. Web Services provide a platform for creating distributed
component-based applications, and ASP.NET makes it easy to create and
consume Web Services.

Figure 6.1. ASP.NET includes many different technologies.


You will be introduced to each of these different technologies in this
chapter, and you'll explore them in further detail in subsequent chapters.

Web Forms
Web Forms are the heart and soul of ASP.NET. Web Forms are the user
interface (UI) elements that give your Web application its look and feel.
Web Forms are similar to the .NET Framework's Windows Forms (or even VB6's
forms) in that they provide properties, methods, and events for the
controls that are placed on them. However, these UI elements render
themselves in the appropriate markup language required by the request (in
this case, HTML). If you use Visual Studio .NET, you also get the familiar
drag-and-drop interface for creating the interface for your Web application.

When you create Web applications using Visual Studio .NET, Web Forms are
made up of two files: the visual portion (the ASPX file) and the code
behind the page, which resides in a separate class file. (Microsoft refers
to this separate file containing code as the page's code-behind file. We're
not kidding.) If you create Web applications outside Visual Studio .NET
(yes, it's possible, although it's not terribly productive), you can place
the user interface and the code in the same file. The layout information
will still be separated from the code, but both parts can exist within the
same file.

Web Forms and ASP.NET were created to overcome some of the limitations of
ASP. The new strengths of ASP.NET include the following:

Separation of the HTML interface from application logic

A rich set of server-side controls that can detect the browser and send out
appropriate markup language, such as HTML

Data binding capabilities of the new server-side .NET controls, which means
less code to write

An event-based programming model that is familiar to Visual Basic pro-
grammers

Compiled code and support for multiple languages, as opposed to ASP, which
supported only interpreted VBScript or JScript

Allowing third parties to create controls that provide additional
functionality

XML Web Services
XML Web Services make up the second portion of ASP.NET's functionality.
Developers have, for several years, required some means of executing
methods across the Internet梩hat is, some way to programmatically request
information or an action and then retrieve the results. A Web Service is an
object that can be called remotely (normally using HTTP) that solves this
need.

ASP.NET makes it easy for you to create Web Services, and any application
that understands how to work with XML data can consume the service.

NOTE

When you use an XML Web Service, under the covers, ASP.NET is using the
Simple Object Access Protocol (SOAP) standard for its messaging protocol.
This standard indicates how a Web Service consumer should package up its
method requests, and it specifies how a Web Service should send back its
results. As long as both sides (service and consumer) follow the SOAP
specification, any Web Service should be able to interact with any Web
Service consumer.



These Web Services may be written in any .NET language, or any language
running on any platform, as long as the Web Services follow the SOAP
specification. Web Services can also be called from any .NET language or
any language that has the capability to process SOAP envelopes and call
HTTP interfaces.

A Web Service created in .NET always returns an XML

本文关键:Overview of ASP.NET
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top