Dynamic Web Page Flowchart

My research project is all about dynamic web sites. A dynamic web page is basically a web page that is “created” when the user requests it. In our lessons so far, we have mostly created “static web pages”. This means that we as the authors, create the page, then a user’s browser requests the page, and the page is sent, as it was created to the browser. A dynamic web page is generated based on what the user’s browser request. An example of a dynamic web site is goggle. Based on what you search, Goggle will access it’s database and present you with a web page that is generated on the fly (dynamically).

There are 2 kinds of dynamic web sites, or pages. The first is called client side. We are familiar with this type of interaction from our use of JavaScript. The way that client side works, is that the entire page is loaded to the users browser. The script that allows for interactivity is also loaded when the page is loaded. Once a user triggers an event, the JavaScript will run and the page does something dynamically. The important thing to note is that all of the components of the page, including the JavaScript were all created by the author of the page, and downloaded with the page.

The second type of dynamic web page is called server side. This means that the server, at the time that a user’s browser request, actually creates that web page. The author of this type of web page codes in the parameters that later will generate a page. This is best explained visually in the following Illustration.

As you can see, there are several steps to this process, the outline of which is below:

  1. The browser requests a page. Without going into DNS and all that, we will just say it goes to the internet. The internet then finds the actual machine that the requested page resides on. That machine will have a web server that receives the browser’s request.
  2. The web server then looks to see if it has all the information it needs to send the page back to the browser. If the page is only made up of HTML then it returns the page and the process is complete.
  3. However, if the page has PHP code (I am using PHP for this example, it could be other processing languages also, like ASP, ColdFusion and others), the web server will have to send the page to the PHP processor, since the web server does not know what to do with this code.
  4. The PHP processor, then processes the PHP code, and if there is no database language (SQL) it processes the code and sends back the page to the web server.
  5. If the PHP code includes database language (SQL), it then must send that request to the DBMS (database management server). The DBMS will get the data that it is instructed to from the database and send it back to the PHP processor, which in turn will assemble its part of the page, and return that to the web server, which then assembles the rest of the page and finally sends the html to the browser to display.

Ok, so why use this complicated and convoluted method to simply display a web page? Well that question has multiple answers. In my view, the best answer is exemplified by Google. Can you imagine how many web authors it would take to create a page for each possible search that is done on Google in a single day? Basically, it would be impossible. So the ability to generate web pages that are what the user is looking for, is certainly one good reason for going through all of the above to generate web sites.  The second good reason, again using Google as an example, is site maintenance. It would also be impossible for Google to maintain all those pages, with web sites appearing and disappearing daily, if not for databases and dynamically generated web pages.

How important are dynamically generated web site?

According to Wikipedia, “Most of the Web's information is buried far down on dynamically generated sites, and standard search engines do not find it. Traditional search engines cannot "see" or retrieve content in the deep Web – those pages do not exist until they are created dynamically as the result of a specific search. The deep Web is several orders of magnitude larger than the surface Web“.  Wikipedia goes on to say that “In 2000, it was estimated that the deep Web contained approximately 7,500 terabytes of data and 550 billion individual documents. Estimates based on extrapolations from a study done at University of California, Berkeley, show that the deep Web consists of about 91,000 terabytes. By contrast, the surface Web (which is easily reached by search engines) is only about 167 terabytes; the Library of Congress, in 1997, was estimated to have perhaps 3,000 terabytes.”