Saturday, June 1, 2013

Web Browser’s Role

In the last post about Web Server's Role we understood the web server's role in communication between client and server. Now we will understand what Web Browser does in day to day activity while communicating.

As web browsers works in front-end and despite due the reason it attention web browser receive, their role is relatively simple.
  1. Send request.
    1. Web browser makes request to web server which are generally in terms of http://www.example.com, then the www.example.com is resolves by Domain Name System (DNS) address and then it uses the HTTP to establish connection to web server.
  2. Authenticate the server.
    1. If the communication between web browser and server uses HTTP Secure (HTTPS) then it uses certificate to authenticate the server and decrypt the future communication.
  3. Process the Response.
    1. Browser should respond appropriately to response of web server. In response of web server it intact the reference of images, videos in HTML or error redirection.
  4. Display HTML.
    1. Web browser uses HTML standards to determine how to display HTML webpages to the user.
    2. As HTML support the embedded objects, it have to display dozen of objects to render single webpage.
  5. Run Client Script.
    1. Client scripts like JavaScript should be supported by the web browser to enable interactive and responsive pages without reloading the page.

Web Server’s Role

In last post of Understanding Web Communication we saw the two distinct parts of Web communications. Now we will understand what is the role of Web Server in web communication.

The Web server provides content and the web browser display it to the user. In simple, a web server sends the static files, generally a static HTML or images files using HTTP connection.

The modern web server do far more. It does some basic actions to

  1. Verify that the request is structured legitimately.
    1. Malicious client can malformed web request to compromise web servers.
    2. This should be detected by the web server and generally it should be ignored.
  2. Authenticate itself.
    1. If we are using HTTP Secure protocol then web browser uses certificate to authenticate the server.
    2. Web server will return the information in encrypted format.
  3. Authenticate the user.
    1. If the information is sensitive then web server verifies that the user has submitted credentials.
    2. If user have not submitted it then it returns redirection for user to authorization form.
  4. Authorize the user.
    1. After the authentication of user by web server, it should verify the user is allowed to access specified content or not.
  5. Determine how to handle a request.
    1. If user request the static content then web server can directly respond to request.
    2. If user have requested the dynamic content then web server must transfer the request to ASP.NET.
  6. Handle Errors.
    1. If the users request can’t be processed then web server should provide the detail error information to web browser.
  7. Cache Output.
    1. To improve the response time for request, generally web server can cache output.
    2. Web server provides the caching information to web browsers so web browser know how long to keep the content cached.
  8. Compress output.
    1. Before returning a page to a web browser, a web server can compress the content to reduce the bandwidth required.
  9. Log Access.
    1. Web servers typically record the usage/request information for security and monitor the performance.

Understanding Web Communications

Web applications have two distinct components as follows:

  1. Client 
    1. It is front-end interface. It consists of user interface, acceptance of input from users, sending of data for server processing.
    2. Generally, web browser represent the user interface to user.
  2. Server: 
    1. It is back-end interface. It responds to request made by clients after processing input data.
    2. Response consists of HTML pages that indicates instruction for web browser regarding generation of user interface.
The client (Web Browser) and Server (Web Server) communicate by using Hypertext Transfer Protocol (HTTP). It is a text-based network protocol assigned to TCP port 80. If the additional security is needed then server can apply for certificate, which allow you to use HTTP Secure (HTTPS). This will authenticate the server and encrypt the communication between server and client. HTTPS is assigned to port 443.

Hello World

From today, I'm starting posting about basic programming fundamentals used in developing web-application using ASP.NET 4. This will cover up some basic concepts about 

  • Web Server
  • Client, Sessions
  • Cookies
  • Handling Data
  • Active Data Objects (ADO)
  • Themes
  • Master Pages
  • and many more
This are the very basic concepts regarding web development but at the end basis are what important. I will be writing what I have understood from practicing, observations and my perception regarding the topic I will be covering up. If any mistake or error you noticed please let me know, so I can correct it and make my understanding more clear.

Happy Programming!