Discussions

News: DWR version 3.0 release candidate 1

  1. DWR version 3.0 release candidate 1 (12 messages)

    DWR version 3.0 What's new? DWR now supports: - varargs - method overloading - typed parameters - binary file upload/download - it has a set of new types it can marshall DWR will let you use JavaScript to implement Java interfaces (e.g. to register a Listener interface to publish changes to waiting browsers using Reverse Ajax), we now have 3 modes to control resource usage and there is a more scalable Reverse Ajax layer. There are new integrations with Dojo, TIBCO GI and Aptana Jaxer, and a new DOM manipulation library. We have special asynchronous servlet support for Tomcat and Glassfish, and our Spring and Guice integrations have been beefed up. We now support JSONP and JSON-RPC, and there's a whole bunch of etc thrown in for good measure too. There is a more complete list at Joe's blog, or you can just skip straight to the download page.

    Threaded Messages (12)

  2. I never cared for the dwr approach of doing ajax much. Its just too laborous and way too easy to make errors when you have to do dom manipulation by hand
  3. DWR is more than Ajax[ Go to top ]

    If you don't appreciate the way DWR updates the DOM, use your favorite JavaScript library. DWR enables JavaScript in the browser to call Java code on the server side. Your average JavaScript Ajax (jQuery, Dojo, prototype, etc) does not do that. DWR maps Java objects and their methods to JavaScript objects enabling two way communication between the browser over HTTP. It's absolutely great for what it does.
  4. Re: DWR is more than Ajax[ Go to top ]

    My point is that for what it does there is almost always an easier solution available. Beyond the stock quote examples javascript remoting becomes a pain in the ass
  5. I'm always interested in easier[ Go to top ]

    You have to substantiate your statement. I'm always for easier as I have plenty of things to do in a day. We're talking about java on the server side. How much easier can it get? Place a class in the dwr.xml file. Make a call in the html page. Process the results. Done. <script> SomeDataClientClass.fetch("param_value", function(message) { $('#msgbox').append(message); }); </script> Notice I used jQuery for the DOM update. C'mon, I always decry the the java programmers irrational inclination to complicate things. Where is it here?
  6. You have to substantiate your statement
    Lets asume the trivial example of a sorted paged list of entities where you can add a row to by filling in a detail screen located below the paged list. upon saving a new record 1. all form fields should be cleared 2. the new row should be inserted into the table at the correct location 3. the pagination should be updated Now carefully consider how you would do this using dwr Dwr certainly is a fine choice if you want to do javascript remoting. But in many cases there are easier ways to accomplish what you want
  7. Need more examples[ Go to top ]

    jelmer, Your example is a function of the JavaScript library Ajax's implementation as mentioned before. DWR plugs into Dojo and TIBCO to resolve your scenario even so DWR can do it well with its util package. Using jQuery, mootools or whatever to do what you describe here will still require a form (maybe just process the parameters with no form) on the server side that will process your request, form that resides within a scripted page - page that will provide the formatted results to be processed by the JavaScript client library (via JSON or XML). When you use DWR for this purpose, DWR will hide from you the need of a form, or even formatting your resulting data as JSON or XML. You can go ahead and use the response data as a JavaScript object not necessarily as a JSON or XML (i.e. $('').append(customer.name)). Have your jQuery format the table (clear form, insert new rows). This is an answer to your scenario. I rarely use DWR for form processing unless a quick and dirty form. I implemented a chat service with DWR and it was great. Also, I use it for quick server requests that don't require full page reloads. If most of my page requires updates, then that's what I do, use a full page reload. I still need an example from you of how this can be done easier with other solutions. You got to give it a try.
  8. Other usages[ Go to top ]

    I used it also with google maps. It's so easy and cool to place markers on maps dynamically with no page reloads. I used it also for in-browser notifications (a la stackoverflow.com). Try reverse Ajax and executing scripts from the server also. DWR is a great library. It's not really about form processing.
  9. Re: Other usages[ Go to top ]

    I used it also with google maps. It's so easy and cool to place markers on maps dynamically with no page reloads.

    I used it also for in-browser notifications (a la stackoverflow.com).

    Try reverse Ajax and executing scripts from the server also.

    DWR is a great library. It's not really about form processing.
    I currently work on a project using DWR and we also use it for Google Map and MapServer integration. In essence, backend calls the don't require full page refreshes to display. Its ability to marshall Java to JS object was useful. We also use events that are generated from the backend to modify the html in the front via DWR. While my overall preference is for non-markup based frameworks like GWT, I found DWR a pleasant enough experience.
  10. Re: Other usages[ Go to top ]

    For a chat application or plotting points on a map you do not need to do heavy dom manipulation so I would argue that dwr would be a great fit for those types of applications However i consider that to be on the same level as stock quote examples.
  11. Re: Other usages[ Go to top ]

    For a chat application or plotting points on a map you do not need to do heavy dom manipulation so I would argue that dwr would be a great fit for those types of applications

    However i consider that to be on the same level as stock quote examples.
    Well, we actually do more than that. For DOM we use jQuery. I don't care for the DOM stuff myself. It is a necessar evil, but I don't understand your statement or your beef, to be frank(pun intended). I personally wouldn't put in example that has questionable practical value(not saying the stock example does) against anything that is actually experiencing real world use. DWR is a good tool for connecting to the back-end. If you wish to do DOM, a variety of tools exist for that. You can use both.
  12. Re: DWR is more than Ajax[ Go to top ]

    My point is that for what it does there is almost always an easier solution available. Beyond the stock quote examples javascript remoting becomes a pain in the ass
    Yup.. you are right... the easiest solution is to stick with the usual server round trips for every click and refresh the page. I have used DWR and it couldn't get simpler to invoke a java pojo and get back objects to work with in js. After that, it's what you want to do that's limiting you.
  13. Re: DWR version 3.0 release candidate 1[ Go to top ]

    how do i use DWR3.0 for UpLoad file from ? thanks