This post originated from an RSS feed registered with Java Buzz
by Marc Logemann.
Original Post: modern Java/Ajax Apps - where to stop JS coding
Feed Title: Logemann Blog
Feed URL: http://feeds.feedburner.com/LogemannBlog
Feed Description: Marc Logemann's thoughts on java and other stuff
While evaluating several scenarios how to architect our current project, which should base on Struts2 and YUI, i am starting to understand the obstacles in such a project. And its not Struts related. Essentially it breaks down to the question: What to do in the frontend (here with YUI) and what not.
The easiest way is to just use some complex widgets from an ajax framework (data tables and stuff like this - those get their data via XHR/Json Requests) and code the rest as "normal", meaing, each form fires a new request and validation occurs on server side. So this would be mainly integrating ajax widgets into a JSP page. But things get more complicated when you use also dialogs from the ajax frameworks, then you slowly get into the position where the traditional request/response style from java MVC frameworks no longer work easily.
The bottom line is, i really dont want to put everything into JS. IMO there are a lot of things that should be handled by the server. But if you just use an ajax library and all of its features, very soon you will start realizing that all your java code is a bunch of JSON services.
IMO, architecting an application is much harder when using Ajax heavily. In fact the complete project gets A LOT more complex.