Learn node js, angular, php best practices. A self learning platform to learn web development. Learn modern web development technologies.

July 27, 2019

The Web Programming Basics You Must Know For Sure

Web Programming Basics


Web programming
refers to the programming that involves writing, markup and coding in order to create web pages. Typically, two different paths exist in this regard. One path is called as front-end and another as back-end.



Front-end and Back-end Programming


Front-end technology mainly deals with what is actual look and feel of the web page, it is used to create user interface of a web page, whereas back-end technology deals with functionalities of the web page.

Front-end and Back-end Programming Use cases


Let's understand front-end and back-end technology use-cases in a real world scenario. Suppose, you open facebook.com in the browser. Then what you actually see in the browser is created using front-end technology. When you try to log in to facebook by entering email address and password, then the credentials provided by you is checked against the email, password that is stored in facebook's remote server and if it is correct you are redirected to the dashboard page of facebook. This functionality is implemented with the help of back-end technology.

Most common languages used for front-end programming are as follows.

  1. HTML
  2. CSS
  3. Javascript

Languages used for back-end programming are as follows.

  1. Java
  2. PHP
  3. Python
  4. Ruby
In this article, you will know each concepts that is related to web programming, after you finished reading this article, you will have a solid grasp of knowledge on web programming.

Web Application


A web application is a type of application that is capable of displaying dynamic content. The contents are dynamic as server-end generates all of the contents depending on the request made by the client end (the browser).

Ok, I got it, web application is dynamic one,right? But tell me what is a Web site?


In simple words, a web site is a collection of web pages that has static content. If a user is browsing a web site, he or she will see pages whose contents will not change based on different request made from the browser.

Introduction To Inner-workings of a Web site


Web consists of billions of clients and server connected through wires and wireless networks. Here, the client refers to any device that sends requests to the server . The server is a computer or workstation that can be located anywhere in the world . Clients send requests to web server, the server receives the request, finds the resources and sent the response back to the client.  The client uses some type of application program(i.e, browser) to send request to the server. The server typically sends response to the browser with HTML(Hyper Text Markup Language). Then the browser interprets the HTML and then renders the web page. After this process is finished we are able to see the web page in browser.

Client Server Communication
Client Server Communication

Mode Of Communication Between Server and Client


Communication between server and client is established via something that is known as HTTP (Hypertext Transfer Protocol). HTTP is a protocol, protocol refers to a set of predefined rules that must be mutually accepted by both server and client in order to smoothly transmit data between them.

HTTP allows simple request and response communications between client and server.

Different Types Of HTTP Methods


There are 7 different types of HTTP methods available, but most often 2 of them are used frequently. These methods are GET and POST methods.

GET Method


This method is primarily used to fetch data from the server. If some data needs to be sent through this method, then that data needs to be encoded first in order to send them to the server.

GET is the default method when the browser tries to send data to the server and it produces a long text that is visible to the browser's address bar.

For example, when you open Google.com and type a query and hit search, you will see something similar as shown in the screenshot below.

GET Method Example
GET Method Example

Explanation of Above Example


If you carefully observe the highlighted red rectangle, you will see &q=how+to+google. Here, &q refers to the search query. The & symbol is required as it is required to separate different query parameters used in the GET method. After you mention the search keyword in an encoded format google can understand that quiet easily. During encoding process, the blank space character is converted to '+' symbol.

POST Method


The main purpose of using this method is to request for some resource to the server. At the same time it is also capable of sending form data to the server. This method is more reliable compared to GET method as the data that you send through POST method is not visible in the browser's address bar.

Conclusion


I hope you have found this article about web programming as helpful to you. If you do so, please share it among others. As you know sharing is caring. Thank you!

No comments:

Post a comment