Home > Articles > Programming > Windows Programming

  • Print
  • + Share This

ASP.NET Versus CGI

With the advent of the .NET Framework, server-side programming can be written in C#, VB.NET, or any other .NET language that supports the base library, with ASP.NET to implement the business logic (calling the business components). ASP.NET provides a greater level of flexibility on the programmer's side, without being affected by the various languages.

This isn't the only advantage of ASP.NET. We also have the concept of server-side controls, where the abstraction level is very high; adding just one line of code, the programmer gets a more complicated presentation on the client side, with the overall control on the server side. Therefore, server-side controls can be manipulated easily on the server and can respond very smoothly to the actions performed on the client side.

There's no doubt that ASP.NET is a win-win situation for a new implementation. But today we have tons of code written for CGI, and it will take a long time to change over from CGI to ASP.NET.

With CGI, it's not easy to present a complex control on the client side that can respond to the user's actions. Especially for enterprise-level solutions, it would be a good idea to shift to ASP.NET. Shifting from CGI-style programming to ASP.NET programming is not so difficult from the programmer's point of view. But systems analysis and web site architecture (tiered programming) can make the overall change very difficult; it would be almost a new project, and may seem a waste of time when the company already has spent a lot of energy on CGI-style coding. The technique presented in this article could be used as a solution for small-scale web sites developed with CGI, or for gradually migrating to ASP.NET.

Application Description and Structure

For this example, we'll create an application that can search the details of an employee stored in the employees database (designed in XML) without using ASP.NET. Our application consists of the following:

  • Web page: search.html
  • Database: employees.xml
  • C# source code: search.cs
  • EXE component: search.exe

Tools and Technologies

We'll be using the following tools and technologies to build our example:

  • .NET Framework
  • Windows 2000 Server
  • Internet Information Server 5.0 (IIS)
  • Internet Explorer 5.5
  • XML
  • C#
  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.