Static vs Dynamic Website

Static vs Dynamic Website

·

2 min read

Static Websites

So a static website or a simple website it is when a developer uploads final ready to be served files of a website onto the webserver.

Basically static websites are nothing just the simple website we all used to create while learning web development. static websites are constant everytime you open , like we all have created a simple games using html,css,js these types of websites are always similar whenever you open it . But in case when we open twitter website it is not the same everytime . It changes according to database that's why we always see new tweets everytime we open the website or reload.

s2.jpg

In static websites everything is done in frontend only there is no backend or database . It is browser's responsibility to render all the files it has received from the server.

Dynamic Website

So dynamic websites are different from static website because they are built on server each time a new request arrives through a browser .

Dynamic website usually contains a database and there is also an app running which fetches data from database together with predefined template and then it builts a website dynamically after getting data from database . This whole process is also known as server-side-rendering .

d.png

Here twitter example works perfectly each time you reload the page or make a new request to access twitter it always shows you new tweets because it is fetching data from its database with the predefined html template and builts a website on server it self . It means there is no work remaining on frontend .

now a days there is one more type of websites are getting popular .

API Powered Websites

API means Application Program Interface it is just a piece of software can be used by another piece of software .

Just like dynamic everything is same the big difference is here we dont send the whole template to the server we only share the data to the browser usually in the JSON format.

api2.png

In this case the process of building the website is done by the frontend developer because we only send the data to the browser . After sending the data to the browser there is no work remaning for the backend developer.