Introduction to Ajax
From the name , we can conclude that it is javascript dependent i.e. Ajax is browser
dependent .
Ajax is
the most popular and Rich Internet Application (RIA)
technology now a
days .We can say that in Every project from Web to Mobile Ajax is widely used
by developers.Ajax is introduced by Google (in Google Search suggestion) in the
year of 2005 .
Why we use
Ajax?
In most of
the scenario we need to fetch data from
server and require to show on the current page or some portion of the web page
without pageloading and refreshing of entire page . for example , like in Gmail,
during email id creation system checks
automatically whether any user exists with desired username or not .So, we can
define ajax as
“Ajax
client side scripting language which provides
an easy way to retrieve data from a URL i.e, from server without having to do
postback (reload) or refresh of entire webpage.”
In Short, we can say that, we can say that a request
automatic or on click etc. goes to server through ajax request in background(i.e.,
the user would never know that any request was even gone to the server) and the
server returns some result which will be display in the some portion of the
webpage without reloading or refreshing the entire webpage.
Scenario where we can use
Ajax –
Suppose
we have Registration page, during registration we need to check whether given
email id already exist or not on email’s textbox change without any page load
or page refresh. if exist then message appears like above .
In
this scenario, we are going to call an Ajax request on email’s textbox change
to check the above. For doing this, we need to create a database driven Java
servlet / jsp page which checks that the email id exist in database or not .
No comments:
Post a Comment