Gosling Outlines the Trouble With AJAX

Q&A: James Gosling, Sun Microsystems executive and creator of Java, talks about the future of AJAX and Sun's highs and lows in the software arena.


James Gosling, the creator of Java and chief technology officer of Sun Microsystems Developer Products group, believes Sun is leading the way to enabling developers to incorporate Asynchronous JavaScript and XML components into Web applications. But building those components is another story. In an interview with eWEEK Senior Editor Darryl K. Taft, Gosling discusses some of Suns highs and lows in the software business.

Whats Sun doing in terms of AJAX support and what do you think you could do more of? What are Java developers asking for?

What were doing these days is a combination of things. One is to make sure that the server-side frameworks like JSF [JavaServer Faces] will work well with the various different client frameworks like AJAX. So using JSF you can build JSF components that download AJAX on the client. They do the interaction using AJAX so that people can use it pretty easily. At a level up we move a lot of effort into the tools so that when you use something like Creator and the enterprise stuff in NetBeans, then you can incorporate AJAX components into the Web pages that you build.

So we end up with this kind of meta-component model, where we can use components of many different kinds and get them to all work together. Whether its AJAX or applets or plain old HTML, they all play together. And that works pretty well. Thats sort of the area that we get the most demand from developers.

/zimages/5/28571.gifClick here to read about the delivery of Suns Java Studio Creator 2.

The place where theres sort of black magic right now that were trying to figure out what to do in, is around how you create AJAX components. We can make it pretty easy to use AJAX components. There are a bunch of folks out there that just need to use them. But theres a dramatically smaller community of people that create them.

Creating them is extremely hard. Not because programming JavaScript is hard, but because all these flavors of JavaScript are ever so slightly different. You have to build your components so that theyre adaptable to all the different browsers that you care about. And you have to figure out how to test them. None of the browsers has decent debugging hooks. We could build little things for people where they could test these components.

The problem is that it wouldnt be exactly the same environment as being inside Internet Explorer or being inside Spark or being inside Firefox. And those environments are pretty limited. Pretty much all you can do is include a bunch of printfs—capture the log input as printfs—[with] no ability to look at variables or segue points or single-step things. Theres no ability to do cross-platform QA; youve just got to do them one by one. Right now it looks pretty hopeless to make AJAX development easier.

So would that be an area you guys would want to go into?

Well, if we could figure out a good story, it would be nice to go into. We havent come up with a story there that says anything terribly useful.

Do you think anybody has?

Well, the problem is just intrinsically really, really hard because of the divergence of the platforms. And theres a bunch of things people do to try to make that better. Like there are a number of libraries that exist that try to paper over the differences, but lots of difficulties exist.

Next Page: Pick your favorite blunder.