How a Website Work? what is browser or client side language?

 A website is a collection of web pages. A web pages are made up of elements like images, videos or hypertext linked to another pages. A web pages written in hypertext markup language (HTML) and styled using cascaded style sheet (CSS) and Javascript (JS). All three languages (HTML, CSS and JS) are mainly known on browser-side or client-side languages. However, technically HTML and CSS are not programming languages and JS is text-based programming language used in both client and server side. The purpose of using HTML, CSS and JS is to make web pages stylish and interactive. On the other hand, server-side languages such as Node-Js, PHP and Python, are used to connect or serve the client-side to the database. It is also called as backend languages. A web pages written in HTML code is decoded using a web browser such as Google chrome, Mozilla Firefox, Microsoft edge or safari etc. These web browsers decode the HTML code and present us what has written in it. Figure 1 shows the interaction between the client and server to fetch the web pages from the database.


Figure1: Client and Server architecture.

Each website has a unique web address also known as uniform resource locator (URL). A URL consists of scheme (such as http or https), domain name, along with the other details information to direct the browser to reach the specific page present on the internet. Web browser will translate the domain name to IP Address with the help of Domain name system(DNS) server. In simple terms, whenever user type a web address in a browser, the DNS returns an IP address to the browser after matching that address with registered address to identify the required website. To fetch the web pages, a series of hypertext transfer protocol (HTTP) request and response handshake will be done between browser and host server before transmission of web pages.  A hypertext transfer protocol (HTTP) protocol is a transmission control protocol/ internet protocol (TCP/IP) communication protocol used to communicate between the web browser and host server. HTTP performs these operations using specific request method such as GET, POST, PUT, HEAD, DELETE, OPTIONS, CONNECT and PATCH. The fetched data is written in HTML code which web browser can easily understood and transmit to user. 


Figure 2: Detailed explanation of how a web pages are fetched.

Technically, HTML is not a programming language but it is a standardized format which describe the structure of the web pages. CSS will add the color or style to the HTML files whereas JS is used to make web pages interactive.  Along with styling and making web page interactive, different encrypting or decrypting algorithms are also used to add security features. Web browser read the HTML code or file and parse data to display on the screen. The figure 2 explain the detailed description of how the website or web pages are fetched to your computer.

What is browser or client side language?

client or host is a web browser which request web pages from the server and display to the end user. The client side scripting is visible to the user. A client-side or browser side language is the language used to write on the client side to present the layout view of the web pages fetched. A client-side languages make the web pages interactive, stylish, dynamic and responsive to the users. The most commonly languages are hypertext markup language (HTML), Cascading Style sheet (CSS) and Javascript (Js):

1.   HTML: HTML is a building block for web development which provide the structure of the web page. HTML is a markup language having the well-formed format to specify the document or element such as heading, body, list, link and paragraph etc.

2.    CSS: CSS describes the how the html elements will display on the screen. It provides the style or color to the web pages which make it attractive.

3.   JavaScript: Javascript is use to provide the web pages interactive elements to make the website dynamic in nature. It provides a life a to a web pages.

The advantages of client-side scripting is:

  • Well defined format structure for using syntax.
  • Responsive and interactive with the user.
  •  It allows more controlled behavior and presentation tools to the user.
  • It provides flexibility and usability to the user.

The client-side scripting only provides the front view of the web pages i.e. how or where the data will be stored in the database, how to fetch it and how to interact with the client request etc. will be handled by backend side or server-side scripting languages. Data accessing methods, error handling and fast processing will be taken care by server-side scripting language. We can easily understood the difference between client-side and server-side scripting language from the below table:

S. No.

Client-Side Scripting Language

Server-Side Scripting Language


1

Client-Side scripting is used at front end and visible to the user.

It is used at the backend and not visible to the client or host.

2

It mains purpose is to interact with user and provide the structure to the web pages.

It main purpose is to provide interaction between client and database. It handles how to fetch and process data request from the client-side.

3

It has pre-defined structure and does not provide any security features to the user.

 Though , it also have pre-define syntax format, It provides more security hidden feature to client end. 

4

The most commonly used languages are HTML, CSS and JS etc.

The most commonly used languages are Ruby, Python, Java, PHP etc.

Server-Side Scripting: The server-side scripting is the programming that provides interaction between the database and client-side. The operation like response generation to the queries, accessing the database, security and so on are performed at the server-side. There are the multiple programming language which can serve these purpose such as:

1.    PHP: PHP Hypertext Preprocessor is the server-side scripting or object-oriented language developed by Rasmus Lerdorf. It is used to develop static and dynamic websites, manage dynamic content, database, session tracking etc.

2.  Java: Java is a class based, object-oriented programming language designed by James Gosling and developed by Oracle corporation. It allows developer write once, run anywhere (WORA) principle. Java application are compiled to bytecode that can run on any Java virtual machine (JVM).

3.   Ruby: Ruby is an interpreted, high-level object-oriented programming language developed by Yukihiro Matsumoto. It is dynamically typed and uses garbage collection. It has similar syntax to programming language Java and C.

4.     Python: Python is a popular interpreted, high level language with syntax in similar to English language written by Guido van Rossum.  It is mostly preferred by user working in machine learning, data science and artificial intelligence. The versatile large collection of library package makes this language compatible and easy to use.

 In Laymen language, client-side deals with how it will be visible to you when you request the web pages whereas server-side deals with how it be managed or stored at the backend, how to authenticate or encrypt your data or files.

         <<<<What is Computer languages and its type?>>>>>>

Post a Comment

1 Comments