nextwebgen.com

The Next Generation Web Now

A Java-based HTTP Proxy for Ajax

Filed under: Web 2.0 News, Front Page, Java, Programming — Chris Cornutt at 7:53 am on Friday, July 21, 2006

On the Java.net blog of Greg Murray, he demonstrates a method of creating a proxy client in Java for an XMLHttpRequest of your choice.

One drawback of working with AJAX is that an AJAX-based client cannot make calls to URLs outside of its domain, which means that it cannot access services located on another server. To overcome these problems, you need a generic proxy that can communicate with external services on your client’s behalf. The proxy passes a call from your client application to the service, receives the content in response from the service, and returns the content to your client. You can then use this content in your AJAX-based application.

With the brief explaination out of the way, Greg gets started with the code/application. First off, he includes a graphic (sequence diagram) to show how the flow of the application will go - in his example, a request to the geocoding interface at Yahoo. His framework of choice to work with is the Project jMaki proxy functionality.

Where the blog post gets a little sparse on the details, this doucmentation on the Project jMaki site provides the complete story - code and all. Check it out!

J2EE and AJAX: AJAX with Servlets

Filed under: Web 2.0 News, Front Page, Java, Programming — Chris Cornutt at 4:07 pm on Wednesday, July 12, 2006

The use of J2EE in development work has been growing at a staggering pace over the last few years. Developers are finding its environment and capaitilities to be just what they need. One thing that it’s missing though, is a good method to interact with the user. Sure, there are the usual web interaction methods, but why use those when you can incorporate Ajax into your application? Not sure how? Check out this new tutorial from DevArticles for the full scoop on using Ajax either client-side or as a servlet at server-side.

AJAX provides asynchronous communication service through JavaScript and XML. Thus a good combination can be formed by using AJAX at client-side and a servlet at server-side, providing a non-obtrusive, responsive and highly interactive web experience.

In this discussion, I will focus on utilizing such a winning combination. The first sections will detail the steps required for setting up an application for utilizing AJAX along with a servlet. In the last section I will develop a registration module that will use AJAX to check the availability of the username.

They start off with the basics - how to set up the XMLHttpRequest object and create an interface to pass the information to it. Next up is handling the state change of the object (when something, anything happens) and the generation of the XML response. Finally, they thie things together into a chunk of code that can send a message and retrieve the results from the request.

JavaRef: Ajaxified JavaDoc

Filed under: Web 2.0 News, Front Page, Showcase, Java — Dion Almaer at 1:42 am on Thursday, June 29, 2006

All Java developers can spot the look and feel of JavaDoc a mile away. The new JavaRef (developed with the Apache Tapestry Java web framework) aims to give you another take, allowing you to search JavaDoc of over 80 projects.

On the Ajax side it provides:

  • Class/package/method search with auto-complete
  • Tabbed display of information for classes that brings in information as requested
  • Navigation across libraries for class references
  • Usage information
  • Floating method navigator

Ajax JavaDoc

Interview with ZK Creator Tom Yeh

Filed under: Web 2.0 News, Front Page, Java, Toolkit, Ajax, Server, Framework — Rob Sanheim at 10:44 am on Wednesday, June 28, 2006

Agile Ajax has posted an interview with the creator of ZK, the server-side GUI framework for writing ajax apps with “no javascript and little programming”. ZK has some similiarities to Echo2 and GWT, though Tom Yeh, the creator, discusses the differences:
on Echo2:

Echo2 assumes UI designers are Swing programmers, while ZK assumes they are mostly non-programmers

on GWT:

From a technological viewpoint, [GWT] is a complement. GWT is a client-side solution and quite good for developing Ajax components. It is never a good idea to replicate the business logic to the client, which eventually brings us back to the maintenance headache of fat clients. In addition, loading and evaluating huge JavaScript files into the client is not fun at all.

The interview goes on to cover the strengths and weaknesses of ZK, Dojo and Atlas, and future plans for the framework. He also closes with a common complaint about the Ajax community - the over abundance of frameworks and resulting confusion. A chart breaking down the major players and their pros and cons would be a great help to many developers who are trying to figure out where to start.