Search
Solutions
Services
 
Home
Services and Solutions
Our Team
Technical Competencies
Projects Executed
FAQ’s
Recent Customers
Downloads
Corporate Profile
Read | Download PDF

Whitepapers
Read | Download PDF

 
 

UNIX or NT? Perl or ASP?
Archives > UNIX or NT? Perl or ASP? > Chapter 1: Unix Vs Windows NT



By By Benny A


Compare Unix (Perl/CGI scripts) Vs Windows NT (ASP scripts)

Chapter2: CGI Vs ASP

Introduction
HTML documents are static. This means they are all text files containing HTML tags which can be interpreted by browsers. To make them dynamic and interactive with the users, mechanisms are needed that can play the action between the user and the documents. For example, there is no way for a HTML document to contact your server and send or retrieve information from your server. This is why we need CGI and ASP scripts.

CGI - The Gateway for interaction
The Common Gateway Interface (CGI) is a standard, not a programming language. It is used to create an interface between the user applications and web servers, such as HTTP servers. CGI is executed in real time, that is, when it is called it can perform the actions. For example, if you want to connect an UNIX database into your website to allow site visitors to browse the information from your database you need to create a CGI program to do it. The CGI program is capable of interacting with the database to submit the user inputs into the database.

Since CGI scripts let your users communicate with the server, the script should be capable of providing enough security to prevent users from taking control of the server. There is a mechanism for keeping a separate special kind of directory called "cgi-bin", where the Web server can only execute the program rather than just display it to the browser.

A CGI program can be written in any language that allows it to be executed on the system It can be in C/C++, FORTRAN, TCL, UNIX shell scripts, Visual Basic, AppleScript (For Apple Mac systems) and mostly in Perl. It just depends what you have available on your system.

CGI programs are mainly for UNIX family of servers. Though we can create and run CGI programs for Windows platform they are not popular in that environment. Moreover CGI developers and users prefer to use them in UNIX because CGI is still closer to UNIX. CGI is complicated to develop but it does have advantages as we find below. If you know the UNIX constructs and C then CGI could be your choice.

There is good news for the Windows NT user who wants to use CGI scripts. There is a third party tool from ActiveState. Using this tool you can run Perl scripts on a Windows NT server. NT users can now enjoy Perl scripts on their server.

The Common Gateway Interface (CGI) allows Web servers to execute programs and incorporate their output into the text, graphics, and audio sent to a Web browser. They are almost platform independent and they have multi-language support. Since UNIX servers are comparatively faster than NT the loading and with less executing time.

But CGI has its limitations: CGI is not inherently multithreaded (ASP is), which limits the number of concurrent users. So, CGI uses a greater amount of server resources degrading performance of servers and sites. Writing any CGI script is also not an easy one. Moreover installing a CGI needs a special kind of experience, particularly when you install a third party CGI script.

Some example sites using cgi scripts are www.onsale.com and www.pcquote.com

Active Sever Pages(ASP)
ASP was introduced by Microsoft in 1996 and is server-based technology. With ASP it is possible to design dynamic, interactive HTML documents. ASP has been developed for the Windows NT platform along with Microsoft Internet Information Server (IIS). ASP seems is a good alternate for the Common Gateway Interface(CGI).

ASP's are powerful at database handling because of its database access technology ActiveX data Objects (ADO). Using these specially designed built-in data objects it is easy to connect a website with a database.

ASP is so popular now because it is easy to develop applications. They are basically written with VBScript, which is a subset of Visual Basic for Applications(VBA). These VBA are used by Microsoft office products and are based on Visual Basic. Since Visual Basic is the most popular language among Windows users, it's quite easy for developers to learn and work with ASP.

An ASP file is HTML with ASP as its extension. When the IIS4 receives a HTTP** request for an ASP file, the final HTML document will be dynamically generated along with the information sent from the server. ASP is simple to write, debug and maintain. With Microsoft's Visual Interdev and other Visual Studio tools it is easy to generate Rapid Applications with ASP.

ASP is a good choice if you are already working on the Microsoft NT platform and are familiar with other Microsoft products as well. There is a good news for UNIX users, so far, ASP was available for NT and Solaris platforms only. But now, there is a plugin available that can run your ASP applications on UNIX called chillisoft.

ASP has lots of advantages. It is becoming more popular because its creator Microsoft has a big market of Visual Basic users. ASP takes less time to develop, debug and causes less down time for Web sites. Rapid Application Development (RAD) tools are good for a team setting. ASP is inherently multithreaded (CGI isn't) allowing a greater number of concurrent users. ASP will be the good choice if you are running a large website.

There are disadvantages to ASP. Developers need to work with a lot of server technologies like IIS and MTS and many more. If you want to work with ASP you should know, ASP & VBScripting, and a database server like MS-SQL,IIS, MTS, client side scripting and more. The COM+ architecture is also somewhat complicated. These technologies still have some bugs, moreover NT is slow on the web.

Example sites: www.microsoft.com and www.cnn.com

I hope you are now better able to understand the two families UNIX & CGI and NT and ASP, and realise the capabilities. Read the next chapter and I can help you choose.

Chapter 1: UNIX Vs Windows NT
Chapter 2: CGI Vs ASP
Chapter 3: Conclusion - Look for the best

Back to top


Related Links on building an Online Community:

 
  Newsletter | Site Map | Development Scenarios | Partners | Careers | Archives
Copyright 2004 Stylusinc.com
  Links | Privacy Policy