Dec 10th, 2009, 01:09 AM
DWR 3.0 and Spring 3.0 (using roo)
I just used spring roo to come up with a sample application (which stores an entity with GPS coordinates). I was looking into integrating Google Maps with the application.
I have searched for a concrete example but there is none using the version numbers I am interested in
I used this link in the beginning
and then looked up and found
The problem is that the current setup (which is good enough as far as I am concerned) uses aspectJ to auto generate stuff which I was used to in service and dao layers. So I am not sure how to use annotations in this scheme (where does @Service come, if there should be one?)
I plan on paying more attention to generated code later, but for now I just needed to do a small prototype Maps application
Alternatively you can suggest other ways to easily integrated GMaps (with dynamic content, two way, i.e. retrieval and saving of data on a map)
Dec 11th, 2009, 03:08 PM
You're able to create any .java class you like and annotate it with @Service and expose it with DWR in the standard way. While Roo can scaffold a web controller for you, this is optional and you are of course always free to write code in any class that you like. So my advice would be to create a new .java source file in your project, pop an @Service annotation onto it and then use DWR as per the tutorials.
Dec 11th, 2009, 06:55 PM
So does this mean that it is not possible to expose the methods generated in Node_Roo_Entity.aj?
Originally Posted by Ben Alex
After reading some more, I see that coming up with a RESTful webservice using JSON is rather easy to do, Do you think its a better way of working with APIs which only have a dominent JS API base (like Google Maps)
Tags for this Thread