ThePlace

Home ] Search ] Resources ] Site Map ] Contact Me ]
Dave's Information Technology Resource

Up ]

DHTML ] CSS ] JavaScript ] ActiveX and Plug-ins ] VBScript ] [ Web Applications ] ASP ] Web Databases ] ASP Applications ] Perl ] Java ]

--- Web Applications ---

Clients and Servers

Web applications are "programs" that run at the browser ("client") and or web "server".

These programs are implemented via a number of technologies usually based on the operating system, web browser, and web server.  For example:

bulletUNIX operating system (server)
bulletApache web server
bulletC, C++, Perl, PHP, Python, JSP (Java Server Pages), Java programming languages that implement applications on the server.
bulletWindows operating system (server)
bullet Internet Information Server (IIS)
bulletC++, Visual Basic, ASP (Active Server Pages), JSP, Java/J++
bulletDesktop client...
bulletWeb browser (Internet Explorer, Netscape)

On top of all of this, databases play a crucial role in these applications.  The databases are found on the servers.

So, how do things work...

Let's start with the basic HTTP model (how web sites work)...

bulletThe web browser (client) requests information via HTTP from the web server.
bulletThe web server responds with the requested data (typically an HTML file and associated files, e.g., graphics).

Now imagine that we want to do something interesting such as...

bulletThe end user will enter data (e.g., about someone) into an HTML-based form in a web browser.
bulletSubmit that data to a web server (but make sure all of the data has been collected).
bulletThe web server invokes an application to store the submitted data to a database.
bulletSend a message back to the client indicating that the input was successful.

How does this work?

  1. Client...Requests a web page from a server (starting or continuing) the transaction).
  2. Client...A web page is displayed in the browser.  The web page contains a form with the appropriate data entry fields.
  3. Client...the user enters the data.
  4. Client...upon submission (e.g., clicking the HTML form submit button), JavaScript client code is used to check that all desired fields are completed (e.g., filled in, not all spaces, numbers when appropriate, proper e-mail address).  IF the form is properly completed, the data is submitted, ELSE the user is notified to go back and finish/fix the data entry.
    bulletThis process assumes that JavaScript (or other language/tool) is available on the client.
    bulletCan also be accomplished with Java applets, Flash, and similar tools.
  5. Client...sends the data to the server via HTTP.
    bulletMay also involve a secure transmission via SSL.
  6. Server...receives the data via HTTP and invokes the appropriate application.
    bulletVarious implementation strategies are possible: scripts, servlets,  and executable applications.
    bulletScripts: code in HTML files (Perl, ASP, JavaScript); scripts are in readable format; tend to be slower to write.
    bulletServlets: bytecode-based Java and similar technologies (very closely related to executables).
    bulletExecutables: machine-language applications written in C, C++, Java, Visual Basic, etc.
  7. Server...the application checks the data (which should be fine because it was already checked).
  8. Server...the application opens a database, and executes the data transaction (the database is on the server).
    bulletData transactions typically fall into four classes:
    1. Query (select) - retrieve data from a database (one or more tables).
    2. Add (insert) - data is added to one table.
    3. Change (update) - data is modified for on or more records in a single table.
    4. Remove (delete) - data is removed for one or more records in a single table.
    bulletSQL and database application technologies are used to communicate with the database environment.
    bulletOther technologies will play a significant role here including the use of ODBC, ADO, and other server/database support techniologies.
  9. Server...depending on the success of the database insertion, a message is returned to the client.
    bulletThe return message is typically a function of application generated code based on error (or lack of error) messages from the database transaction.
  10. Client...the success/failure of the database action is reported to the end user.
  11. Client and Server Interaction... many applications (e.g., e-commerce) often involve multiple communications between the client and server requiring the management of "state information".
    bulletState information keeps track of variables (e.g., selected items from a database).
    bulletTwo basic techniques: hidden fields and transparent cookies (session variables).
    bulletHidden fields: added to forms and querystrings to track information.
    bulletTransparent cookies: generated by the server and stored on the client in "short-term" cookies (disposed of after a time period or termination of the browser).
    bulletHidden fields are dependable but can be awkward to manage.
    bulletTransparent cookies depend on browser support (they can be turned off).

The following diagram displays the elements of the above interaction...

 

 

 

 

Home ] Up ] Computer Architecture ] Programming Bootcamp ] Database Bootcamp ] Visual BasicS ] Web Basics ] Web Multimedia ] Advanced Web Topics ] Developing Web Sites ] XML Technology ] Web Glossary ]

Copyright © 1999 - 2005 
ThePlace - Written and Sponsored by Dave Hillman