In order to start with Advance Java, we need to first understand what is the difference between Web Sites and Web Application.
Websites
A website is a collection static files, HTML pages, images and other static resources, by static we mean those resources which are not going to changes with user interaction. When user visit the same website and performs some action they will get the same output, for example a college website which only provides informational data is not going to change with user interaction.
Web Applications
Web applications on other hand are dynamic, they are part of some website which provides dynamic functionality to the website. When user interacts with web applications out may change depending on the inputs provided by the user. With the help of web application we can make our sites interactive. Examples of web applications are www.amazon.com, www.flipkart.com etc.
How a web application works?
In order to fulfill user's request web application runs a program or group of programs on server and then produces some output for the users. Most of the interactions in a web application is done through HTML forms.
HTML forms are a way of taking inputs from users in a web application, you can visit www.w3schools.com for more information on HTML forms.
Interaction between user and web application takes place in form of request and response object. Browser is the application which handles these request and response objects. When a user is clicking on a link or entering a URL in the browser, he/she is actually requesting something from server. Server is the environment where web applications are hosted or in simple terms it is the machine where all the resources of a web application resides. When server receives a request, it parses the request and look for the resource requested and then create a response object and return it back to browser from where the request has been raised.
Consider below example :
1. For registering on a web site, user clicks on "Sign Up" button, which raises a request for an HTML form for taking user's detail.
2. The server receives the request and responds back with HTML form requested.
3. User fill up the form and click on "Submit" button, browser form's data in request object and sends it to the server.
4. Server process the submitted data and either it creates the user or user registration gets failed. In either cases server responds back to user with proper message in response object.
How web applications are created?
There are so many technologies available using which we can create web application components for our websites. Some of the commonly used technologies are JSP, Servlets, PHP, ASP.NET etc.
In early stages of web application developments Common Gateway Interface (CGI) were used to create web applications. CGI is a server side program which is invoked when a particular URL is loaded into the browser. CGI programs
HTTP Request and HTTP Response
The request and response object that we have talked so far are actually HTTP request and response object which are transfer back and forth using HTTP protocols.
We will now learn about creating web applications using servlets. If you have any doubts in regards to this post, please let me know through your comments I will be happy to resolve your doubts.
Websites
A website is a collection static files, HTML pages, images and other static resources, by static we mean those resources which are not going to changes with user interaction. When user visit the same website and performs some action they will get the same output, for example a college website which only provides informational data is not going to change with user interaction.
Web Applications
Web applications on other hand are dynamic, they are part of some website which provides dynamic functionality to the website. When user interacts with web applications out may change depending on the inputs provided by the user. With the help of web application we can make our sites interactive. Examples of web applications are www.amazon.com, www.flipkart.com etc.
How a web application works?
In order to fulfill user's request web application runs a program or group of programs on server and then produces some output for the users. Most of the interactions in a web application is done through HTML forms.
HTML forms are a way of taking inputs from users in a web application, you can visit www.w3schools.com for more information on HTML forms.
Interaction between user and web application takes place in form of request and response object. Browser is the application which handles these request and response objects. When a user is clicking on a link or entering a URL in the browser, he/she is actually requesting something from server. Server is the environment where web applications are hosted or in simple terms it is the machine where all the resources of a web application resides. When server receives a request, it parses the request and look for the resource requested and then create a response object and return it back to browser from where the request has been raised.
Consider below example :
1. For registering on a web site, user clicks on "Sign Up" button, which raises a request for an HTML form for taking user's detail.
2. The server receives the request and responds back with HTML form requested.
3. User fill up the form and click on "Submit" button, browser form's data in request object and sends it to the server.
4. Server process the submitted data and either it creates the user or user registration gets failed. In either cases server responds back to user with proper message in response object.
How web applications are created?
There are so many technologies available using which we can create web application components for our websites. Some of the commonly used technologies are JSP, Servlets, PHP, ASP.NET etc.
In early stages of web application developments Common Gateway Interface (CGI) were used to create web applications. CGI is a server side program which is invoked when a particular URL is loaded into the browser. CGI programs
HTTP Request and HTTP Response
The request and response object that we have talked so far are actually HTTP request and response object which are transfer back and forth using HTTP protocols.
We will now learn about creating web applications using servlets. If you have any doubts in regards to this post, please let me know through your comments I will be happy to resolve your doubts.
No comments:
Post a Comment