We are now in Internet age and one of the software we use on regular basis, except OS, is browser. If we calculate the average time we spend with browser in one day, it would be more then the time spent on most of other software's in a week!!
but did we ever thought that what browser is and how it works? I am sure most of us never thought on it.
For me, browser, or in specific, 'Web Browser' is a client software which help us to communicate with different server machines. We discussed about communication and protocol in our last blog.
As we know that to make a communication we need two things. 1) network and 2) Protocol.
So it is true in case of browsers also. It require network and usually supports all standard protocols like HTTP, HTTPS, FTP etc.
Lets discuss something about HTTP now.
HTTP is Hyper Text Transfer Protocol with support HTML (Hyper Text Markup Language) and it is a stateless protocol.
It is very important to understand the meaning of stateless here because it is the only reason behind evolution of Web development languages like ASP, Servlet, JSP etc.
A stateless protocol starts with a request and end with a response from server. It can not maintain the transactional data by itself.
To understand it better, lest assume a login page where user pass login Id and password and it return welcome page if login credentials are correct.
Now there are other links to go from login page but how those page will know that login was successful at last time and the user sending page request is having any account. More over if page is suppose to display user specific data the for which user date needs to be displayed as HTTP already lost the request and response data.
To handle these scenarios programmers needs Session Management which we will discuss in future blogs.
Showing posts with label Basics. Show all posts
Showing posts with label Basics. Show all posts
Tuesday, October 19, 2010
Protocol and Network
While writing my first code for client server environment, I was quite amazed to see how it works. It was a thick client chat server and client code, written on Swings with Socket program in early 2000.
First thing I learned by this program was the term "Protocol". For me protocol is like a language grammar. While communicating, we need a mutually understandable language and a medium by which we can pass the expression.In same way protocol help two different entities to fix their grammar and communicate on network medium.
It is like a universal truth, any types of machines can communicate with each other if they have set protocol and communication medium.
Now a days, most popular medium is 'Internet' as many of us must be aware of that internet is also a network so any machine connected with a network can use network as medium.
Other used mediums are , Intranet, LAN(Local area Network) , WAN( Wide Area Network) etc.
Now in terms of Protocol, most popular and simpler is HTTP (Hyper Text Transfer Protocol).
HTTP is a grammar by which two machine can understand each other's messages.
Think about a letter you have received filled with 1's and 0's..you will definitely feel puzzled..isn't it?
but if you know binary number format, you will try to convert it to some meaningful number's..
but what after it.. will those number give you any clue for the message.. you may further try to decode it with some pattern..but what if you know the pattern?..life will be easy for you!!..
you can read the message now..
Protocols help machines to write data on network and recover it from network so that machine can understand it.
Some other popular protocols used now a days are.. FTP (for File Transfer), WAP( for wireless Access) SOAP(Simple Object Access Protocol for web services communication) .
One thing I would like to mention over here that, it is not necessary to use Standard protocol only for communication. If you know socket programming then you can create a socket and Server socket where socket can pass any message to your server socket in your defined protocol.
I have used it in my chat program, where multiple messages were sent via a delimiter(||).
I will post a code snippet of writing such program later.
First thing I learned by this program was the term "Protocol". For me protocol is like a language grammar. While communicating, we need a mutually understandable language and a medium by which we can pass the expression.In same way protocol help two different entities to fix their grammar and communicate on network medium.
It is like a universal truth, any types of machines can communicate with each other if they have set protocol and communication medium.
Now a days, most popular medium is 'Internet' as many of us must be aware of that internet is also a network so any machine connected with a network can use network as medium.
Other used mediums are , Intranet, LAN(Local area Network) , WAN( Wide Area Network) etc.
Now in terms of Protocol, most popular and simpler is HTTP (Hyper Text Transfer Protocol).
HTTP is a grammar by which two machine can understand each other's messages.
Think about a letter you have received filled with 1's and 0's..you will definitely feel puzzled..isn't it?
but if you know binary number format, you will try to convert it to some meaningful number's..
but what after it.. will those number give you any clue for the message.. you may further try to decode it with some pattern..but what if you know the pattern?..life will be easy for you!!..
you can read the message now..
Protocols help machines to write data on network and recover it from network so that machine can understand it.
Some other popular protocols used now a days are.. FTP (for File Transfer), WAP( for wireless Access) SOAP(Simple Object Access Protocol for web services communication) .
One thing I would like to mention over here that, it is not necessary to use Standard protocol only for communication. If you know socket programming then you can create a socket and Server socket where socket can pass any message to your server socket in your defined protocol.
I have used it in my chat program, where multiple messages were sent via a delimiter(||).
I will post a code snippet of writing such program later.
Subscribe to:
Posts (Atom)