AJAX Made Easy - Learn AJAX



Java Tutorials

 
Home Java
 

XMLServlet and XMLGenerator Data Portability

 

A common programming language often used with frameworks to develop Ajax based application is Java. Although the coding technique of Java and JavaScript (for Ajax) is different the behavior of Java could be easily compared with JavaScript. Both offer client side interaction which displays results of queries from users without page refresh.


The creation of new techniques in porting Java to Ajax has led to the development of frameworks. The difference of Java and Ajax is now a thing of the past since they can now be used together in a single application. However, Java will not take the center stage since its functions is geared towards compatibility with Ajax.


A good example of Java for Ajax is a simple JavaServlet called XMLServlet. This servlet shows the data portability of Java since it can interact even with XML of Ajax. XMLServlet connects with the JavaScript counterpart to enable data transfer from Java to Ajax.


XMLServlet connects to Ajax via Http Request. The rest of the process follows the simple Ajax processes. The distinctive characteristic of this servlet is that its CONTENT_TYPE is on text/xml. This signifies the dedication of the information towards the Ajax based application.


This is a simple type of integration of Java with Ajax. Developers have been able to use XMLServlet because the robust behavior of Java when it comes to data portability. This is often used through mashups wherein the original source of information is from a Java enabled website or application.


Transferring data directly to the Ajax based counterpart may not work as expected. Instead of taking chances, developers created a new function. Through XMLServlet, they can easily transfer data from Java to Ajax.


Query from the client side towards its Java counterpart is also possible through XMLGenerator. This also works like XMLServlet except that it responds to queries with a specific set of answers. The XMLGenerator could easily work in fetching data since it interacts with Java Database with an XML Option.


This type of server to client side connection is not standardized yet but has been recognized in most browsers. By focusing on XML Option the XMLGenerator becomes lightweight especially it only has one property which is XMLResponse.


The key feature of XMLGenerator is its ability to respond in lightweight manner but would still come up with functions which will enable connectivity with other functions. After XMLGenerator finishes its search process, it will create OracleXMLQuery which is an object.


As an object, it can now be connected to other functions. The result is a very powerful Ajax based application with a reliable server. The data is fetched by Java and the rest could be taken over by different development techniques depending on the developer’s preferences.


XMLServlet and XMLGenerator are two of Java functions that could easily interact with Ajax. These functions are dedicated to XML for better data portability and search results are created as an object. This will enable the developers to build an application through data transfer of XMLServlet with query results of XMLGenerator.



Read Next: Turn components into AJAX-aware components AjaxAnywhere


 

 

Comments



Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links