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

I've spent the last couple of days updating an application that the user base says is too slow. Its a CRM Java based web application that was written using the struts framework. 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://publish.creative-weblogging.com/publish/mt-tb.pl/11953
img Addthis img Ask img Blinklist img del.icio.us img Digg img Fark img Facebook img Google img Lycos img Ma.gnolia Add this page to Mister Wong Mr Wong img Netscape img Netvousz img Newsvine img Reddit img StumbleUpon img Slashdot img Tailrank img Technorati img Wink img Yahoo

Vote for DWR AJAX Framework Gets It Done:

  • Currently 5.20/10
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Rating: 5.20 out of 10 vote(s) cast.
 
Subscribe
Share It
RSSrss
See all blog subscribe options
Google google
What is RSS?
Yahoo! yahoo
Addthis Subscribe using any feed reader!
Bloglines Bloglines
Newsletter

TwitterFollow us on Twitter!