Understanding ASP.NET

by Administrator 15. May 2009 06:53

From the discussion in the preceding section, you can see that a framework for building
and running Web applications has a number of items that it should address. It must do the
following:
    *  Support HTTP
    *  Manage client state efficiently
    *  Provide tools allowing for the easy development of Web applications
    *  Generate applications that can be accessed from any browser that supports HTML
    *  Be responsive and scalable    

Microsoft originally developed the Active Server Pages (ASP) model in response to many of
these issues. By using ASP, developers can embed application code in HTML pages. A Web
server such as Microsoft Internet Information Services (IIS) could execute the application
code and use it to generate an HTML response. However, ASP did have its problems: you had
to write a lot of application code to do relatively simple things, such as display a page of data
from a database; mixing application code and HTML caused readability and maintenance is-
sues; and performance was not always what it could be because ASP pages had to interpret
application code in an HTML request every time the request was submitted, even if it was the
same code each time.
With the advent of the .NET Framework, Microsoft updated the ASP model and created
ASP.NET. The main features of the latest release of ASP.NET include the following:
      *  A rationalized program model using Web forms that contain presentation logic and
         code files that separate out the business logic. You can write code in any of the lan-
         guages supported by the .NET Framework, including C#. ASP.NET Web forms are
         compiled and cached on the Web server to improve performance.
      * Server controls that support server-side events but that are rendered as HTML so that
         they can operate correctly in any HTML-compliant browser. Microsoft has extended
         many of the standard HTML controls as well so that you can manipulate them in your
         code.
      * Powerful controls for displaying, editing, and maintaining data from a database.
      * Options for caching client state using cookies on the client’s computer, in a special
         service (the ASP.NET State service) on the Web server, or in a Microsoft SQL Server
         database. The cache is easily programmable by using code.
      * Enhanced page design and layout by using Master Pages, themes, and Web Parts. You
         can use Master Pages to quickly provide a common layout for all Web pages in an ap-
         plication. Themes help you implement a consistent look and feel across the Web site,
         ensuring that all controls appear in the same way if required. With Web Parts, you can
         create modular Web pages that users can customize to their own requirements. You will
         use themes later in this chapter. Using Master Pages and Web Parts is outside the scope
         of this book.
      * Data source controls for binding data to Web pages. By using these new controls, you
         can build applications that can display and edit data quickly and easily. The data source
         controls can operate with a variety of data sources, such as DLINQ entity objects,
         SQL Server databases, Microsoft Access databases, XML files, Web services, and other
         business objects. The data source controls provide you with a consistent mechanism for
         working with data, independent from the source of that data. You will make use of data
         source controls in Chapter 29, “Protecting a Web Site and Accessing Data with Web
         Forms.”

      * Powerful controls for displaying and editing data. Microsoft provides the FormView
         control for displaying data and editing data one record at a time, and the GridView
         control is provided for presenting information in a tabular format. You can use the
         TreeView control to display hierarchical data, and you can use the SiteMapPath and
         Menu controls to assist in user navigation through your Web application. You will use
         the GridView control in Chapter 29.
      * AJAX extensions so that you can build highly interactive and responsive Web applica-
         tions that can minimize the network bandwidth required to transmit data between the
         client application and the Web server. By using AJAX, you can define parts of a Web
         page as being updatable. When information displayed in an updatable region of a page
         changes, only the information required for that part of the page is transmitted by the
         Web server.
      * Security features with built-in support for authenticating and authorizing users. You can
         easily grant permissions to users to allow them to access your Web application, validate
         users when they attempt to log in, and query user information so that you know who is
         accessing your Web site. You can use the Login control to prompt the user for creden-
         tials and validate the user and the PasswordRecovery control for helping users remem-
         ber or reset their password. You will use these security controls in Chapter 29.
      * Web site configuration and management by using the ASP.NET Web Site Administration
         Tool. This tool provides wizards for configuring and securing ASP.NET Web applications.
         You will use the ASP.NET Web Site Administration Tool in Chapter 29.

In the remainder of this chapter, you will learn more about the structure of an ASP.NET
application.
 

Tags:

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

 

My Quote :P

Each morning when I open my eyes I say to myself: I, not events, have the power to make me happy or unhappy today. I can choose which it shall be. Yesterday is dead, tomorrow hasn’t arrived yet. I have just one day, today, and I’m going to be happy in it.

Month List

Page List