Some of the more important takeaways from this chapter are as follows:
- Ajax and Java EE support a nice separation of concerns, where server-side Java EE handles the hard-code SOA integration and deployment of Web service endpoints, and Ajax provides an attractive and user-friendly front-end.
- The entire application, Ajax front-end, and Java EE back-end can be bundled as a single EAR for painless deployment to any Java EE application server.
- Creating Ajax applications requires a mastery of JavaScript and HTML DOM that may not be familiar to most server-side Java EE programmers. However, as I illustrated in the SOAShopper search example presented here, it is not too difficult to pick up those skills.
- When creating and deploying Java EE service endpoints, it is probably good practice, at least for the more complex services, to create a simple Ajax front-end to go along with the service. An Ajax frontend makes it easy for the consumers of a service you have written 480 Ajax and Java Web Services to visually experience the data your service returns. The ability to "play" with a Web service in such a manner can give a developer a much better intuitive sense for the service interface than a WSDL or XML schema.
-
Excerpt: Ajax and Java Web Services (8 messages)
- Posted by: Joseph Ottinger
- Posted on: June 12 2007 11:53 EDT
This chapter from "SOA Using Java Web Services" examines how to build an Ajax front-end to an online shopping application. Through detailed code examples, it walks you through building an Ajax application that consumes RESTful Java Web services endpoints.Threaded Messages (8)
- Use Google Web Toolkit by David Tinker on June 13 2007 01:52 EDT
- Yahoo UI Toolkit by Sameer Wadkar on June 13 2007 10:40 EDT
- Re: Yahoo UI Toolkit by Jesse Kuhnert on June 13 2007 10:56 EDT
- Tibco GI is pretty good too by KAK W on June 14 2007 12:45 EDT
- DWR by Rauan Maemirov on June 15 2007 14:29 EDT
- Yahoo UI Toolkit by Sameer Wadkar on June 13 2007 10:40 EDT
- Use soapUI by Ole Matzura on June 13 2007 06:14 EDT
- The Book Uses Dojo by Mark Hansen on June 13 2007 21:34 EDT
- Re: Excerpt: Ajax and Java Web Services by Anthony Goubard on June 14 2007 11:41 EDT
-
Use Google Web Toolkit[ Go to top ]
- Posted by: David Tinker
- Posted on: June 13 2007 01:52 EDT
- in response to Joseph Ottinger
You can write your Ajax client in Java using GWT and avoid the need to master JavaScript. You still need to understand the HTML DOM and be pretty good with CSS but thats a lot easier than having to be a JavaScript pro and deal with all the cross browser issues. Cheers David -
Yahoo UI Toolkit[ Go to top ]
- Posted by: Sameer Wadkar
- Posted on: June 13 2007 10:40 EDT
- in response to David Tinker
I found Yahoo UI Toolkit very useful. What I do not like about GWT is that it is based on the assumption that most of us Java Developers like Swing like development. In fact a vast majority of us do not even know how to do it well. Yahoo UI toolkit requires one to come up to speed with some basic Javascript but all the wicked cross browser issues and 508 compatibility are fully abstracted out. There is also a good api for making AJAX connections to the server. I believe DOJO is also the same but I have not used it. Sameer -
Re: Yahoo UI Toolkit[ Go to top ]
- Posted by: Jesse Kuhnert
- Posted on: June 13 2007 22:56 EDT
- in response to Sameer Wadkar
Anyone that enjoys swing development is one sick puppy. =p.. What I do not like about GWT is that it is based on the assumption that most of us Java Developers like Swing like development...
Sameer -
Tibco GI is pretty good too[ Go to top ]
- Posted by: KAK W
- Posted on: June 14 2007 12:45 EDT
- in response to David Tinker
If we're talking about a rich palette of GUI components and ease of development, Tibco GI is doing a fantastic job there. Its free, has a great IDE and comes with a Apache License -
DWR[ Go to top ]
- Posted by: Rauan Maemirov
- Posted on: June 15 2007 14:29 EDT
- in response to David Tinker
GWT is very abstarct and not popular yet. So, I think DWR much better. Well, there U should know JavaScript. But what people will write AJAX-application without JS knowledge? -
Use soapUI[ Go to top ]
- Posted by: Ole Matzura
- Posted on: June 13 2007 06:14 EDT
- in response to Joseph Ottinger
You (and your service consumers) could also use soapUI for playing around with a web-service and getting a feeling for the data it returns, it's probably easier than creating a dedicated ajax client and has better support for ws-related standards.. (and a sleuth of other stuff..) cheers! /Ole eviware.com -
The Book Uses Dojo[ Go to top ]
- Posted by: Mark Hansen
- Posted on: June 13 2007 21:34 EDT
- in response to Joseph Ottinger
FYI ... the sample code in this chapter uses the Dojo JavaScript toolkit (http://dojotoolkit.org/). I found it pretty easy to work with. Rather than a "mastery" of JavaScript, I think developing an Ajax front-end requires a good toolkit plus "familiarity" with JavaScript :) Mark Hansen Author of "SOA Using Java Web Services" http://soabook.com -
Re: Excerpt: Ajax and Java Web Services[ Go to top ]
- Posted by: Anthony Goubard
- Posted on: June 14 2007 11:41 EDT
- in response to Joseph Ottinger
If you want to do Ajax with your Web Services, I advice you to have a look at XINS ( http://xins.sourceforge.net/ ). The Web Services developed with it accept RESTful, SOAP, XML-RPC but also since version 2.0 "Yahoo! JSON" which is easy to use with Google Web Toolkit and JSON-RPC (1.0 and 1.1) which is easy to use with the DOJO toolkit. It also generates the SMD (Simple Method Description) that the DOJO toolkit understands. Click Here to see the code for an Ajax call to a Web Service using the DOJO toolkit. Anthony