An evaluation of three approaches to WWW application development

The purpose of this article is to discuss three basic architectural approaches to WWW applications.


How to Help Your Business Become an AI Early Adopter


Posted January 1, 1999

Brent Hauf

(Page 1 of 2)


The purpose of this article is to discuss three basic architectural approaches to WWW applications. The solutions discussed here are standards-based; other approaches, which are not purely standards-based on both client and server sides, are not considered. Our focus is on evaluation of the different approaches and the advantages, disadvantages and issues associated with each.

I. Common Gateway Interface (CGI) Solution

The CGI solution is the most widely used of the three architectural approaches. CGI itself is a protocol by which HTTP servers invoke external applications in response to a user requesting a URL. The external applications would respond to the request by dynamically building the Web page. In order to fulfill the request, this application may access a relational database or other data store.

The client for the application could be any Web browser that is able to interpret standard HTML (such as Netscape Navigator or the Microsoft Browser). HTML is capable of basic text formatting, hypertext links, clickable images, forms and tables. This is sufficient to build a functional and interactive interface. Additional functionality can be derived by using browser-specific functions such as JavaScript, plug-ins, ActiveX, and others. However, in utilizing these extensions, you may lock your application into a specific browser.

A CGI application is a collection of functions which respond to specific user requests. Each of these functions is executed as a discrete process on the machine where the HTTP server is located. Therefore, each function is a separate executable, usually written using a language such as C or a scripting language such as PERL. The Web server for the this approach could be any server supporting the CGI protocol. Figure 1 illustrates how the components of a CGI application interact.

Figure 1 CGI Approach


Simple and Proven Methods. The Common Gateway Interface approach uses HTML, CGI, and C or PERL, all of which are proven technologies. The CGI solution is fairly simple to develop. It is stable, not reliant on new and/or emerging standards, and does not require an extremely sophisticated body of knowledge to maintain.

Any Browser or HTTP Server May Be Used. Assuming no browser-specific HTML is employed, any web browser capable of interpreting standard HTML may be used to access the application. The appearance of the application may differ slightly from browser to browser, and some modifications may be necessary to ensure a satisfactory appearance on the popular browsers. In addition, no specific server reliance exists, thus allowing existing hardware to be leveraged.

Performance. As long as user activity levels remain relatively low, the performance of the system should be very good, since HTML is the only front-end interface being used. Standard HTML is quickly interpreted by market-leading Web browsers and does not suffer some of the performance penalties of Java or JavaScript. On the other hand, HTML does not offer the more advanced features and capabilities of these technologies. Using C language for the back-end applications will provide excellent performance and flexibility. While C may be more complex than using a scripting language, such as PERL, its flexibility and performance benefits make it worth serious consideration.


Difficult to Change Web Page Design. Since the HTML code that determines the Web page appearance is embedded in C applications, modifying the layout of the Web pages requires knowledge of the C language. Additionally, making changes will require the application to be recompiled and redeployed. This also means that Web page design packages cannot be used to produce the final HTML. Design programs can be used in the early stages to design the basic appearance of the page, but the HTML code that is produced has to then be incorporated into the C applications. After that, any changes to the pages need to be done by hand, without the help of a Web page designer.

Limited to HTML Functionality. Since only standard HTML will be used, advanced features such as those offered by JavaScript, Java, and plug-ins will not be available. In certain cases, the application requirements may dictate that these features be available.

Poor Scalability. CGI-based solutions require a discrete process to respond to each user request. This not only leads to inefficient use of available server resources, but also means applications with high transaction volume requirements will not provide satisfactory response times.

Session Management. A session exists if there is a virtual circuit between the client and the server, which is established at the client log-on and destroyed at client log-off. Typically, there would also exist session context information which would contain a connection to the database. CGI does not support this paradigm, hence the identity of the user making the request is not available between requests. Work-around solutions to this problem require more development effort and maintenance time than would be required with more technologically complex solutions.

Page 1 of 2

1 2
Next Page

0 Comments (click to add your comment)
Comment and Contribute


(Maximum characters: 1200). You have characters left.



IT Management Daily
Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that datamation.com may send you Datamation offers via email, phone and text message, as well as email offers about other products and services that Datamation believes may be of interest to you. Datamation will process your information in accordance with the Quinstreet Privacy Policy.