Recently I was involved in investigating integration of a client site with an affiliate site.
Both parties were interested in avoiding iframes and it's baggage.
Ideally we were looking for a solution that involved:
- minimal (html,css,js) code on affiliates pages. After all who would want deployment dependencies across organisations?
- dynamic json data served from our site
- long lived highly compressed components
- efficient use of connections to our server
We evaluated dojo and google web toolkit
Dojo won out, among it's many features it has:
- Nice Custom Widgets
- Cross Domain IO via ScriptSrcIO
- compression and packaging into a single js. create your own profile listing your dependencies and dojo buildscripts
- XDomain package loading. You need to build it from source, Although this wasn't required for us in the end.
Widget Issues
Unfortunately widgets are not completely self-contained. CSS is a bit of a problem. Typical custom widget will result in your css being inlined into your html widget, but this isn't required or always the bestway to go.
CSS relative image references are resolved relative to the host the base page was served from not our site.
We decided to keep our relative image references and have our stylesheet added to our affiliate pages dynamically.
Give namespaces are changing in new version we didn't create our own and just used dojo.widget...
Should Dojo be called Sumo? (says teagles)
Most ajax libraries are fairly heavy, you are looking at atleast 100K with the average closer to 200K to get simple io, events, effects and dom manipulation functionality. Disclaimer, it was a pretty quick scan a couple of weeks ago, of mochikit, dojo and scriptaculous.
After various packaging experimentation the Animation.js heavyweight seemed pretty core if you want to use custom widgets.
Why GWT wasn't for us
- binary format
- can't use 5.0 features
- not all features supported, ie new ArrayList(size)
- active monitoring
- components served off google
- ...
GWT does have some upsides though:
- testability
- small footprint
- cross browser compatibility verified by google
2 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
Hi Brett,
Could you please clarify a couple of points you’ve raised about the GWT? Namely:
- active monitoring: If you meant that google monitors your GWT app once deployed, then this is not true. In the ‘developer’ mode, the shell does a ping to find out if you’re running the latest version.This does not happen in the deployed version.
- components served off google: not sure what you meant here
- binary format: did you mean the java-javascript compiler, that’s distributed in the binary format? The output can be unobfuscated javascript if required.
Regards,
Sander
Thanks for feedback. I was in a bit of a rush in the end and wrote up the results a bit after the actual investigation.