Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

DWR as RPC in standalone application?

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Author,
Whats the possiblity of using DWR in a standalone application that doesnt use browser.Can I use DWR as an alternative for Remote procedural Call?
Posts: 67451
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a standalone Java application you would use RMI.

I suppose that you could use the package to make HTTP requests to a server running a DWR application, but what advantage could there be to added all those extra layers over using RMI?
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's funny you ask that, I was thinking about how to do exactly that the other day I thought I saw discussion of it at one point somewhere, but I'm not sure where it landed.

DWR dynamically creates Javascript "proxy" objects, so I would think the key is having an environment where those could be run. I was thinking that maybe something like Rhino might fit the bill, but at the end of the day the environment would have to provide the same sort of underlying AJAX mechanism, i.e., XMLHttpRequest, that the browser does. If you had that, I'd think that approach could work.

You could also yourself manually mimic those proxies... so long as you could decode the DWR message that came back, you could probably pull it off too.

So, I don't have an answer for how to do it today, but I can say I don't believe I'm the only one looking into that.
    Bookmark Topic Watch Topic
  • New Topic