|
Hi all
I am using DWR with my web application. It is really do a good job. But i need to provide swing client for some part of my application due to slow response of ajax. I don't like to write another web service for it because already dwr is doing the same think. Are there any java library available to use dwr with swing clients. Any workarounds Pls help me. Thank you |
|
Your question doesn't make any sense to me. DWR serializes Java into
JavaScript and JavaScript into Java. If you plan on using Swing (which is Java) then there is no reason to use a library like DWR. I have no idea what you mean by "slow response of ajax". If you are having a problem with slowness you are probably doing something incorrectly. You may want to take a look at our troubleshooting page - http://directwebremoting.org/dwr/support/common_problems.html. On 02/18/2012 09:08 AM, ajmal hinas wrote: > Hi all > > I am using DWR with my web application. It is really do a good job. > But i need to provide swing client for some part of > my application due to slow response of ajax. I don't like to write > another web service for it because already dwr is doing the same > think. Are there any java library available to use dwr with swing > clients. Any workarounds Pls help me. > > > Thank you |
|
Similar questions have been asked before (may be helpful):
http://dwr.2114559.n2.nabble.com/DWR-as-Swing-AJAX-Wrapper-tc5397267.html On 02/18/2012 09:23 AM, David Marginian wrote: > Your question doesn't make any sense to me. DWR serializes Java into > JavaScript and JavaScript into Java. If you plan on using Swing > (which is Java) then there is no reason to use a library like DWR. > > I have no idea what you mean by "slow response of ajax". If you are > having a problem with slowness you are probably doing something > incorrectly. You may want to take a look at our troubleshooting page > - http://directwebremoting.org/dwr/support/common_problems.html. > > > On 02/18/2012 09:08 AM, ajmal hinas wrote: >> Hi all >> >> I am using DWR with my web application. It is really do a good job. >> But i need to provide swing client for some part of >> my application due to slow response of ajax. I don't like to write >> another web service for it because already dwr is doing the same >> think. Are there any java library available to use dwr with swing >> clients. Any workarounds Pls help me. >> >> >> Thank you > > |
|
In reply to this post by david@butterdev.com
Hi david
I will explain little bit more. We developed a web application it uses DWR internally to supply the data needed by ajax components(I believe after the completion of page loading dwr supply only the data not data+html+etc... . If i am wrong than pls correct me) . We need to provide specialized hardware support for some parts of my application. It requires a client in swing or in some other desktop technology. We actually developed a two tier client, it directly connects the database. But it created problem with hibernate caching due to the truth it bypass the hibernate cache. So now our clients are forced to do the communication through the web application. It requires us to write web services for our client. But i think it is a redundant work because our web application's ajax components are loading the data when user do some action in the page (ie. When a user enters customer id then loads all relevant data ),the same think exactly we need to do with Swing clients. If we can do something with JavaScript then it can be done with Swing right? DWR latest version have support for JSON-RPC i think if pure dwr may not help me then JSON-RPC can be used. But i do not find any neat java library for JSON-RPC of DWR. pls if you know help me. Also i am expecting your kind advice on this problem. |
|
I am sorry but I am not quite following you and this is really beyond
the scope of DWR. If all you want to do is make a remote call from your swing applet than I am not sure why you would mess with the serializing/deserialization of working with JSON or JavaScript. You can make remote calls from your applet (RMI). I haven't worked with applets in a long time but I would recommend asking your question on an message board for applets are searching the web and find the best way to make remote calls from an applet. On 02/24/2012 07:38 PM, ajmalhinas wrote: > Hi david > > > [hidden email] wrote >> Your question doesn't make any sense to me. DWR serializes Java into >> JavaScript and JavaScript into Java. >> > I will explain little bit more. We developed a web application it uses DWR > internally to supply the data needed by ajax components(I believe after > the completion of page loading dwr supply only the data not data+html+etc... > . If i am wrong than pls correct me) . We need to provide specialized > hardware support for some parts of my application. It requires a client in > swing or in some other desktop technology. We actually developed a two tier > client, it directly connects the database. But it created problem with > hibernate caching due to the truth it bypass the hibernate cache. So now our > clients are forced to do the communication through the web application. It > requires us to write web services for our client. But i think it is a > redundant work because our web application's ajax components are loading the > data when user do some action in the page (ie. When a user enters customer > id then loads all relevant data ),the same think exactly we need to do with > Swing clients. > > If we can do something with JavaScript then it can be done with Swing > right? > DWR latest version have support for JSON-RPC i think if pure dwr may not > help me then JSON-RPC can be used. > But i do not find any neat java library for JSON-RPC of DWR. pls if you know > help me. Also i am expecting your kind advice on this problem. > > > > > > > -- > View this message in context: http://dwr.2114559.n2.nabble.com/Swing-client-for-DWR-tp7297194p7316679.html > Sent from the DWR - Users mailing list archive at Nabble.com. > |
|
Administrator
|
In reply to this post by ajmalhinas
I may be answering to the wrong question, but if this is what you
have: webapp client -> DWR server and you also want to do: Swing client -> DWR server then yes, you should be able to use DWR's JSON-RPC feature. DWR only provides the JSON-RPC server and you need to use some other product in the Java client. A google search: http://www.google.se/search?q=%22java+client%22+json-rpc comes up with f ex: http://code.google.com/p/json-rpc-client/ Check this out and tell us how it goes! Best regards Mike Wilson ajmalhinas wrote: > Hi david > > > [hidden email] wrote > > > > Your question doesn't make any sense to me. DWR serializes > Java into > > JavaScript and JavaScript into Java. > > > > I will explain little bit more. We developed a web > application it uses DWR > internally to supply the data needed by ajax components(I > believe after > the completion of page loading dwr supply only the data not > data+html+etc... > . If i am wrong than pls correct me) . We need to provide specialized > hardware support for some parts of my application. It > requires a client in > swing or in some other desktop technology. We actually > developed a two tier > client, it directly connects the database. But it created > problem with > hibernate caching due to the truth it bypass the hibernate > cache. So now our > clients are forced to do the communication through the web > application. It > requires us to write web services for our client. But i think it is a > redundant work because our web application's ajax components > are loading the > data when user do some action in the page (ie. When a user > enters customer > id then loads all relevant data ),the same think exactly we > need to do with > Swing clients. > > If we can do something with JavaScript then it can be done > with Swing > right? > DWR latest version have support for JSON-RPC i think if pure > dwr may not > help me then JSON-RPC can be used. > But i do not find any neat java library for JSON-RPC of DWR. > pls if you know > help me. Also i am expecting your kind advice on this problem. > > > > > > > -- > View this message in context: > http://dwr.2114559.n2.nabble.com/Swing-client-for-DWR-tp729719 > 4p7316679.html > Sent from the DWR - Users mailing list archive at Nabble.com. |
|
Hi mike
Yes i exactly want to do this. I will check the json-rpc-client library with dwr and post the result here. |
|
In reply to this post by david@butterdev.com
RMI can be used only with java clients it is not a generic technology my client may be in .net or c++ also. I can use web services but dwr already have json-rpc so i think i can use it instead of web services. |
|
That makes more sense. Hope that library Mike recommended works for you.
On 02/25/2012 10:32 AM, ajmalhinas wrote: > [hidden email] wrote >> You can make remote calls from your applet (RMI). >> > RMI can be used only with java clients it is not a generic technology my > client may be in .net or c++ also. I can use web services but dwr already > have json-rpc so i think i can use it instead of web services. > > > > > -- > View this message in context: http://dwr.2114559.n2.nabble.com/Swing-client-for-DWR-tp7297194p7317747.html > Sent from the DWR - Users mailing list archive at Nabble.com. > |
| Powered by Nabble | See how NAML generates this page |
