DWR AJAX Framework Gets It Done
Filed in archive Programming by jason on December 06, 2005

. This was my first time using AJAX functionality for a real-world application. I've found DWR to be a great framework to use the existing Java based web applications. However, the documentation has been lacking at times. I'm the type of person that needs things spelled out plainly so my frustration level was high at times. The only thing that stopped me from using another framework was that at about the time I was going to give up I had a breakthrough that kept me going. My tolerance for pain, in programming speak, is high so I'm not sure how an average developer would feel about DWR.
The basis of my pain with DWR centered around manipulating data or objects upon a return trip from the XHR call. I literally spent hours trying to figure out what syntax I was suppose to use when pulling together data attributes from my JavaBeans. I'm sure that it does not help the my method of debugging is still "alert()" statements and a browser refresh. I should probably join the crowd and find a JavaScript debugger to work with now. It has been the whole idea of working with JavaScript enough to even need a debugger that has kept me from acquiring one. My recent experience has cause me to see the error of my ways.
On DWR's documentation site they have a link called "Struts Integration" but there really is not such thing. Working with AJAX caused me to do an end around as far as the whole MVC pattern goes. One example I saw showed the presentation layer calling a DAO object directly. Something about that didn't seem right to me. I created and used an Adaptor object in front of my existing services. This Adaptor then calls an existing Service layer object that sits in front of my DAO objects or whatever other domain layer objects that already existed within the application.
DWR works great overall. After the initial learning curve I think I'll continue to us it on this and other projects. Page refreshes are so old fashion now. At what point does a developer get a little too carried away when trying to implement AJAX functionality inside existing applications? I'm sure that at some point I'll find out now. Permalink: DWR AJAX Framework Gets It Done
Tags:
DWR AJAX
Trackback: http://www.creative-weblogging.com/cgi-bin/mt-tb.pl/11953












