Internet Technologies:waa

Planning client and server sides Professional

From the basic concepts described in the chapter My first Web applicationit is clear that a Web application consists of a client and server side. The server side is programmed with Xbase++ while the client side is predefined. It can be any Web browser, like Firefox, Opera or the Internet Explorer, for example. In addition, the data format for the client side is predefined so that a Web application must provide data for the client in HTML format. This again requires you to program the server side with PRG code, and to plan how data is presented in a Web browser, or which HTML code will be sent from your Web application to a remote client. Before we look at the different steps for developing a Web application, let us first review which parts client and server side consist of and how they communicate:

Communication flow in Web applications

The diagram shows that five components in total are involved in the communication. When you program your Web applications, you should install all five components on the computer that you use for development. This makes it easier for you to test what you have programmed. However, you should keep in mind that the five components may reside on three different computers when your Web application "goes public". The Web browser is always somewhere in the Internet, while HTTP server and gateway may reside on a different machine than WAA server and your Web application. Therefore, you should make sure that all components are located in different directories on your development machine, and that no component can "see" the directory of another component. This way you assure that the communication is done via IP, even if the components are installed on the same computer.

The communication, or data flow, is like a closed circle in the diagram and is initiated by the Web browser. The browser sends a request to the HTTP server which routes it via Gateway and WAA server to the Web application. The response is prepared in the Web application as an HTML page and sent all the way back to the Web browser, which, in turn, can issue a new request.

This communication cycle is a good starting point for planning your Web applications. Try to draw the request/response actions on a sheet of paper and assign to each required HTML page (request) one PRG module that will prepare the response. Note that the response is an HTML page that may lead to the next request. Your plan could finally follow the pattern shown below:

Planning steps for Web applications

When you prepare a plan and know what data to present in HTML pages, you have a good idea how to structure the PRG code that creates the HTML pages and how to break down the PRG code into single modules.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.