Common Gateway Interface (CGI)
For any web application high performance and timely delivery are key ingredients to competitive success.
Earlier CGI was developed to provide the server-side capability to web application. Although CGI played a major role in the explosion of Internet, it's performance, scalability and usability issues make it less than the optimal solution. CGI runs in a separate process separated from the web server and it requires more hardware and software resources. CGI programs are slow because for each a new call is to the CGI program, which subsequently runs in a separate process. If your program needs to interact with Web Server, using CGI program you can't accomplish it as CGI's separate process can't interact with Web Server.
To solve all these problems several companies have developed server-side scripting languages. These scripts are popular and allows developers to develop web applications that generates dynamic pages. Microsoft has developed ASP (Active Server Pages) for IIS Server and Cold Fusion is product of Allaire. Web Server interprets these scripts when the pages are served. These scripting languages provide good performance but imposes the portability issues as they are limited to particular group of products or operating system.
Server plug-in technologies
Server side plug-in technology provide very good performance. NSAPI is the plug-in from Netscape and ISAPI is from Microsoft. Programming using these plug-in are difficult and also learning curve is also very high.
Java Servlets eliminated all these problems. The first truly platform independent web development technique, Java Servlets breaks down all traditional barriers giving you flexibility to run your Web Application on any Web Server. Built from the ground up using Sun's write once run anywhere technology, Java Servlets provide excellent framework to develop server-side application without sacrificing functionality or performance.
With Java Servlets you can finally develop your web application that can run on any platform. Java Servlets have number of advantages over CGI and other API's. They are:
In the next section we learn about JDBC and see how to use JDBC to connect our search engine to database.
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial