ASP.NET Programming Model

ASP.NET Programming Model-: ASP.NET is a Web development platform that provides services, a programming model, and the software infrastructure necessary to build enterprise-class applications. As part of the Microsoft .NET platform, ASP.NET provides a component-based, largely extensible, and easy-to-use way to build, deploy, and run Web applications that target any browser or mobile device.

In the 2005, ASP.NET 2.0 introduced significant changes for application architects as well as for developers. Many of the constituent classes have been reworked, and some underwent face-lift operations. Several new controls have been added for the sake of productivity, and a bunch of new and enhanced system modules made the run-time pipeline more customisation, flexible, robust, and secure.

 

ASP.NET 3.5 is the next milestone in the evolution of the ASP.NET platform. In this version, ASP.NET features Asynchronous JavaScript and XML (AJAX) capabilities, integration with the Windows Communication Foundation (WCF) service platform, Language Integrated Query (LINQ) support and a few new server controls to fill existing functional gaps, such as in the area of rich graphical layout.

Although each  language has specific and architecture-specific features, all these Web development platforms are designed to create interactive pages as part of a Web-based application.

Like any other Web development environments, ASP.NET also works on top of the HTTP protocol and takes advantage of HTTP commands and policies to set up two-way, browser-to-server communication and cooperation. What really differentiates ASP.NET from the plethora of other Web development technologies is the abstract programming model it propounds, the Web Forms model. In addition, the whole ASP.NET platform comes as a native part of the Microsoft .NET Framework.

In short, ASP.NET delivers a wealth of goodies, tools, and powerful system features that can be effectively grouped within the blanket expression tools for abstracting the HTTP programming model. Lots of programmer-friendly classes let you develop pages using typical desktop methods. The Web Forms model promotes an overall event-driven approach, but it is deployed over the Web. In addition, AJAX capabilities make the platform even more powerful and dramatically improve the user’s experience.

Programming in the Age of Web Forms-:  ASP.NET Web Forms model is directly related to the search for a better strategy to deal with the growing demand for cheap but powerful Web interaction. The HTTP protocol represents the major strength and weakness of Web applications.

The stateless nature of the HTTP protocol introduces vastly different programming concepts that are foreign to many desktop developers—first and foremost among these concepts is session state management.

In other words we probably couldn’t have the Internet as we know it without a protocol like HTTP. Yet, as demand for rich and powerful applications increases, programmers have to devise better ways of setting up easy and effective communication from the client to the server and vice versa. The advent of AJAX is just a clear sign of this need.

Event-Driven Programming over HTTP-: ASP.NET Web Forms bring the event-driven model of interaction to the Web. Implementing an event model over the Web requires any data related to the client-side user’s activity to be forwarded to the server for corresponding and stateful processing. The server processes the output of client actions and triggers reactions. The state of the application contains two types of information:

  • the state of the client
  •  state of the session.

The state of the client mostly the contents of form input fields collectively referred to as the page state—is easily accessible through the server-side collections that store posted values. But what about the overall state of the session? The client expects that sending information to the server through one page is naturally related to any other page he or she might view later, such as when adding items to a shopping cart. Who remembers what a particular user has in the shopping cart? By itself, HTTP is incapable of keeping track of this information; that’s where session state and a proper server-side infrastructure surrounding and integrating HTTP fit in.

I can’t emphasize enough the importance of understanding the concepts involved with stateless programming when developing Web applications. As mentioned, HTTP is a stateless protocol, which means two successive requests across the same session have no knowledge of each other. They are resolved by newly instantiated environments in which no session-specific information is automatically maintained, except all the information the application itself might have stored in some of its own global objects.

There are two type model available in Asp.Net

  1. The ASP.NET Component Model-:  ASP.NET is the key enabling technology for all Web-related functionality provided by the .NET Framework. The .NET Framework is made entirely of an object-oriented hierarchy of classes that span all programming topics for Windows operating systems.
  2. The ASP.NET Provider Model-:  ASP.NET provider model—the strategy pattern. Defined, the strategy pattern indicates an expected behaviour that can be implemented through a variety of interchangeable algorithms

 

Leave a Comment