Jan 5th, 2009, 12:24 AM
compare/contrast ajax mechanisms for integration ith spring mvc app
I've got a web application that communicates with the server via traditional html+http and some flex/amf via spring-blazeds integration. I'm not interested in porting the core application over to ajax, as I find that back button support and other things are headaches that I don't want to deal with, and users generally prefer a page-based paradigm for online apps, anyway. However, we do have functionality we'd like to enable via ajax - things like suggestions, validation, and a couple of places where a single interaction happens via multiple forms that actually makes more sense as a single 'page unit' so I prefer to handle the transitions via ajax.
I'm looking at a couple of possible implementations, and I'm fairly agnostic about which to choose. I'm also curious as to whether there are options I should consider that I have not yet encountered.
DWR - My gripe with DWR is that it bypasses my SpringMVC layer. This isn't the end of the world, but it adds to the complexity of the app. However, given that the blazeds interaction already does the same thing, and works in an almost identical manner, it is something I can definitely live with.
JsonView via spring-json - I really like the fact that this uses the springMVC infrastructure and should be totally agnostic about how the client side is implemented. I'll admit to leaning in this direction, but I haven't done that much research yet, so I can be convinced to go another way.
XT Ajax Framework - I really don't like the look of this. It seems to be quite complex and doesn't really mesh well with the rest of my application, from what I can see (I've only read through the docs). Again, I can easily be talked into it with a good argument.
I'm curious about your experience from a performance perspective, integration with spring-security, ease of use (I'm a very fast learner, so learning curve isn't an issue so much as how much coding is necessary to support the framework once I'm up and running), client side simplicity (my front end guys are not java devs, so I'd prefer a clean separation between client and server side code), and anything else you can think of.
Jan 5th, 2009, 12:46 AM
Have a look at the following,
The Dojo support that is provided by the SpringJS, the spring JS is shipped along with webflow.
The other option is to use JQuery,
Jan 5th, 2009, 11:14 AM
Yeah, I'm really not as huge fan of dojo, but beyond that, I don't want to be bound to any particular js codebase on the client. Keeping the js payload that must be downloaded to the client to an absolute minimum is a fairly high priority on this project. But I'll take a look at it.
Originally Posted by sami25
Jan 5th, 2009, 11:34 AM
Whatever mechanism I choose, it will involve passing json or xml from the server to the client rather than html fragments. Perhaps I didn't read far enough into the docs, but I didn't even see json or xml mentioned in the spring-js docs, so I'm curious how one would do ajax based validation or suggestions without incorporating something like JsonView to render json back to the client outside of the spring.js framework.
Tags for this Thread