Static Web Sites vs Dynamic Web Sites

Being in the field of Web Development, one thing that you would be encountering a lot is a whole lot of terms every now and then. In this article I am going to discuss two of such terms.
The web sites that we develop are categorized normally as of two types: Static Web Sites and Dynamic Web Sites. And the emphasis is more on developing a dynamic web site. So what are these and what difference do they make.

As a developer, you develop a web site, make few pages, place some data into it and publish your pages. After few days you need to change the data/information that you placed in your page, you have to edit the copy of the page that you have in your local system and upload the edited page. Every time you need your page content to update, you have to edit the data in the page itself and upload the new copy.

Now imagine you want to create a profile page for every user that comes to your site. The user fills a form and sends you his/her data. You code a page based on the user’s information and publish it. The user makes some changes in his/her data, you have to make the changes in his/her profile page and again publish the new page. Imagine you are Facebook with millions of users. How impossible it would be to continuously updating user profile pages with this approach.

This is the example of a static web site, where data is always placed inside the web pages and every time you need a change, you have to change the actual web pages.

Now let’s see what dynamic web site is.

Take the example of Facebook. When any of the millions of users want to use facebook, he/she goes to the same page “http://www.facebook.com”. After providing the user name and password, every user get to see the page “http://www.facebook.com”. When a user wants to view his her profile page, every user gets to see the page “http://www.facebook.com/profile.php?id=xxxxxxxx”. Any user wants to edit their friends; the page they get to see is “http://www.facebook.com//friends/edit/”. Any game, any setting, any page that you view, the page is always the same for every single one of the millions of users. But the difference is the content/data displayed in the page. When a user logs in, every single page displays data based on the user who is logged in. The pages have no data inside them pre-written. They load the data every time a user requests the page. The data is not already present in the page but it is loaded dynamically at the time of page request based on the user who is logged in. Hence facebook is an example of a dynamic web site.


So a dynamic web site is such a site where data is not in the web pages but it gets loaded when the page is requested. Whenever you need to update/edit your data, all you need to do is provide new data or update existing one in your data store. You almost never have to touch your web pages. The data is fetched normally from a database (an organized form of electronic data storage). So we can also say that a dynamic web site comprises of html web pages, some programming language that loads data in to those web pages, and a data source (normally database) from where the data is fetched.

No comments:

Post a Comment