Compare and Contrast JSP with CGI

JSP i.e. Java Server Pages is basically a programming technology which is server-side and it enables the development of completely dynamic applications and web pages. This is done with the help of Java code being embedded in the HTML, DHTML and XML. The page which is static at first is converted and viewed as dynamic if the client (web browser) sends a request to web server (Wise geek, 2010).

On the other hand CGI i.e. Common Gateway Interface is basically a standard that specifies the way in which the generation of web pages is delegated to console application by the web server software. Scripting languages are used commonly but all the programming languages can be used for these CGI scripts. The requests from the clients are identified by these scripts which are then used to make the application function and provide the client with results. So CGI basically provides an interface between the clients and the web server.

In JSP when the Servlet is requested for the first time by the client it is transferred to the memory and cached. This then helps to retrieve the same Servlet instance when there are various requests from different threads. While in CGI every time a new request is sent a new process is spawned. In JSP Servlet classes are developed by the developer which are compiled and placed in where the server can find them. These Java Servlets basically work in the Servlet engine. Whereas in CGI creating of a new process requires an overhead and so the process is external to the web server. In JSP there is very easy transfer of the Servlet classes from one web server to another. On the other hand in CGI they have to be recompiled as they are basically they are dependent on the platform (Naomi, 2001).

Compare and Contrast JSP with ASP
ASP i.e. Active Server Pages is basically a technology that helps to enable the development of interactive and dynamic web pages. In ASP the kind of browser the user is using does not matter as server side scripting is used to produce web pages dynamically. A number of scripting languages can be used but the most commonly used language is VBScript. In ASP the Java script is used as the client side and the VBScript as the server side language.

The main similarity between JSP and ASP is that both of them support the creation of web pages that are dynamic. For this they use scripting codes, HTML templates and basic business logic components. Both of these use the similar object oriented programming scripting. Web server information and functionality is provided access to JSP and ASP by server side scripting. Although JSP is associated with ASP but it must be clear that these are both different technologies. The major difference between the two is that JSP which is developed by the Sun Microsystems is considered an object oriented language while ASP which is developed by Microsoft is considered as a framework because of the fact that it can support a wide number of programming languages from Microsoft.
In JSP extensions can be done with custom tab libraries while in ASP extensions are not possible as custom tab libraries cannot be used. In JSP database access is provided by using JDBC where as in ASP data access is given by used active data objects. In JSP scripting is done with the help of Java programming language. On the other hand in ASP scripting is done by use of VBScript and Jscript. JSP can easily run on all java enabled platforms and is platform independent. While ASP has a complete support in Windows and running it on other platforms is burdensome task as it relies on Win32 based component model (Day site, 2010).

0 comments:

Post a Comment