Blackberry Support for XPages Mobile Controls


My collegue Yoshiroh Kamiyama is the original author of the dojox/mobile code in Dojo 1.5. Kamiyama has now extended that code to also support Blackberry browsers before Blackberry will support webkit (see here).

In order to get this to work Kamiyama had to identify issues and missing functionality and figure out workarounds whenever possible. For example you cannot have spaces in the viewport tag (see here), dojo.require doesn't work since xhr is not supported which is why all JS code needs to be merged in one file, you cannot use CSS sprites, the fade animation doesn't work, dojo.hash doesn't seem to work, etc.

Finding out these things was not easy. Thanks a lot to Kamiyama.

Since Dojo 1.5 was just released that code won't make Dojo 1.5 but we need to look if and when this could be delivered to a future Dojo release. There is also a significant amount of testing required since only one simulator was tested so far.

I've extended slightly the XPages Mobile Controls so that the core controls like mView and mDocumentContainer work. Essentially I only had to change some code that manipulates the client side DOM.

Here is a quick demo. Don't get distracted by the iPhone style. The style can easily be changed with the dojox/mobile framework:

Comments

Gravatar Image1 - This is a great news! Do you have an estimate on when we'll see a release?

Gravatar Image2 - Thanks Giuseppe.

I don't have an ETA yet. As I said we need to first contribute the main part of this code to Dojo which is what we're trying to work out. I'll certainly blog again when I'll have an update.

Gravatar Image3 - Awesome.

Those file-flattening efforts are huge for the overall UX, not just Blackberry. Dojo's heavy number of hits is really the biggest drawback to the toolkit.

Gravatar Image4 - Thanks Erik.

You can actually create a custom Dojo build of dojox/mobile in just one file (23k) plus 2k css. Plus xspClientDojo.js plus my two little js files. I've documented in the readme.pdf how. I had to use this for offline (not only for performance) since xhr in dojo.require doesn't work offline for many browsers.

Gravatar Image5 - Great stuff indeed...so we'll see this in a new XMC release tomorrow then? ;)

Gravatar Image6 - Yep, I've been writing a big-ish webapp using dojox.mobile at my place of work and I had to make a fair few workarounds to get the dojox.mobile.app stuff working on Blackberry.

With v5.0 browser, if you change the background image url on a div it doesn't repaint in the DOM, for example with the checkboxes and tab container header provided. Workarounds here is either to change the div's padding or to use sprites (same image just different position). A quick css override fixes these issues.

Bring on web-kit!

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)