Contents
Overview 1
Presentation Tier Architecture 2
Overview of ASP.NET 12
ASP.NET Server Controls 19
ASP.NET Web Controls 25
Lab 4: Controlling the Presentation Tier
with ASP.NET 43
Review 51
Module 4: Designing the
Client Experience
Information in this document is subject to change without notice. The names of companies,
products, people, characters, and/or data mentioned herein are fictitious and are in no way intended
to represent any real individual, company, product, or event, unless otherwise noted. Complying
with all applicable copyright laws is the responsibility of the user. No part of this document may
be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose, without the express written permission of Microsoft Corporation. If, however, your only
means of access is electronic, permission to print one copy is hereby granted.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.
2001 Microsoft Corporation. All rights reserved.
Microsoft, Active Directory, ActiveX, BizTalk Server, FoxPro, FrontPage, Hotmail, Jscript,
Outlook, PowerPoint, Visio, Visual Basic, Visual C#, Visual C++, Visual Studio, Windows, and
Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the
U.S.A. and/or other countries.
Other product and company names mentioned herein may be the trademarks of their respective
owners.
Module 4: Designing the Client Experience iii
Instructor Notes
This module explains how the Microsoft
®
.NET Framework can be used to help
in building the presentation tier of an e-business Web site. Specifically, this
module focuses on the challenges facing presentation tier development, and it
then introduces new features of ASP.NET that can be used to ease the
development process and improve the client experience.
Special emphasis is placed on ASP.NET Web controls and validation controls
because these offer significant development time saving over traditional Active
Server Pages (ASP) development.
After completing this module, students will be able to:
Identify the requirements of a well-designed presentation tier from the
user’s perspective.
Explain the ASP.NET object model.
Describe the features of ASP.NET.
Describe how ASP.NET server controls and Web controls simplify client
development.
Materials and Preparation
This section provides the materials and preparation tasks that you need to teach
this module.
Required Materials
To teach this module, you need the following materials:
Microsoft PowerPoint
®
file 2260A_04.ppt
Module 4, “Designing the Client Experience”
Lab 4, “Controlling the Presentation Tier with ASP.NET”
Animation “ASP.NET Execution Model” in file 2260A_04A005.exe
Preparation Tasks
To prepare for this module, you should:
Read all of the materials for this module.
Complete the lab.
View the animation.
View the example ASP.NET pages that are mentioned in the module.
Presentation:
115 Minutes
Lab:
35 Minutes
iv Module 4: Designing the Client Experience
Multimedia Presentation
This section provides multimedia presentation procedures that do not fit in the
margin notes or are not appropriate for the student notes.
ASP.NET Execution Model
Present the animation titled “ASP.NET Execution Model” by using the
instructions provided in the following table.
Action Say this
Click First Request This is what happens when an .aspx is requested for the
first time.
The client sends a request for a page to the ASP.NET
server. (The request is in the Hypertext Transfer Protocol
(HTTP) GET form). In this animation, the client is
requesting the Hello.aspx page.
The server checks to see whether there is an existing
output cache for the requested page or if the requested
page is already compiled.
If there is no output cache or compiled code, the source
code for the page is interpreted by a parser, and a
compiler is invoked.
The compiler loads the page and compiles the code into
Microsoft intermediate language (MSIL).
The compiled MSIL code is used for returning the
requested page to the client.
Click Second Request When the client requests the same page the second time,
the server again checks for an existing output cache or
the compiled code.
If the server finds the compiled code, notice how the
compiler step is omitted and the compiled code is used
immediately for returning the request.
Click Output Cache This is the other case, when the server finds the requested
page in the output cache. In this case, notice how all of
the other steps are bypassed and the requested page is
directly returned from the output cache.
Module 4: Designing the Client Experience v
Module Strategy
Use the following strategy to present this module:
Presentation Tier Architecture
Discuss the technologies that can be used to create the presentation tier and
the requirements for a well-designed client experience.
Do not go into any more detail than what is covered in the section because
various technologies are expanded in the rest of the sections in this module.
Overview of ASP.NET
Provide an overview of ASP.NET in terms of its role in the .NET
Framework, execution model, and new features.
The most important concept to convey to the students is that ASP.NET
makes the development of Web applications a lot easier and a lot more
manageable than ASP.
ASP.NET Server Controls
Explain the role of server controls in developing the presentation tier and
the different types of server controls.
Explain that the aim of server controls is to allow developers to create
applications in a way similar to how they would use compiled language
tools, like Microsoft Visual Basic
®
. Stress that, because their code executes
on the server, the controls are not browser dependent.
ASP.NET Web Controls
Describe the types of Web controls in ASP.NET and how to add controls to
pages. Emphasize the benefits of using ASP.NET validation controls.
Lab 4, “Controlling the Presentation Tier with ASP.NET”
In this lab, students will use ASP.NET to enhance the presentation tier of
the LitWare Books e-business application. They will write list-bound code
to retrieve products from a database and then display them on a page.
Students will also use validation controls in the .aspx pages to ensure that
the data submitted by the shoppers is valid.
Module 4: Designing the Client Experience 1
Overview
Presentation Tier Architecture
Overview of ASP.NET
ASP.NET Server Controls
ASP.NET Web Controls
*****************************I
LLEGAL FOR
N
ON
-T
RAINER
U
SE
*****************************
This module describes the key issues associated with the design and
development of the presentation tier of an e-business Web site. In this module,
special emphasis is placed on Microsoft
®
ASP.NET technology and how it can
be used to simplify the development of the presentation tier.
After completing this module, you will be able to:
Identify the requirements of a well-designed presentation tier from the
user’s perspective.
Explain the ASP.NET object model.
Describe the features of ASP.NET.
Describe how ASP.NET server controls and Web controls simplify client
development.
Topic Objective
To provide an overview of
the module topics and
objectives.
Lead-in
This module discusses the
design and development of
the presentation tier of an
e-business site by using
ASP.NET.
2 Module 4: Designing the Client Experience
Presentation Tier Architecture
Presentation Tier Technologies
Architectural Requirements
Site Design Considerations
Improving Presentation Tier Performance
Using Forms
*****************************I
LLEGAL FOR
N
ON
-T
RAINER
U
SE
*****************************
To design the presentation tier of an e-business application, you must know the
requirements of the presentation tier and the technologies that can be used to
create the presentation tier. Also, you must be able to address all of the
architectural issues that are involved in delivering the usability, performance,
and scalability that is expected in a professional e-business Web site.
This section focuses on the requirements of a well-designed presentation tier
that can enrich the user’s experience.
Topic Objective
To describe the
presentation-tier
components and design
requirements.
Lead-in
In this section, you will learn
about the requirements of a
well-designed presentation
tier that can enrich the
user’s experience.
Module 4: Designing the Client Experience 3
Presentation Tier Technologies
*****************************I
LLEGAL FOR
N
ON
-T
RAINER
U
SE
*****************************
The presentation tier in e-business applications consists of a number of
technologies, ranging from the Web browser to the Web server. All of these
technologies are involved in creating the interface that is presented to the user.
Browsers
There are currently several browsers and browser versions available in the
software market. The two most popular browsers are Microsoft Internet
Explorer and Netscape Navigator. Despite the differences caused by the
products being manufactured by two different companies, the most critical
difference for a developer is the version of the browser software. The versions
can be divided into three groups:
Version 3
Version 3 browsers include Microsoft Internet Explorer 3.0 and Netscape
Navigator 3.0. In situations in which developers are targeting these clients,
they must assume that the client is capable of rendering only standard
Hypertext Markup Language (HTML) and that any scripting capability is
very limited. Scripts inevitably lead to more processing on the server.
Version 4
Version 4 browsers include Microsoft Internet Explorer 4.0 and Netscape
Navigator 4.5 and 4.7. These browsers support client-side scripting and
Dynamic HTML (DHTML).
Versions 5 and 6
Version 5 and 6 browsers include Microsoft Internet Explorer 5 and 5.5 and
Netscape Navigator 6. These browsers have Extensible Markup Language
(XML) support.
Topic Objective
To describe the
technologies available to the
developer of the
presentation tier.
Lead-in
The presentation tier
consists of various
technologies.
4 Module 4: Designing the Client Experience
HTML
The Web browser is responsible for rendering HTML. A basic Web page starts
with an <HTML> tag and ends with a corresponding </HTML> close tag.
Within these tags are additional tags that are nested to produce the final
document. The browser translates these tags into what is shown when the page
is displayed to the user. Recent browser versions that have support for XML
enable client-side script to process the data intelligently at the client, without
requiring a round-trip to the server. You can write client-side scripts to filter an
XML data document, sort the data into a different order, perform calculations
on the data, and add new XML content. For example, you can write scripts that
generate client-side XML to represent the new items in a shopping cart as the
user adds items to it.
Web Servers
Microsoft’s Web server is called Internet Information Services (IIS), and it is a
core part of the Microsoft Windows
®
operating system. The operation of a Web
server has developed from one in which the server simply delivered static
HTML pages to one in which dynamic content is built on the server before the
request from the Web browser is serviced. This dynamic content can be built
from information retrieved from other servers, both within the data center and
elsewhere on the Internet. IIS allows dynamic content to be created in several
ways:
Common Gateway Interface (CGI) applications
CGI is a Web programming interface that allows access to the Hypertext
Transfer Protocol (HTTP) stream. CGI executes a new process every time a
script is accessed, which can lead to performance issues on large sites.
Internet Services Application Programming Interface (ISAPI) applications
ISAPI is a low-level programming interface for Web application developers.
ISAPI applications are written in languages such as Microsoft Visual C++
®
.
These applications are compiled and are run on the Web server. ISAPI
applications are more scalable than CGI, thereby requiring the application to
be loaded into the Web server’s memory once for all clients that are using it.
ASP/ASP.NET Pages
Active Server Pages (ASP) are Web pages that contain scripting elements
that are run on the server. Common tasks for ASP pages are retrieving data
from a database and generating subsequent HTML or XML pages.
ASP.NET offers several improvements over ASP. ASP.NET is discussed in
the following sections of this module.
COM objects
Applications that are running on IIS can call Component Object Model
(COM) objects that have been written in more powerful languages, such as
Microsoft Visual Basic
®
and Visual C++. COM objects allow for the
encapsulation of programming logic and allow the calling application to
concentrate on invoking the correct method, properties, or events, without
requiring an understanding of how the object works internally.
Module 4: Designing the Client Experience 5
HTTP
HTTP is a communication protocol designed to transfer hypertext documents
between computers over the World Wide Web (WWW). HTTP defines a set of
commands and responses that browsers and servers use to complete various
tasks. By intercepting the HTTP request on the server, Web applications can
build dynamic responses to the user’s request.
6 Module 4: Designing the Client Experience
Architectural Requirements
State
Recognize users as they move from one page to another
Example: Cookies
Validation
Validate information submitted by the user on the client
before passing it to the server
Scalability
Cope with increase in users by
- Scaling out (adding more servers)
- Scaling up (adding more CPUs to existing servers)
*****************************I
LLEGAL FOR
N
ON
-T
RAINER
U
SE
*****************************
The architecture of an e-business site has to cope with various challenges and
still provide an intuitive dynamic interface for clients.
State
The ability to recognize users as they move from one page to another is a
critical requirement of an e-business site. Various mechanisms exist for the
maintenance of state and some, such as cookies, require support on the client.
You will learn about state management in detail in Module 5, “Managing the
Business Logic Layer,” in Course 2260A, Designing E-Business Applications
with Microsoft .NET Enterprise Servers.
Validation
As users fill in forms and submit information to the site, mechanisms must be
put in place to recognize if the user has filled in all of the required fields.
Certain validation could take place on the client. For example, if a user leaves a
field blank, the client could inform them before sending the data back to the
server. This is an architectural decision made by the developer.
Scalability
Another important issue in the design of a solution is the ability for the solution
to scale. This means the solution needs to be able to cope with additional
demands made by extra users. With an increase in the number of users, more
processing power will be required. This additional processing can be
implemented either by adding more CPUs to the existing machine or by adding
additional servers. A solution that has been scaled out by adding more servers is
termed a Web farm, and a solution that has been scaled up by adding more
CPUs to a single server creates a Web garden.
Topic Objective
To explain the technical
requirements that must be
considered when designing
the site architecture.
Lead-in
When designing the site
architecture, there are
technical requirements that
must be considered.
Module 4: Designing the Client Experience 7
Site Design Considerations
How many users will be visiting the site at any given
time?
How many servers will be needed to support the users
without service interruption?
How many transactions will take place on the site?
What are the peaks and dips during site activity?
What is the browse-to-buy ratio?
*****************************I
LLEGAL FOR
N
ON
-T
RAINER
U
SE
*****************************
The design of a site greatly depends on the specific scenario. The design will
also take into consideration factors other than those that are concerned with
only the presentation of data. For example, while designing your site, you must
have answers to the following questions:
How many users will be visiting the site at any given time?
• Given the number of users that are anticipated, how will the site
perform?
• If the number of visitors has been underestimated, what plans have been
prepared to expand the site?
This is a scalability issue.
How many servers will be needed to support the users without service
interruption?
• Will the user simply browse to a competitor and buy from them?
• Is the product available from only this site, in which case will they try
later?
• If the customer goes to a competitor’s site, have you lost one sale or
have you destroyed the relationship and lost all future sales?
This point concentrates mainly on the availability of the site. The cost
associated with a site being unavailable is hard to quantify.
How many transactions will take place on the site?
Apart from the expected number of users of your site, the number of
transactions will also have an impact on the design of the e-business
solution.
What are the peaks and dips during site activity?
Unfortunately, the site’s users do not spread their visits evenly throughout
the day. The site may have usage peaks, and it is critical that, when those
peaks occur, the site can cope with the traffic.
Topic Objective
To explain the factors that
impact the site design.
Lead-in
Consider the following
factors that will have an
impact on the design of the
site.
8 Module 4: Designing the Client Experience
What is the browse-to-buy ratio?
This is a critical measure in the design of e-commerce applications. As a site
designer, you must be aware that the users who have begun a purchase
transaction will have a much bigger impact on the server’s resources than
those who are browsing. This is because the site needs to store details about
the buyer’s shopping cart, delivery address, and so on.
The browse-to-buy ratio indicates the ratio of visitors who are likely to start
a purchase compared to visitors who are simply browsing the site.
After all of the preceding factors have been considered, you will be able to take
a measured approach to the design and navigation of the site.
Module 4: Designing the Client Experience 9
Improving Presentation Tier Performance
The Caching Process
Caching improves network performance by maintaining
a store of frequently accessed Web pages
ISA Server Caching Solutions
Forward caching
Reverse caching
Distributed caching
*****************************I
LLEGAL FOR
N
ON
-T
RAINER
U
SE
*****************************
You can improve the performance of the presentation tier in an e-business
solution by implementing a cache.
The Caching Process
Caching improves network performance by maintaining a store of frequently
accessed Web objects. As a user requests an object from a Web server, the
cache is checked. If the object can be supplied from the cache, the request is
serviced without impacting the Web server. If the request cannot be serviced
from the cache, the request is passed to the Web server. The Web server’s
response is returned to the browser and added to the cache for subsequent
requests.
ISA Server Caching Solutions
Microsoft Internet Security and Acceleration (ISA) Server 2000, a part of the
Microsoft .NET Enterprise Server family, offers an integrated caching and
security solution. It enables you to implement any of the following caching
solutions:
Forward caching
A common implementation of the ISA server involves installation at the
point at which a corporate high-speed local area network (LAN) meets the
Internet. Objects in the cache can improve the performance of Web
browsing for all users on the corporate LAN. This is called forward caching.
Although this solution improves the perceived performance for a particular
customer, it is of no real interest to the Web site developer.
Topic Objective
To provide an overview of
Web caching.
Lead-in
You can improve the
performance of the
presentation tier by
implementing a cache.
10 Module 4: Designing the Client Experience
Reverse caching
E-commerce solutions can implement reverse caching to provide external
clients with access to Web objects from an internal Web server. The ISA
Server, which is located in front of the Web server, forwards requests to the
Web server only when it cannot retrieve a requested object from its cache.
The ISA Server computer keeps external traffic away from the internal
network.
Distributed caching
Multiple ISA servers can be brought together in an array to offer distributed
caching. This array can be treated and managed as a single entity.
Distributed caching enhances performance through load balancing and
provides fault tolerance. Both forward and reverse caching can be
distributed.
The security features of the ISA Server are covered in Module 7,
“Integrating with External Systems,” in Course 2260A, Designing E-Business
Applications with Microsoft .NET Enterprise Servers. Further information about
the ISA Server is available in Course 2159A, Deploying and Managing
Microsoft Internet Security and Acceleration Server 2000.
Note
Module 4: Designing the Client Experience 11
Using Forms
Used to Receive User Input
Preserving User Input After Form Data Has Been Posted
to the Server Is Critical to Forms
ASP Forms
Write significant code to preserve user input after a post
ASP.NET Web Forms
Maintenance of state has been made easier
*****************************I
LLEGAL FOR
N
ON
-T
RAINER
U
SE
*****************************
Forms are used on most e-business sites as a mechanism for requesting
information from the user, such as user name, address, and e-mail address.
Though forms are easy to use from the user perspective, they do offer some
challenges to the developer, such as writing code to display the selection that a
user has previously made.
If a drop-down list box allows users to select a particular section of a Web site
that they wish to browse, it is important that the currently selected option is
preserved. If not, it becomes unclear to the users where they are in the site.
Preserving the user’s data is also important when encouraging a user to sign-up
for a service or complete an order form. If a field is completed incorrectly, a
well-designed presentation tier will preserve the information that the user
entered and ask them to re-enter only the missing or incorrect field. A form that
requires the user to enter every field again will prove annoying to visitors and
may lead to an increased number of users abandoning the transaction.
Using ASP or ASP.NET are the two ways of processing information that is
received from a form.
ASP Forms
Building forms by using ASP technology allows the developer to preserve the
option selected by the user after a form is posted. Although not complex, the
amount of code required for this can be significant.
ASP.NET Web Forms
The maintenance of state has been made easier with Web forms available in
ASP.NET. ASP.NET Web forms are compiled and run on the server, and they
are compatible with any Web browser client.
Topic Objective
To describe the importance
of retrieving data from the
user.
Lead-in
There are several ways of
retrieving information from
users when they visit your
site. Forms are one
standard approach.
12 Module 4: Designing the Client Experience
Overview of ASP.NET
The ASP.NET Execution Model
Multimedia: The ASP.NET Execution Model
ASP.NET Features
*****************************I
LLEGAL FOR
N
ON
-T
RAINER
U
SE
*****************************
ASP.NET offers many feature enhancements over ASP. The features are
numerous and many of them have an impact on how the client architecture is
developed. This section examines the ASP.NET execution model and explores
the features of ASP.NET. The latter sections in this module explain how
ASP.NET can simplify the development of the Web presentation and, at the
same time, enrich the user experience.
Topic Objective
To provide an overview of
the topics in this section.
Lead-in
ASP.NET is the new
Microsoft technology that
can be used for easy
development of the client
interface. It is part of the
.NET Framework.
Module 4: Designing the Client Experience 13
The ASP.NET Execution Model
ASP.NET
Code runs on the server
Generates client-side code if supported by the browser
Allows separation of code from HTML tags through
code-behind pages
(View mod4ex1.aspx and
codebehind.vb from Sampapps)
*****************************I
LLEGAL FOR
N
ON
-T
RAINER
U
SE
*****************************
One of the biggest challenges facing developers is ensuring that the code they
write works consistently with different browsers. ASP provides a solution by
allowing the developer to write code that runs on the server. Implementation of
this solution has been successful because it allows the developer to write code
that will execute in a known environment on the server instead of having to
develop two or three different versions of code that run at the client on different
browsers. However, to handle relatively simple requirements, such as
preserving the options a user has selected in a form, the developers have to
intersperse client-side HTML and server-side code in the .asp file. This leads to
complexity of code because there is no clear separation of the server-side code
and the client-side HTML in the .asp file.
ASP.NET builds on the foundation provided by ASP and at the same time
simplifies development. For example, ASP.NET can automatically determine
the capabilities of the browser and where it is supported and can delegate
subsequent work—such as stepping through a calendar or validating an input
box—back down to the client.
ASP.NET also allows for the separation of code from the HTML tags in an
approach called code-behind pages. This technique is very simple. The code is
kept separate from the .aspx page and is included by using a directive, as shown
in the following example:
<%@ Page Language="VB" Inherits="MyCodeBehind"
Src="CodeBehind.vb" %>
Unlike ASP pages, which use the .asp extension, ASP.NET pages use the
extension .aspx.
Topic Objective
To describe how ASP.NET
code is executed.
Lead-in
ASP.NET code runs on the
server and transmits
standard HTML to the client.
Delivery Tip
While explaining code-
behind pages, demonstrate
the concept by opening
mod4ex1.aspx
and
codebehind.vb
in the
\InetPub\WWWRoot\2260\
Sampapps folder.
Note
14 Module 4: Designing the Client Experience
Multimedia: The ASP.NET Execution Model
*****************************I
LLEGAL FOR
N
ON
-T
RAINER
U
SE
*****************************
To see an animation on how ASP.NET pages are processed on the server, run
the ASP.NET Execution Model media element on the Student Materials
compact disc.
The following graphic illustrates the ASP.NET Execution model:
Topic Objective
To describe the ASP.NET
execution model.
Lead-in
In this animation, you will
see how ASP.NET pages
are processed on the
server.
Delivery Tips
Play the animation
2260A_04A005.exe on the
Student Materials compact
disc.
For details on how to
present the animation, see
the Multimedia Presentation
section in the Instructor
Notes for this module.
Module 4: Designing the Client Experience 15
ASP.NET Features
Increased Performance
Multiple Language Support
Server Controls
Web Services
*****************************I
LLEGAL FOR
N
ON
-T
RAINER
U
SE
*****************************
There are many features of ASP.NET that make it easier for developers to build
cross-platform Web pages quickly. Some of these features are described below.
Increased Performance
When you request an ASP.NET file for the first time:
1. The code is compiled into Microsoft intermediate language (MSIL), which
is a CPU-independent set of instructions.
2. The MSIL code is converted to native code by the Just In Time (JIT)
compiler, which is part of the Microsoft .NET Framework.
3. The native code is executed.
This results in a greatly increased performance because after the first request,
the code can run for subsequent requests from the much faster compiled
version.
Multiple Language Support
ASP.NET provides a true language-neutral execution framework for Web
applications. Regardless of the language used in the ASP.NET page, the MSIL
code generated will be identical; thereby leaving the developer free to choose
the language he or she is most comfortable with. This includes fully compiled
languages, such as Visual Basic and Visual C++, in addition to a new Microsoft
language called Microsoft C#
™
. Several companies are producing compilers
that are targeting the Common Language Runtime, which is part of the .NET
Framework.
Topic Objective
To describe some of the key
features of ASP.NET.
Lead-in
ASP.NET includes many
useful features for Web
development.
16 Module 4: Designing the Client Experience
Server Controls
ASP.NET provides several server controls that simplify the task of creating
pages. Server controls encapsulate common tasks and provide a clean
programming model. There is a whole set of controls that do everything from
managing your form state to displaying calendars and tables. In fact, for almost
every HTML element, there is an ASP.NET server control. ASP.NET server
controls are covered later in this module.
Web Services
A Web service is an application that is offered as a service across the Internet. It
behaves as a Uniform Resource Locator (URL) addressable resource, which
returns the results of its processing to clients. Similar to components, Web
services represent black-box functionality. The client does not need to know
how the service works. It only needs to know how to address the service and
accept the response.
Web services provide the building blocks for constructing distributed Web-
based applications. ASP.NET files have an .aspx extension, whereas Web
services have an .asmx extension.
Module 4: Designing the Client Experience 17
ASP.NET Features (continued)
Improved Security
Caching
Application State and Session State Management
Greater Scalability
Easy Configuration and Deployment
*****************************I
LLEGAL FOR
N
ON
-T
RAINER
U
SE
*****************************
Here are a few more important features of ASP.NET that ease the development
and maintenance of Web applications.
Improved Security
ASP.NET implements a range of different authentication mechanisms: Basic,
Digest, Windows, Passport, and cookie. After a user has been authenticated,
access can be granted by comparing authenticated details to NT file system
(NTFS) permissions or by comparing credentials to an XML configuration file.
The XML credentials are stored in a file called config.web.
In addition, creating forms-based authentication, in which you can have your
own custom logon screen and credential checking, is much easier when you are
using ASP.NET.
Caching
Caching is an extremely important technique for building high-performance,
scalable Web server applications.
ASP.NET offers a number of caching mechanisms that enhance Web
application performance. For example, all ASP.NET pages are compiled and
cached on the server. They are updated in the cache only when the page
changes or the caching period expires.
Application State and Session State Management
In ASP.NET, application state and session state management is extended to
provide a persistent and more scalable environment for storing values relevant
to specific clients and applications. In particular, a user’s session state can now
easily be maintained across a Web farm because it no longer depends on client-
side cookies.
Topic Objective
To describe some of the key
features of ASP.NET.
Lead-in
Here are a few more
important features of
ASP.NET that ease the
development and
maintenance of Web
applications.
Delivery Tip
Show a sample file by
opening
config.web
in the
folder <install
folder>\Labs\Lab04\Starter.
18 Module 4: Designing the Client Experience
You will learn more about state management in Module 5, “Managing
the Business Logic Layer,” in Course 2260A, Designing E-Business
Applications with Microsoft .NET Enterprise Servers.
Greater Scalability
By using ASP.NET, session state can now be maintained in a separate process,
on a separate machine, or even in a database, thereby allowing for sessions that
can be accessed from multiple Web servers. This allows you to add more Web
servers as your site traffic grows.
In addition, ASP.NET includes support for Web gardens. This helps make
multi-processor machines scale so that they can do more work than single
processor machines.
Easy Configuration and Deployment
Configuration and deployment is now easier with the use of human-readable
XML-format configuration files.
In ASP.NET, all of the configuration details for Web applications are kept in
XML files named config.web. These files are stored in the folders on the Web
server and are applied hierarchically. This means a single Web application can
have multiple configuration files for different parts of the application.
By using ASP.NET, applications can be deployed by using file copy
commands, Microsoft FrontPage
®
server extensions (FPSE), or File Transfer
Protocol (FTP).
Note
Module 4: Designing the Client Experience 19
ASP.NET Server Controls
Features of Server Controls
Server-programmable objects
Encapsulate both behavior and rendering
Render different HTML formats to support multiple
browsers or other Web clients
Types of Server Controls
HTML controls
Web controls
*****************************I
LLEGAL FOR
N
ON
-T
RAINER
U
SE
*****************************
ASP allows developers to execute components on the server. ASP.NET extends
this concept with the introduction of server controls.
Server controls are used to create the user interface for your Web application.
They can generate any output that is suitable for the device or browser they are
targeting.
There are two types of server controls:
HTML controls
Web controls
Both types of controls can be created and accessed on the server. Both also
provide a rich set of services to build your own interactive pages.
For example, Web form controls can also detect the browser that is hitting a
form and return the appropriate content: HTML 3.2 for earlier versions of
browsers or DHTML for Internet Explorer 5 or later.
Server controls also provide an easy mechanism for preserving the state of
forms that are submitted to the server.
Topic Objective
To explain how ASP.NET
controls can ease the
development of the
presentation layer.
Lead-in
ASP.NET offers a new
feature called server
controls.