Working with Microsoft ASP.NET
Overview
Common Language Runtime
Base Classes and Libraries
The root namespace for the Microsoft .NET Framework is the System
namespace.
Data
Web Forms and Web Services
Classes and Namespaces
Note Namespaces may change between the Beta 2 and the final release
versions of ASP.NET.
Server Controls
Web Services
A Web service is an application delivered as a service that can be integrated
with other Web services by using Internet standards. ASP.NET allows you to
use and create Web services.
For example, a company can assemble an online store by using the Microsoft
Passport service to authenticate users, a third-party personalization service to
adapt Web pages to each user’s preferences, a credit-card processing service, a
sales tax service, package-tracking services from each shipping company, and
an in-house catalog service that connects to the company’s internal inventory
management applications.
Web services provide the building blocks for constructing distributed Webbased
applications. ASP.NET files have an .aspx extension and Web services
have an .asmx extension. The technologies are similar; however, instead of
outputting HTML, a Web service outputs a computer-readable answer to the
input it receives.
For more information about Web services, see Module 6, “Using Web
Services,” in Course 2063B, Introduction to Microsoft ASP.NET.
Overview
- Introducing ASP.NET
- Creating Web Forms
- Adding ASP.NET Code to a Page
- Handling Page Events
- Discussion: ASP vs. ASP.NET
Microsoft® Active Server Pages (ASP) technology is widely used to create
dynamic Web sites and applications. However, ASP has several limitations,
such as the need for redundant and lengthy coding to accomplish simple goals.
To overcome these limitations of ASP, Microsoft has developed a new
technology called Microsoft ASP.NET, which is a part of the Microsoft .NET
strategy for Web development. ASP.NET is a unified Web development
platform that provides the services necessary for developers to build enterpriseclass
Web applications.
In this module, you will learn about the main features of ASP.NET and
discover the differences between ASP and ASP.NET. You will also learn about
server controls and see how to add server -side script to an ASP.NET page.
After completing this module, you will be able to:
- Identify the main features of ASP.NET.
- Identify the differences between ASP and ASP.NET.
- Describe the working model of ASP.NET.
- Describe the architecture of server controls.
- Add a Hypertext Markup Language (HTML) server control to a page.
- Access the properties and methods of server controls in code.
- Add event handlers for page events.
- Use the IsPostback property to handle postback forms.
Introducing ASP.NET
- The Microsoft .NET Framework
- ASP.NET Features
- Animation: ASP.NET Execution Model
In this section, you will read an overview of the Microsoft .NET Framework
and see how ASP.NET fits in. Next, you will learn about the various features of
ASP.NET and see a working model. You will also learn about the main
differences between ASP and ASP.NET.
The Microsoft .NET Framework
The Microsoft .NET Platform provides all of the tools and technologies that are
needed to build distributed Web applications. It exposes a consistent, languageindependent
programming model across all tiers of an application, while providing seamless interoperability with and easy migration from existing technologies.
The Microsoft .NET Platform is composed of several core technologies:
- The Microsoft .NET Framework
- The Microsoft .NET Building Block Services
- The Microsoft .NET Enterprise Servers
- Microsoft Visual Studio ® .NET
- Microsoft Windows. NET
The Microsoft .NET Framework is a set of technologies that is integral to the
Microsoft .NET Platform. It provides the basic building blocks for developing
Web applications and services. The Microsoft .NET Framework includes the
following components:
- Common Language Runtime
- Base class library
- Data
- Web forms and Web services
- WinForms
Common Language Runtime
The Common Language Runtime provides the programming interface between
the Microsoft .NET Framework and the programming languages available for
the Microsoft .NET Platform. It simplifies application development, provides a
robust and secure execution environment, supports multiple languages, and
simplifies application deployment and management. The run time loads and
runs code written in any run time-aware programming language. Code that
targets the run time is called managed code. Managed code simply means that
there is a defined contract of cooperation between natively executing code and
the run time itself. Responsibility for tasks like creating objects, making method
calls, and so on is delegated to the run time, which enables the run time to
provide additional services to the executing code.
The Microsoft .NET Framework includes classes that encapsulate data
structures, perform Input/Output (I/O), provide access to information about a
loaded class, and provide a way to invoke security checks. It also includes
classes that encapsulate exceptions and other helpful functionality such as data
access, server-side user interface (UI) projections, and rich graphical user
interface (GUI) generation. The Microsoft .NET Framework provides both
abstract base classes and class implementations derived from those base classes.
You can use these derived classes “as is” or derive your own classes from them.
The Microsoft .NET Framework classes are named using a dot-syntax naming
scheme that connotes a naming hierarchy. This technique is used to group
related classes logically together so that they can be searched and referenced
more easily. A grouping of classes is called a namespace. For example, a
program can use classes in the System.Data.SqlClient namespace to read data
from a SQL Server database.
The root namespace for the Microsoft .NET Framework is the System
namespace.
Data
Microsoft ADO.NET is the next generation of ActiveX® Data Object (ADO)
technology. ADO.NET provides improved support for the disconnected
programming model and also provides rich Extensible Markup Language
(XML) support. ADO was created to provide data services to traditional client
applications that were tightly coupled to the database; consequently it was not
effective for Web applications. ADO.NET was created with the characteristics
of Web applications in mind.
Web Forms and Web Services
ASP.NET is a programming framework built on the Common Language
Runtime that can be used on a server to build powerful Web applications.
ASP.NET Web forms provide an easy and powerful way to build dynamic user
interfaces. ASP.NET Web services provide the building blocks for constructing
distributed Web-based applications. Web services are based on the Simple
Object Access Protocol (SOAP) specification.
Win Forms
For applications that are based on Microsoft Windows®, the Microsoft .NET
Framework provides the System.Windows.Forms namespace to create the user
interface. You can use System.Windows.Forms to do rapid application design
(RAD). It provides inheritance in the same client user interface library. You can
build components by using inheritance and then aggregate them by using a form
designer such as Microsoft Visual Basic ®.
ASP.NET Features
- Multiple Language Support
- Increased Performance
Cache
- Classes and Namespaces
- Server Controls
- Web Services
ASP.NET is more than just the next version of ASP. It is a totally re-architected
technology for creating dynamic, Web-based applications. ASP pages use
the .asp extension and ASP.NET pages use the extension .aspx.
Note Both ASP and ASP.NET pages can be used on the same Web site.
Existing ASP pages will still work along with new ASP.NET pages; they do not
need to be converted into ASP.NET pages.
ASP.NET, with a host of new features, allows developers to write cleaner code
that is easy to reuse and share. ASP.NET boosts performance and scalability by
offering access to compiled languages. Some of the main features of ASP.NET
are described below.
Multiple Language Support
ASP.NET provides a true language-neutral execution framework for Web
applications.
You can currently use over 20 languages to build .NET applications. Microsoft
has compilers for Visual Basic, Microsoft Visual C#™ , Microsoft Visual C++®,
and Microsoft JScript®. Third-party vendors are writing .NET compilers for
Cobol, Pascal, Perl, and Smalltalk, among others.
The labs and the sample code in this course will use Visual Basic.
Increased Performance
In ASP.NET, code is compiled. When you request a page for the first time, the
run time compiles the code and the page itself, and keeps a cached copy of the
compiled result. When you request the page the second time, the cached copy is
used. This results in greatly increased performance because, after this first
request, the code can run from the much faster compiled version and the content
on the page does not need to be parsed again.
Classes and Namespaces
ASP.NET includes a range of useful classes and namespaces. Namespaces are
used as an organizational system— a way to present program components that
are exposed to other programs and applications. Namespaces contains classes.
Namespaces are like class libraries and can make writing Web applications
easier. Some of the classes included with ASP.NET are HtmlAnchor,
HtmlControl, and HtmlForm, which are included within the
System.Web.UI.HtmlControls namespace.
Note Namespaces may change between the Beta 2 and the final release
versions of ASP.NET.
Server Controls
ASP.NET provides several server controls that simplify the task of creating
pages. These server controls encapsulate common tasks that range from
displaying calendars and tables to validating user input. They automatically
maintain their selection states and expose properties, methods, and events for
server-side code, thereby providing a clean programming model.
For more information about using server controls, see Module 2, “Using Web
Controls,” in Course 2063B, Introduction to Microsoft ASP.NET.
A Web service is an application delivered as a service that can be integrated
with other Web services by using Internet standards. ASP.NET allows you to
use and create Web services.
For example, a company can assemble an online store by using the Microsoft
Passport service to authenticate users, a third-party personalization service to
adapt Web pages to each user’s preferences, a credit-card processing service, a
sales tax service, package-tracking services from each shipping company, and
an in-house catalog service that connects to the company’s internal inventory
management applications.
Web services provide the building blocks for constructing distributed Webbased
applications. ASP.NET files have an .aspx extension and Web services
have an .asmx extension. The technologies are similar; however, instead of
outputting HTML, a Web service outputs a computer-readable answer to the
input it receives.
For more information about Web services, see Module 6, “Using Web
Services,” in Course 2063B, Introduction to Microsoft ASP.NET.
G0 to Pages 1 2

No comments:
Post a Comment