Home     |      Learn AJAX     |      Forum     |      Register     |      Submit Resource     |      Submit Article      |      Contact Us

Home Java
 

Implementing Java in Comet

 

Comet is considered the next big step of Ajax based applications. The client side has always been the strong feature of all Ajax based applications. However, the next big thing about the programming technique is not on pushing the client side more but on reverting to the server side for increased stability and security.


But Comet is not a powerful programming technique in itself; this is often seen as an additional API for the client of Ajax. The client side will be handling the user-interface of the application while the server side will be handling data processing. By adding Comet, the server-side becomes a major role player in an Ajax based application.


Considering the Java Platform

Since Comet is running in the server side, additional programming techniques could be considered so that the application could add more functionality. Among those programming techniques is Java. In fact, Java is one of the few programming techniques in RIA that helps developers who wanted to work on Comet. Comet is still a relatively new concept for most developers but Java has focused some of its resources to harness the functionality.


Implementing Comet in Java is not a walk in the park though. Since Ajax is a challenging programming technique, implementing Comet could be the same. The challenge is based on the fact that you have to go through tools if you want to properly implement Comet. But the learning process is actually very easy which basically eases the programming steps.


Grizzly ARP

Java has developed an application that will assist developers inject Comet functionality in Java. This is done through Grizzly ARP. Developed by Jean-Francois Arcand; this type of programming language homes to connect the functions developed by Comet.


Before connecting Comet to Java, developers still need to build the comet function before they are fully integrated in Java. The function CometEngine will have to be utilized before they are fully used in Java. After the function has been set, it will be wrapped in Grizzly ARP as an API. What you will end up having with the assistance of Grizzly ARP is an API that could be fully injected in Java. By building an application through an API, reusability becomes a possibility.


Using NIO (New Input/Output)

Probably the best feature of the Grizzly ARP is in its ability to harness the power of Comet without changing its components. Regular Ajax and JavaScript applications on the client side will be using thread to ensure communication. Although using thread could be a fast paced data processing system, it still needs consistent request from the user or the system before it could implement tasks or transmit data.


Comet on the other hand, uses NIO (New Input/Output) which is basically an open-form thread. Instead of requests, data transmission will be constant. This will really bring out the powerful features of the application as data and functionality will continuously flow in the browser. With Comet, you can inject constantly changing functions such as chat in your application. The options are almost endless when you properly implement them especially with the help of Java.



Read Next: QwebIRC



 

 

Comments



Post Your Comment:

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

Sponsored Links