ASP.NET is a web application development platform targeting desktop and mobile devices.
ASP.NET is a web application development platform targeting desktop and mobile devices. ASP.NET functions on top of HTTP protocol using protocol commands to establish browser-to-server communication and interaction. Its applications are compiled code composed of .NET framework components, components using the full hierarchy of the framework, and as a result, applications can be written in over 50 languages.
It offers three development model options: MVC, single page, and web form based. Each option offers unique advantages, and may be combined with another. ASP.NET MVC is a version of ASP.NET utilizing the popular model-view-controller (MVC) development pattern dividing an application into three main components. ASP.NET MVC offers a lightweight, highly-testable presentation framework integrated with the ASP.NET framework, which includes features like master pages and membership-based authentication.
ASP.NET components form the building blocks of applications, and the component model, or object model, describes server side elements, server controls, and more. ASP.NET uses the .NET framework, which contains all necessary functionalities, and consists of an object-oriented hierarchy. Its applications consist of pages, which are actually objects managed by its runtime.
WEB FORMS MODEL
ASP.NET web forms provide extension of the event-driven model into web applications causing a browser to send a web form to the server, which then returns a page with full markup. The server processes all client activities. ASP.NET works around HTTP's stateless nature by aiding in storing state information in its runtime.
COMPONENTS OF ASP.NET
The components of the .NET framework employed by ASP.NET follow:
- Common Language Runtime (CLR) – It manages all objects, their state, and etc.
- Class Library – It supplies a huge set of reusable “types.” Types are classes, interfaces, values, and structures.
- Common Language Specification – It provides specifications for the various languages supported by .NET.
- Common Type System – It provides the guidelines for runtime type management, and crosslanguage communication.
- Metadata and Assemblies – It provides the application binary (typically stored in an executable or memory).
- Forms – These are the graphical displays of all application windows.
- ASP.NET AJAX – This provides support for AJAX use.
- ADO.NET – This provides support for working with databases and data.
- Windows Workflow Foundation (WF) – This supports workflow-based application building. It consists of activities, runtime, a designer, and a rules engine.
- Windows Presentation Foundation – It separates the interface from the logic.
- Windows Communication Foundation (WCF) – It builds and executes connected systems.
- Windows CardSpace – It secures resource access and information sharing.
- LINQ – It queries data for .NET languages and resembles SQL.
ASP.NET utilizes an abstraction layer on top of HTTP as the location of application builds. It also provides high-level elements in an object oriented model. ASP.NET applications are developed with Visual Studio, a Microsoft IDE (integrated development environment) featuring all of the common bells and whistles of a comprehensive, graphical development tool.
The ASP.NET life cycle describes how ASP.NET processes during dynamic output, how application instantiation and processing happens, and how the application compilation happens. The life cycle consists of the application life cycle and the page life cycle bells and whistles of a comprehensive, graphical development tool.
The application life cycle begins with a request for an application resource typically by a browser to the server. The unified pipeline then receives the first request for the application. The creation of response objects for each request follows. Next, an HttpApplication object is assigned to the request. The HttpApplication pipeline processes the request. The page life cycle begins with a page request that determines whether to parse and compile or retrieve a cached page. If necessary, the life cycle begins by setting the request and response objects. Next, pages are initialized and page controls are assigned unique IDs. Loading of the page follows along with validation. If the request is old, postback event handling occurs by invoking a handler. Page rendering follows. Finally, the rendered page is sent to the client and all elements are unloaded (or cleaned up).
PURPOSE AND GOALS OF DESIGN
MVC eases the development of complex applications, and allows for easier testing. Web form based designs prove more challenging to test given the nature of their organization. Ultimately, the type of application and its characteristics make the best option clear; for example, a simple personal site for blogging hardly requires MVC.