I’ve been integrating DWR into our web monitoring app to display recent monitoring events dynamically while the user is doing other stuff. Since I already have a service object that does all the heavy lifting, integrating it was a snap. And now they have a section of the page where they can see events as they happen.

Pretty chuffed with myself, I decided to experiement with making one of our edit forms ajax-ified. Again, the service calls were already there to add/update/delete the object the form was representing, so I just exposed then in dwr.xml… and I have a dynamic table that I can add/edit/delete within one html page.

Ok. Now I’ve now got freight-train momentum, so I added some OpenRico sauce to make things slide and collapse… baby.

First Ajax Experience using DWR

Then I got to thinking… This was all pretty easy. I didn’t need to setup a special controller with custom table, edit, and delete views; I didn’t have to configure any bean marshalling; I didn’t have to do a stack of view mapping config; and I could develop and test with a click of “Refresh” on the browser.

Then the penny dropped. You know, I could probably live without most the web framework entirely! Have one html page for each portion of functionality, do the service calls via DWR to do the heavy lifting, and just add some script for interface swishness. It does mean I’m committing the javascript only for the view… but it seems to a lot less work than the MVC framework I’m using now. And then I found that much smarter people than I have already been thinking this some time.

So is this just crazy talk? Doing the view in straight Javascript and just use DWR to call appropriate methods in the Application Service layer to do the add/update/delete/execute/query or whatever the business logic requires?

DWR gives me the security to lock down what methods are exposed. And the business layer itself applies security to make sure users can only delete/edit/update their own data. So can I kiss my MVC framework goodbye? Any brave souls walked this path? Validation could be a deal, ditto for browser compatibility, but if DWR and Rico are solid there then I’m pretty close to a compelling rapid web dev environment.