Friday, 1 June 2012

Difference between Static and Dynamic Web Pages

Static Web Pages

Hyper Text Markup Language  (HTML) was the first tool with which people had begun to create web pages in olden times. HTML is a language that stylize text, create paragraphs and line breaks etc. But the most important thing that it does is link creation. All these links that we see on web pages are created using HTML.
Pages created with HTML are static pages because they remain the same for all the time to come –until and unless you change them manually. Then scripting languages came into scene with JavaScript beating other scripting languages big time. JavaScript became de facto scripting language. With scripting language –you can add a bit of dynamic element in static pages. For example, with JavaScript you can make a random number display every time a web page loads in browser. But even such pages are called static pages.
The code of static web pages is downloaded in one go. When you load the web page –all the code (HTML, JavaScript, CSS) and resources like images are downloaded in browser in one go.
Static pages are created using tools like HTML, JavaScript, CSS and images.

Dynamic Web Pages

As the need for creating interactive web pages grew –the relevant tools were created to make it possible. If you go to a online shopping website and see the product list –there are high chances that you’ll be looking as a dynamic web pages.
Such web pages have two main components; Style of the page and information. Style of the page is created using tools like HTML, CSS, JavaScript while the information is stored separately in a database. When a dynamic page loads in browser –it requests the database to furnish information depending upon user’s choice. When the page receives this information from database –the styling code gets applied on it and the resulting web page is displayed to the user.
For example, on the online shopping website if you select to see only mobile phones available in the store –the database sends information only about mobile phones.
In addition to database, there is a long list of technologies that can be used to make dynamic web pages. Some of the most popular ones are: PHP, ASP, ASP.net, JSP, Perl and Python. These are server side scripting languages whose code remains on server. Unlike JavaScript (which is a client-side scripting language) it does not get downloaded in your browser. These server side scripting languages fetch and compile information from database and send it to the browser.

No comments:

Post a Comment

chitika