There are two types of websites. Static and Dynamic.
One major difference between a Static and Dynamic site is, how content is integrated into a web page when sending as a response to the browser.
When working with a static website, content is manually placed into a web page. That means you literally type your website content by wrapping HTML tags around them.
Problems with Static Websites
It is not easy to maintain content consistency with static websites. Let’s just say, your website has a home page, an about us page and a contact us page. It’s totally common to have an introduction to your business in both “home and about us” pages. If you later decided to change the introduction content, you have to change the content in both places manually.
Imagine you have 10’s of pages. If you have to change your logo, you have to manually open each file and change the image URL.
Most common pain is changing the copyright text in the footer. Most people year in copyright. You have to remember to update the year every time a new calendar comes in.
Finally, you need to be familiar with HTML to create and update the content.
With a dynamic website, your content is can be placed in a Database. Simply put, A Database is just a collection of well-organized content.
“Hey, Wait! I have heard the word Data and how is it different from content?”
When it comes to websites, you can safely assume that data is the same as content. In fact, If your server is down for some reason, once you contact with customer support from your web hosting service, “Did you back up your data?” is the first thing they ask.
Advantages of Dynamic Websites
The main advantage of a Dynamic Website comes from its ability to make use of Databases and Dynamic Programming Languages like PHP.
Usage of database helps you avoid content duplication. If you want to place a piece of the same content on your home page and about us page, all you have to do is to insert content in your Database, only once. Later, you can grab that piece of content from the database and display it anywhere and any number of times you want.
As mentioned above, Your can grab your Content in the Database in an organized way. For example, If you have an e-commerce website, you can let your website visitors filter the products according to the date, price, and popularity.
Dynamic programming languages like PHP are also called as Server side languages. PHP lets you upload files to the server from a web browser. It can also automatically create thumbnails from a bigger image.
With PHP in place, You don’t have to worry about changing the year in your copyright. A code something like this will automatically show the correct year to your visitors.
© <?php display_current_year(); ?> Naresh Devineni, All rights reserved.
Facebook is the best example of an advanced dynamic website. You don’t have to know HTML or PHP to post a status or message your friend.
Introducing the Content Management System
By combining the capabilities of the Database and a dynamic programming language, you can create an interface which allows people to manage content. You can allow a person with no programming knowledge to safely add and edit products and pages without breaking your website. And we call this Interface a “Content Management System”. WordPress and Drupal are the best examples of Content Management Systems.
I don’t want to bore you by listing all great features of a CMS here. You’ll know them once you start creating your WordPress website.
Alright, We have come a long way. Now that you have a good understanding of everything that is related to websites, in the next lesson, let’s have a quick recap by taking a look at how everything works together. And trust me, the theory ends in the next chapter.