Hacker for Hire

Alternative to DWR

Wyatt • • Technology

So at HTG, we build web applications. Hosted web apps to be precise. For one of our big ones, we choose to go the route of DWR. If you don’t know what DWR is, it’s basically a way of getting a nice JavaScript interface to a back end Java server. That’s all well and good; however, only 2 of our 3 developers liked the idea of going with Java. The third has what can only be described as reverent animosity towards Java … especially after some classes we took in the Engineering college :-) .

Anyway, I think the best part of DWR is that you get this JavaScript, or files, that give you objects that have functions equivalent to your exposed Java interfaces on the server. The beauty of this is that you can just make calls to something like this in the JavaScript:

<script type=’text/javascript’

Now of course, that code is completely bogus and won’t work for crap (bonus points if you can see why it would never work); however, it’s really nice because it gives you a way to have some people hammer on the server-side and some people work on the UI side without needing to really jump bank and forth from server to client. Well, Java’s all well and good; however, if you remember from earlier, we have one person that “hates” Java. So putting on the pseudo PM hat, I started looking around for some other ways to get that same sort of functionality in PHP … low and behold, such a thing does exist. It’s called xajax and it seems like it gets me the same sort of thing that DWR does. I’ve not read a ton on it, but I’m going to delve into it a little more and let you know what I think.

comments powered by Disqus