CodeCharge Studio

Architecture of Web Applications

In general, web applications use the client/server architecture (i.e., two-tier) where the browser acts as a thin client. The three-tier architecture is becoming more popular and even necessary when implementing enterprise systems that require better scalability.

Application Servers

An application server is the middle tier in the three-tier architecture. Application servers process the business logic on the Web server and communicate between the web browser and the database or another system.

Web Services

Web Services are programs that do not output information to the screen or Web browser but instead send the output to other programs in the form of XML. They do not take input from users via the keyboard, but rather read the information sent to them by other Web services in XML format.  Web services allow programs to exchange information across the internet and run remote applications as part of a local software system.


Cookies are small amounts of data sent by a program to the browser and stored on the user's machine to be retrieved later. They are usually used to recognize users who come back to visit the same Website after several hours, days or months.

Session Variables

Session variables are similar to standard local variables, but are used to store information that can be retrieved by other pages during the course of a user session. Session variables usually store information in a special session file on the server. You would usually create a session variable to store the ID of users when they log in. In fact, the action of logging in often consists of creating a session variable by the server program.

Application Variables

Application variables are also available to all pages in one Web application. They can be accessed by all users, not just the current session. They are cleared when the server is restarted.

GET and POST methods

When you create Web pages that contain data entry fields, the fields should appear between the <form> and </form> tags which make up a form. The form tag has additional attributes, one of them being Method="GET" or Method="POST". This method indicates how the information entered on the form should be submitted to the server when the user clicks the "Submit" button. The "POST" method causes the information to be sent via a data stream, invisible to the user. If "GET" method is used, the browser will redirect the page to a new URL, which will be constructed from the base URL (also specified by a form parameter), followed by a question sign (?) and all form information separated by an ampersand sign (&).

For example, if a form asks the user to provide the first name and the last name, after submitting the form, the user would be redirected to a URL like this one:

Users can manually emulate form submission by entering a URL into their browser that contains information similar to the one submitted via a form. The server program that is being executed should accept and process only the information that it uses.

See also

Choosing Web Technology

On-line, printable versions and updates