Saturday, February 23, 2008

What is ASP.NET?

ASP.NET is a set of web development technologies marketed by Microsoft. Programmers can use it to build dynamic web sites, web applications and XML web services. It is part of Microsoft's .NET platform and is the successor to Microsoft's Active Server Pages (ASP) technology.

Principles of ASP.NET
Even though ASP.NET takes its name from Microsoft's old web development technology, ASP, the two differ significantly. Microsoft has completely rebuilt ASP.NET, based on the Common Language Runtime (CLR) shared by all Microsoft .NET applications. Programmers can write ASP.NET code using any of the different programming languages supported by the .NET framework, usually (proprietary) Visual Basic.NET, JScript .NET, or (standardized) C#, but also including open-source languages such as Perl and Python. ASP.NET has performance benefits over previous script-based technologies because the server-side code is compiled to one or a few DLL files on a web server.

ASP.NET attempts to simplify developers' transition from Windows application development to web development by allowing them to build pages composed of controls similar to a Windows user interface. A web control, such as a button or label, functions in very much the same way as its Windows counterpart: code can assign its properties and respond to its events. Controls know how to render themselves: whereas Windows controls draw themselves to the screen, web controls produce segments of HTML which form part of the resulting page sent to the end-user's browser.

ASP.NET encourages the programmer to develop applications using an event-driven GUI paradigm, rather than in the conventional web scripting fashion. The framework attempts to combine existing technologies such as JavaScript with internal components like "Viewstate" to bring persistent (inter-request) state to the inherently stateless web environment.

ASP.NET uses the .NET Framework as an infrastructure. The .NET Framework offers a managed runtime environment (like Java), providing a virtual machine with JIT and a class library.

The numerous .NET controls, classes and tools can cut down on development time by providing a rich set of features for common programming tasks. Data access provides one example, and comes tightly coupled with ASP.NET. A developer can make a page to display a list of records in a database, for example, significantly more readily using ASP.NET than with ASP.

Advantages of ASP.NET over ASP

  • Compiled code means applications run faster with more design-time errors trapped at the development stage
  • Significantly improved run-time error handling, making use of exceptions and Try-Catch blocks.
  • User-defined controls allow commonly used templates, such as menus
  • Similar metaphors to Windows applications such as controls and events, which make development of rich user interfaces, previously only found on the desktop, possible.
  • A rich set of controls and class libraries allows the rapid building of applications
  • ASP.NET leverages the multi language capabilities of the .NET CLR, allowing web pages to be coded in VB.NET, C#, J#, etc.
  • Ability to cache the whole page or just parts of it to improve performance.
  • Ability to use the CodeBehind development model to separate business logic from presentation.
  • If an ASP.NET application leaks memory, the ASP.NET runtime unloads the AppDomain hosting the erring application and reloads the application in a new AppDomain.
  • Session state in ASP.NET can be saved in a SQL Server database or in a separate process running on the same machine as the web server or on a different machine. That way session values are not lost when IIS is reset or the ASP.NET worker process is recycled.

Disadvantages to other platforms

  • The server framework runs natively on Microsoft IIS 5.0 or higher and Cassini, a web server developed in .NET (shipped with WebMatrix, a free ASP.NET 1.1 development environment, and Visual Studio 2005); however it can run on Linux on any of the alternative frameworks based on the ECMA standard. The most well known one is Mono Project, a free/opensource framework.
  • Previous versions of ASP.NET (1.0 and 1.1) were criticized for their lack of standards compliance. The generated HTML and JavaScript sent to the client browser would not always validate against W3C/ECMA standards. In addition, the framework's browser detection feature sometimes incorrectly identified web browsers other than Microsoft's own Internet Explorer as "downlevel" and returned HTML/JavaScript to these clients that was crippled or broken. However, in version 2.0, all controls generate valid HTML 4.0, XHTML 1.0 (the default), or XHTML 1.1 output, depending on the site configuration, detection of standards-compliant web browsers is more robust, and support for Cascading Style Sheets is more extensive.

About this Terminology
This terminology is from The Wikipedia which is published under the GNU Free Documentation License.

0 comments: