Wednesday 31 August 2011

Design the Web Application


During the design process of your web application, the following considerations are likely to play a role in the design decisions that you make. The type of web application that you are designing determines the importance of each consideration.
The four considerations are:
  • Security
  • Scalability and reliability (availability)
  • Search Engine Optimization (SEO)
  • Localization

Security

Security is the level of importance and effort you are willing to put toward securing data and the administration features of your application. Every web application will require some level of security. Some web application types require much more focus on this consideration, such as e-commerce sites, where sensitive information may be stored.



Scalability and reliability (availability)
Scalability is concerned with the ability of your web application to scale when demand requires more resources. Reliability is concerned with the ability of your web application to survive resource outages, such as a single server failure.
Often scalability and reliability are closely linked, as the ability to recover from the loss of resources requires the ability of your web application to spread its processing across more than one single point of failure.


Search Engine Optimization (SEO)
SEO is concerned with the ease with which automated search engine crawlers can traverse your site. Automated search engine crawlers follow links that are available in your site and save key information about the content of your site on each page. This information is stored and is searchable by users who are interested in the topics that your site may cover.


Localization
Localization is concerned with providing your content to your users in multiple languages. Providing your content in several languages can expand your potential user base dramatically.


Overview of Web Applications and Their Characteristics



E-commerce site (Shopping cart)

All e-commerce sites have key features in common with one another, they are:
  • Ability to search for products
  • Ability to view product details
  • A shopping cart that allows you to store items for purchase and continue shopping
  • Some sort of checkout functionality that allows you to purchase your selected items
Without these key features, an e-commerce site would not be successful. Keep these features in mind when you are asked to design e-commerce sites, and be sure to notice similarities and differences between e-commerce sites when you are shopping on the web.


Blog site

All blog sites have key features in common with one another, they are:
  • Ability to add, edit, manage, and publish posts (articles)
  • Ability to categorize posts for easy searching
  • Ability for readers to comment on published posts
  • Ability for authors to administrate content and comments

Business site (Non e-commerce)

All business sites have key features in common with one another, they are:
  • Strongly branded designs
  • Designs and content that try to send a message about the business
  • Access to information on the business, and contact information for further questions

Overview of Request Life Cycle


The Request life cycle is composed of the series of events that transpire when processing a web request to your web application.


The Web Forms page event life cycle

  1. The Web Forms page event life cycle begins with a request to a Page resource.
  2. The HTTP handler processes the request and initializes the correct Page resource to handle the request.
  3. The page initializes, and all server controls in the page raise their initialization events as well.
  4. On postbacks (when a HTTP Post request is received), Postback Data (data that is available in the form) is loaded.
  5. The page loads and all server controls raise their Load event.
  6. On postbacks, the RaisePostBackEvent event is raised that can be accessed programmatically.
  7. The view state is saved and the event is raised.
  8. The page and all server controls are rendered into markup (HTML) and returned to the web server.
  9. The web server returns the rendered response.

Intro of Asp.Net 4.0


ASP.NET 4.0 is the latest .NET framework for building web applications. The features of ASP.NET 4.0 allow you to quickly create compelling web applications that perform and scale to meet the demands of your users.


ASP.NET is an engine for processing web requests from beginning to end, and is much more than just Web Forms, Web/WCF Services, and MVC.
ASP.NET is a web request-processing engine. Incoming requests are processed and pass through an internal pipeline to an endpoint, where you, as the developer, can attach logic to process the request further.

ASP.NET components

Caching
ASP.NET provides two different kinds of caching: output and application data caching. Output caching stores dynamic page and control content for quick responses without having to process the response dynamically. Application data caching allows you to programmatically store arbitrary objects such as data sets in server memory so that an application can access the object without having to hit the data store.
Pages
Pages refer to Web Forms pages. This provides the functionality necessary to process Web Forms.
Profile
ASP.NET Profiles give you the ability to provide profile functionality to your users. Profiles allow you to store user metadata in your application. Typical uses of Profiles would be to store the full name, address, and other pertinent information that can be attached to a user.
Modules
ASP.NET Modules are components that implement and plug themselves into the ASP.NET request-processing pipeline by registering for certain events. When the event occurs, ASP.NET invokes the module so that it can further process the request.
Controls
ASP.NET controls refers to Server Controls that are used in Web Forms projects. Controls are HTML form elements that abstract the markup and allow you to separate the processing from your page.
Roles
ASP.NET Roles gives you built-in functionality to create roles for your users, and to restrict content according to the role of the user that is accessing the site.
Handlers
HTTP Handlers are .NET components that can act as a target for incoming HTTP requests.
Globalization
ASP.NET has built in components to develop applications that function for multiple cultures.
Master pages
ASP.NET Master Pages allow you to organize your design into templates, and to restrict content to locations that you assign.
Membership
ASP.NET Membership provides built-in functionality to implement site members and provide login and user tracking features.


ASP.NET 4.0 includes several new features such as extensible output caching, compressible serialized session state, and performance monitoring for individual applications.
New features in ASP.NET include:
  • Extensible ASP.NET 4.0 output caching
ASP.NET 4.0 adds extensibility to output caching that enables you to configure one or more custom output-cache providers. Output-cache providers can use any storage medium to persist HTML content.
  • Compressible serialized session state
ASP.NET 4.0 adds a new compression option for session-state providers. When the compressionEnabled configuration option is set to true, ASP.NET compresses serialized session state.
  • Performance monitoring for individual applications in a single worker process
ASP.NET 4.0 adds resource-monitoring functionality in the CLR. When enabled, administrators have a more granular view of the resource consumption of individual applications.
  • Routing
ASP.NET 4.0 adds built-in support for using routing with Web Forms. Routing allows you configure an application to accept request URLs that do not map to physical files.


IIS 7.0


IIS 7.0 is a modern, flexible, and secure web server designed to meet any hosting need that you may have to deliver content to the web. IIS is built on a modular architecture that allows you to implement features and functionality that you need, and turn off what you do not need. Following are some key features of IIS 7.0.


Management

IIS Manager allows you to manage each site and web application that IIS is hosting on a local or remote machine. IIS Manager separates the management of your hosted sites and applications following the modular nature of IIS 7.0. When you open IIS Manager, you will see your options separated by domain, such as ASP.NET, IIS, and Management. The management options are accessible by icons that represent the features that you can manage, such as Authentication, Logging, and Output Caching.


Modular architecture

IIS 7.0 is built upon new architecture that is different from previous versions of IIS. Rather than including the core functionality in the server itself, IIS 7.0 is built upon a web server engine to which you can add or remove components, called modules, depending on your needs.
Modules are individual features that the server uses to process requests. For example, IIS uses configuration modules to access application configuration files and cache modules to manage cache activity.


The categories by which these modules are grouped in the illustration make up the core functionality of IIS.

Security

Includes all modules that are concerned with authentication, authorization, and securing resources.

Application Development

Includes all modules that are concerned with processing custom-developed application logic, such as ASP.NET.

Health and Diagnostics

Includes all modules that are concerned with monitoring the health and state of the server. Its applications are grouped as Health and Diagnostics.

FTP Publishing

Includes all modules that are concerned with FTP transmission and publishing.

Performance

Includes all modules that are concerned with increasing performance, such as compression.

Management

Includes all modules that provide administration and management functionality.

Common HTTP Web Server Components

Includes all modules that provide HTTP request and response processing.

Windows Process Activation Service (WAS)

Includes all modules that provide Windows Process Activation Service (WAS) functionality. WAS allows IIS to serve non-HTTP or non-HTTPS requests.


In IIS 7.0, ASP.NET integration is significantly improved. IIS 7.0 enhances existing applications and allows new applications to take advantage of ASP.NET features in a variety of new ways.

All content types supported

In the past, ASP.NET functionality such as Forms authentication, roles, URL authorization, and output caching were only available to ASP.NET content types such as ASPX pages. Static files, classic ASP pages, and other content types could not benefit from these services.
In IIS 7.0, all ASP.NET services are provided uniformly to all content. For example, you can protect all of your web content, including images and classic ASP pages, with your existing ASP.NET access control solution built on ASP.NET Forms authentication, membership, and login controls.

Fully extend IIS with ASP.NET

Previous versions of IIS frequently required server extensibility to be developed by using the native ISAPI filter or extension extensibility mode, due to the runtime limitations of ASP.NET.
IIS 7.0 allows ASP.NET modules to plug in directly to the server pipeline, with the same runtime fidelity as modules developed with the native (C++) server API. ASP.NET modules can execute in all run-time stages of the request-processing pipeline, and can execute in any order with respect to native modules. The ASP.NET API is also expanded to allow more control over request processing than was previously possible.

Unified server runtime

Tighter ASP.NET integration also unifies many of the features between IIS 7.0 and ASP.NET.
IIS 7.0 provides a unified configuration for IIS and ASP.NET modules and handlers. Many other features, including custom errors and tracing, have been unified to allow better management and cohesive application design.