Home » Web Development » 10 - Design, Architecture and Current Trends
10

.NET Framework

Explaining web development using the .NET framework

The .NET Framework is Microsoft's answer to J2EE. It is an environment for implementing and deploying web services and applications. .NET is feature rich and allows for easy integration between a number of different development languages as it supports C++, C#, Visual Basic, and JScript (Microsoft's version of JavaScript). We used the free version of Microsoft's Visual Studio .NET - the most common development environment used to design and implement .NET solutions.

.NET allows web scripting through ASP.NET. ASP.NET represents an entirely new paradigm for server-side ASP scripting. Also, VBScript is no longer supported - full Visual Basic is used - and database connectivity is through ADO .NET rather than ADODB (we used ADODB for our project).

One of the new features built into ASP .NET is the incorporation of HTML controls. Just about all the HTML elements on a page may be defined as ASP .NET controls. This allows scripts to control the display of all elements. Also, an ASP.NET script looks a lot cleaner because the ASP .NET controls allow page generation, calculations, and control flow to be separate from the actual HTML. Validation controls are available - Javascript validation is not necessary. Event aware controls allow ASP .NET code to process onLoad, onChange, and onClick events. Also, cached copies of the compiled output of ASP .NET pages are maintained on server. Server performance is enhanced as a result - new requests are provided the cached copy; the code is not re-compiled.

However, ASP .NET is not compatible with earlier versions of ASP. This means that our ASP scripts require significant modification to be upgraded to ASP .NET. ASP files, however, may run side by side with ASP .NET files as the latter have a .aspx extension. A main difference between ASP and ASP.NET is the heavy use of XML in ASP .NET. We will learn more about XML in the concluding section of this chapter.Click to view ASP .NET code that will display the contents of the items table on the catalogue page. You can try running this script by cutting and pasting the code it contains into a file with the path Inetpub\wwwroot\florist\catalogue.aspx. This snippet should give you an idea about how an ASP .NET upgrade could be acomplished