Commercial Support for DWR
Short version: Commercial support and development assistance is now available for DWR.
Long version: SitePen has been offering support packages for a while, but you've had to ask. But it's now an advertised service, if you want help with Dojo, DWR or Cometd, packages start from $995. The DWR mailing lists are not going away and is still going to be a good solution for many problems, but if you need a bit more care and attention, we can now do that too.
The team of people that I'm working with at SitePen are awesome. Aside from the obvious DWR, Dojo and Cometd projects, SitePen people have also created TurboGears, Persevere and JSPON, are working specs for Bayeux, JSON schema and Servlet 3.0, and author json.com and cometdaily.com.
If you need to know more check-out the summary over on the SitePen site.
IE8 Review
I've been playing with IE8 beta 1, and I've got some thoughts ...
In terms of user visible HTML rendering features, I think IE 8 beta 1 is possibly the biggest release of IE in nearly 11 years since April 1997 when IE 4.0 alpha 1 was released. The history shows mostly bug fixes, and chrome changes since then. Maybe transparent PNG or Bidi text are bigger than Activities? It looks like that's going to be the feature that most people talk about, so I'm going to talk about some of the other stuff. There are 3 big things I'm interested in, and a few smaller features:
6 Connection Limit
I've been testing the new 6 connection limit. It works perfectly in my testing, Without any cookie or window.name hacks, DWR can do reverse ajax using comet to more than 2 browser windows:
DOM Storage
IE is way behind everyone else in implementing HTML5 features. So this is catching up to everyone else. It will be interesting to hear from the Dojo guys on this.
// sessionStorage also available
var store = window.globalStorage["http://www.example.com"];
store.setItem("key", "value");
var value = storage.getItem("key"); // == "value"
store.removeItem("key");
JavaScript Debugger
Firebug has been a stick that's been used to beat up IE for a while, and they've got an answer now. Unlike the other features, there isn't a screenshot in the release notes...
Firebug is still much better, in my opinion so far. But this is certainly a huge step forward compared to fighting with Script [Editor|Debugger] or Visual WebDev.
Acid 3
IE 8 does very badly on Acid 3 (17/100). However given that it's so new it's probably not fair to ding it too much. However it does need to improve big time:
- WebKit Nightly: 87%
- Opera 9.5b: 64%
- Firefox 3.0b3: 61%
- IE 8b1: 17%
For comparison, the released versions:
- Firefox 2.0.0.12: 50%
- Opera 9.26: 46%
- Safari 3.0.4: 39%
- IE 7: 11%
Given that they are innovating, I'm prepared to give them time to get the number up.
URL Bar Goodness
I didn't see this in the release notes anywhere. On Firefox I've got an add-on called LocationBar 2 that does some nice widgetry with the URL Bar:
Well it looks like IE8 has something similar built in too:
Cross-Domain XHR
The standards are still evolving on this one, but somewhat annoyingly IE8 seems to be going in a different direction from everyone else:
var xdr = new XDomainRequest();
xdr.open("POST", "http://www.example.com/xdr.txt");
xdr.send("Data for post body");
What is missing?
Lots. Still. No SVG/Canvas. No updates to the JScript implementation at a language level (it looks like there have been some performance increases though).
Let's not forget that Microsoft have more resources to get this right than almost anyone. If Opera can manage to create a first class browser, so should Microsoft.
And Finally ...
I loved the irony of the download recommendation. If you're downloading IE8, you might also like to download - IE6!:
InfoQ Interview
InfoQ interviewed me, and asked:
- What are some of the major features planned for [DWR] version 3.0?
- When is 3.0 slated for release? Is it still sometime in June?
- What does the incremental release schedule look like before the final 3.0 release?
- What are the top small features or fixes in 3.0 that a developer will be thankful for?
- For someone who might have looked at DWR 2.0 and decided the time wasn't right, what might 3.0 provide to help "make the deal"?
- What happened to 2.1, why the jump to 3.0?
- What sort of impact will Tibco's role play in the future of DWR?
- What are the next major milestones for DWR after 3.0?
InfoQ is built using DWR, so it would be great if they could take advantage of features like automatic offline when 3.0 comes out.
Taking of things Q. Next week, I'm talking on DWR and Comet at QCon.
DWR + Aptana Jaxer
I've been working with the guys from Aptana for the past week or so on adapting DWR to be a remoting layer for Jaxer.
Jaxer is a way to run JavaScript on the server. But it's not just JavaScript as an alternative to Java/Ruby/PHP/etc. Jaxer is Mozilla, on the server, with it's face ripped off and replaced by a snorkel to serialize the DOM to a web browser. John has a great introduction, or there's the podcast that Ajaxian did.
The vision with DWR was always to say: We've got Javascript in the browser, and Java on the server - lets connect them in the best possible way. This leads to the migration of view logic from the server to the client. But it's not safe to move it all; Validation is part of view logic, but that needs to be done on the server. With Jaxer you can specify scripts to be runat="server" or runat="both" to allow validation or other logic to be run in both places.
Some of the changes that we've made to DWR will only help you if you are using DWR inside Jaxer, but others could be generally useful.
There are 2 basic changes. DWR on the Internet needs to make sure that the Internet only touches the code that you want it to touch. DWR in Jaxer doesn't have this problem because it's not accessible from the Internet, so we can do away with almost all configuration. Secondly latency inside a server-room is tiny compared with the net, which makes synchronous XHR viable.
So as it stands at the moment in development, you can use DWR inside Jaxer like this (clearly this is subject to change):
<script type='text/javascript' runat="server"> Jaxer.dwr.pathToDwrServlet = "http://localhost:8080/demoServer/dwr"; Jaxer.dwr.require("util", "new/org.example.Demo"); function loadServer() { var data = Demo.getData(); dwr.util.setValue('fillFromServer', data); } </script>
There are a number of benefits that come out of this even if you're not using Jaxer:
- In dwr.xml you needed to specify javascript='ScriptName'. If (as is common) ScriptName == Class.getShortName then you can just drop the attribute, it will default properly.
- Cross domain remoting is now automatically detected, and scriptTag remoting is used if needed.
- There is a new init-param 'useAbsolutePaths' which might help people with trouble remapping DWR's location.
- All URLs are now reconfigurable.
- If you are using DWR in synchronous mode (which I don't recommend on the Internet) then you can use returned data in the normal way without needing a callback.
IWebMvc Preview
Jose Noheda has released a preview of a library that glues together DWR, Dojo, Spring and Hibernate/JPA. It's a 0.1 release and he's looking for feedback.
Despite the name, it's not really another Web MVC framework, but more along the lines of AppFuse or Grails, as a way to kick-start a project and provide some sensible defaults without needing to learn everything from scratch.
The source and release notes say it needs 1.6, so Mac heads will need to get the Apple Java6 preview.
Jose's aims:
In my mind what I really needed was a platform that:
- Is based on Java
Although supporting Grooy / JRuby is a plus - Helps me to kick start a project
But simplifying the process by giving me the best (and this can be tricky) set of frameworks for each task - Integrates both server and client sides
And it's lightweight, robust and extensible. Read enterprise quality. - Supports all the common tasks a web app has to handle
I include here: User Management, CRUD operations, i18n support (both framework & data), AJAX and astounding visuals
Jose has done some brilliant work on DWR. He created a large chunk of our binary file support, and is currently the Spring integration maintainer, so it might be worth a download to see if it can help you.

