DWR Makes Interportlet Messaging With AJAX Easy 39
An anonymous reader writes "You can use the sample code in this article as a starting point for developing your own applications; the code also shows how DWR extends the Java programming model to Web browsers. With DWR, it's almost as if JavaBeans were available in the browser. DWR simplifies your work by hiding almost all the details of Ajax and allows you to concentrate on the task at hand instead of the nuts and bolts of Ajax development."
Expanding? (Score:1)
Is it me, or does the scope of Ajax seem to be expanding?
Re:Expanding? (Score:3, Informative)
Re:Expanding? (Score:1)
If you will kindly confirm this understanding of Ajax, I can safely store the new rule away in the du
Re:Expanding? (Score:2)
Re:Expanding? (Score:2)
Why not?
You don't have to apply a stylesheet and convert to xhtml on the client. You can simply read the DOM and create HTML from javascript. Or you could just send preformatted html. Or you could use JSON as has been mentioned.
Re:Expanding? (Score:2)
The biggest issue with JSON over XML, is de-encoding in server-side platforms. I'm aware of a few server-side platforms that work in JavaScript but none, afaik are in wide use (outside of classic asp). Anthem uses JSON, not sure about Rails, and not sure what else uses it,
I want benchmarks. (Score:2)
So I have two questions: Is the browser's XML parser faster than the browser's JavaScript parser? (Probably, but I want benchmarks.)
And, on the server side, you have the same issue -- is it faste
Re:Expanding? (Score:2, Informative)
XML is in many cases the best method of sending data to the AJAX script.
Both have been part of AJAX all along.
Re:Expanding? (Score:4, Informative)
Basically, AJAX is a website that uses HTTPRequest.
The XML, HTML, DHTML, JavaScript and DOM are just logical extensions of that premise. Similarly you could say AJAX also uses TCP/IP and HTTP. Though, likewise, it says nothing.
Re:Expanding? (Score:2)
What the hell? (Score:2)
Re:What the hell? (Score:1)
I've found that if you have a problem with your portlet, you can plug it up with your Ajax and prevent any sort of embarrassing leaks. Ajax has amazing absorption, and it's very comfortable because it's designed with portlets in mind. So it feels like you're not even wearing an Ajax. It's great!
Re:What the hell? (Score:1)
Re:What the hell? (Score:2)
other names that have been used in the past are:
gadget
web part
pagelet
An industry group of the major enterprise portal companies got together and worked on standarizing some things like what to name those little "sub pages". This is also the same group that brought you the JSR-168 specification and to some extent WSRP.
Re:What the hell? (Score:3, Insightful)
Re:What the hell? (Score:2)
Complexisity is more enterprisey (Score:1, Flamebait)
Number of Megabytes required to run software * Maximum depth of class hierarchy * Number of lines of XML configuration = Enterprise!
Nuts and bolts? (Score:4, Insightful)
"'...allows you to concentrate on the task at hand instead of the nuts and bolts of Ajax development.'"
Last time I checked the "nuts and bolts" of AJAX was only a few dozen lines of code... all it is is sending a server request in the background.
Re:Nuts and bolts? (Score:1)
The DOM is what will kill you... (Score:2)
I mean, you're right, it's easier than it looks to someone who doesn't know how to do it, but it's harder than it looks to someone who does.
DWR.. (Score:2, Funny)
Re:DWR.. (Score:2)
It can be pretty much summed up as "RMI-like functionality implemented with JavaScript." Having used DWR, I'm not really sure if it uses XMLHttpRequest or something else, because the library abstracts that from the application developer. The server-side can code POJOs and the client-side can code against JavaScript functions. The DWR servlet and configuration file are the "glue" that gets the client-side to the server-side objects.
The limitation I've bumped up against is that the
Interportlet Messaging Is A Euphamism For... (Score:2)
Design Within Reach? (Score:2)
Am I the only one who was wondering what exactly Design Within Reach had done to improve AJAX? I mean, sure, I really like some of their lamps, but I think that AJAX is beyond even their power to salvage.
Re:Design Within Reach? (Score:1)
Please, drop JSP and XML config files... (Score:2)
In the same line of thought, can we drop the millions of XML config files needed for this sort of stuff? they are not needed.
I am using Echo2 for intranet applications and it works fine. No HTML, no XML. Coding the GUI is exactly like Swing. But the problem is that every action in the client triggers a response from the server...if I could program Java classes and the bytecode was translated to javascript on the fly, then I could write n
Re:Please, drop JSP and XML config files... (Score:1)
This sounds like (Score:2)
Re:This sounds like (Score:1)
Actually, DWR exposes POJO's on the server via Javascript peers in the client.
GWT, on the other hand, is really two things in one: first, it compiles Java code to Javascript, much like javac converts Java to bytecode; big portions of java.lang and java.util are available to the developer. Second, it allows you to execute and debug your code in a JVM. The idea is that the code in the JVM will behave exactly like the compiled Javascript code in the browser.
I think the point of GWT is that good Java progra
Problems (Score:3, Insightful)
This DMR *seems* cool at first, but the fact that I have to inline the Javascript code insid ethe JSP with this stupid cusotm tag kills it for me. JSP's are supposed to be the presentation layer *only* - if you have JS code it should be in external .js files as much as humanly possible. THis also helps download times a lot since the .js files can be cached.
Personally I think that JSON-RPC [metaparadigm.com] is far superior to this "DMR" stuff. It's also been around much longer, so it's tried and tested. It also has non-Java backend implementations.