• sashi

Web Model - (Basic)

Updated: Jun 26, 2020

There are a few different ways to create websites. This article presents three of them for a brief introduction.

The simplest implementation is to create a static web site. In this implementation, the web server returns a static HTML page with a response to a browser’s HTTP request. The static web pages have the same presentation and content, regardless of user identity or other factors. It is easy to generate a static web page; however, it is limited to what we can do with it since the page always displays the same thing. For example, if we click, say, www.staticpage.com, in a browser, we get the same content every time we click the link.

See the picture below.


Static website

If we want to have a more useful and diverse web site, we need to create a dynamic website. In this case, the web server returns a dynamic HTML page instead of a static web page. A dynamic web page contains customizable content, according to a user identity or other factors. It typically uses a storage media to store the data such as a database. For example, if we click www.yahoo.com, the content is always updated and display different material.

This mechanism uses a server-side rendering.

The two methods introduced above are rather traditional. A recent model is called a single page application. The problem of the dynamic approach above is a performance. The server needs to gather data from storage media and generate HTML pages and the transactions go through an internet each time the page is requested. Let say if we have 100 web pages on your website. In general, there will be 100 HTTP transactions between a client and a server.

The motivation of the single page application is to reduce the latency with the server-side rendering. When a client requests a page from a website, the single page application initially returns with necessary items such as HTML, CSS, JavaScript, etc. After the initial load, the page rendering occurs on the client-side. Therefore, no HTML are generated on the server-side. Most of the transactions between the client and the server, therefore, will be data only.

This client-side rendering reduces the latency introduced by the multiple HTTP traffics and the server-side rendering. A single page application uses client-side rendering.

The recent trend, however, is to generate the initial page on the server-side to reduce the initial load time. Therefore, it is a mix of client and server-side rendering. The problem of this approach though, is a difficult implementation.

Single Page Application

[1] HTML means Hyper Text Markup Language. HTML is the standard markup language for Web pages. [2] HTTP stands for HyperText Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted.

8 views0 comments

Recent Posts

See All