Tuesday, 6 March 2012

Overthrow - an attempt to repair scrolling regions on mobiles


The guys over at the jQuery Mobile project recently made me aware of the Overthrow initiative at Filament Group (the main guys behind jQuery) to resolve the internal scrolling issues being experienced on so many mobile devices:
Here's the blog post, which links to the project page: Overthrow project
I'm looking forward to the slaying of this dragon!

Thursday, 1 March 2012

jQuery Mobile 1.1 fixed headers and footers

In general, jQuery Mobile's fixed headers and footers are a nice solution. Mobile browsers are getting better at supporting it properly with no visual artifacts, but they're still not all the way there.
Here's the jQuery Mobile 1.1 RC1 test page to try out your mobile devices:
(Note that jQuery Mobile has disabled page zooming on pages with fixed headers and footers to suppress some crazy behaviour!)
Their solution is based on this suite of test pages by Brad Frost: http://bradfrostweb.com/demo/fixed/index.html
You can comment below if you find anything weird.
To my surprise, three Android 2.3 devices do very well, (Hallelujah!) and our iOS5 device supports it very nicely - well, that is until you allow the user to pinch-to-zoom the browser page content! (Controlled by an HTML header page directive.) Then some very weird things start to happen. On Android 2.3 it seems to forget that it knows how to do fixed positioning, and on iOS5 it's even more entertaining: the fixed header will move at a different rate to the page content, and when you hit the right extent of the page, the header actually moves in the opposite direction to the page text! Who knew the iPhone supported parallax scrolling effects!!!
And here's the really bad news, if you're still on iOS 4 (or earlier). Since this platform doesn't support fixed positioning well, the jQuery team decided to 'degrade gracefully'. Unfortunately they put the emphasis more on degrade than gracefully, and now iOS 4 doesn't support any type of fixed header and footer at all without putting the onus on the developer. The previous solution was to have the header and footer fade out during the page scrolling (since it would move with the page content during the scroll) and then fade back in when the scrolling was done (since the browser would correct the position of the fixed position elements once the user lifted their finger).
I pointed out to the jQuery Mobile team that their new degradation strategy was biased toward web pages and not web apps, since now iOS 4 users could not have toolbars at the bottom of the screen, only at the bottom of their content. What a bad user experience that is! It's now virtually impossible to position a navbar at the bottom of the screen, which to me defeats the object entirely.
It appears that they see my point and we will at least have a way of falling back to the 'old way' soon, even if it is through a plugin or extension library.
I actually think there's an even better option for iOS 4, and that's using a javascript scroller div like the iScroll component. We already use a scroller in our mobile app and it works just fine on iPhone, (with the exception of textarea controls which grab the swipe event overriding the scroller). It was Android that was the problem. (See previous posts.)

Tuesday, 28 February 2012

jQuery Mobile 1.1

At last! jQuery Mobile has released the much anticipated 'Fixed headers and Footers' fix we've been waiting for.
As discussed previously, there was no good option for Android. The third party js widgets were slow to respond, jittery and buggy.
But now we can have fixed CSS headers & footers using native page scrolling.

I'm going to test it out and report my findings. Stay tuned...

jQuery Mobile RC1.1


At last! jQuery Mobile has released a candidate for the much anticipated version 1.1 with the 'Fixed headers and Footers' fix we've been waiting for.
As discussed previously, there was no good option for Android. The third party js widgets were slow to respond, jittery and buggy.
But now we can have fixed CSS headers & footers using native page scrolling. (If you want to know why it was such an issue, see this blog and vlog by Brad Frost.)

I'm going to test it out and report my findings. Stay tuned...

Monday, 13 February 2012

Sencha report on Mobile Chrome

Sencha Labs does a good job of putting HTML5 browsers through their paces.
As I was, they're quite well impressed with Mobile Chrome, but have already found some things lacking. This quote just about sums up my feelings on the subject of compliance versus real-world performance:
"As we’ve said many times previously, many mobile browsers do well on the checkbox tests like Modernizr, but fall short when it comes to real world applications and content. (In some cases, mobile browsers have even reported support when none exists.) So for real world testing, we use a collection of our own favorite HTML5 sites and demos.
First up, the new CSS properties for mobile content. On our HTML5 wish list for 2011 we asked for high performance position: fixed. And Chrome for Android delivers. For simple pages, Chrome for Android does a top notch job of glueing fixed position content to the screen. Fixed headers and footers for simple mobile optimized pages are now easily implemented without having to use a framework. However, the browser struggled when trying to maintain fixed positioning on more complex pages, particularly when combined with pinch/zoom. We saw poor frame rates and occasionally content disappeared or was misplaced. Happily, the very new -webkit-overflow-scrolling: touch property, which debuted in iOS 5, is also now available in Chrome for Android. It’s smooth and fast. (Nice job Chrome team!)"

See the full report here:

Wednesday, 8 February 2012

1st Impressions: Google Chrome Beta on Android ICS

Turns out I was right: Google have been working on Mobile Chrome. (I assume it will eventually replace the deficient default Android browser.)
As a x-platform HTML5 webapp developer, I have been burned BADLY by the default Android Browser. It sucked in four main ways:
- internal scrolling widgets (like iScroll)
- form rendering
- non-GPU accelerated 2D transforms
- inconsistent implementation from different OEMs.

The ICS default browser was a slight improvement in forms, but still full of rendering glitches and obviously not utilizing GPU acceleration for ops like scrolling and map panning.
First impressions on Android Chrome: Logistically we should see almost no fragmentation through Chrome than we do through the mangled browser implementations we are getting from the OEMs. (However, it remains to be seen whether some phones (typically HTC) will still omit to implement multi-touch in the browser from ICS forward, but it's a real problem for advanced web apps today.) Form rendering is better, rendering glitches are reduced, but performance is still on par with the ICS default browser. What gives? Chrome claims to implement hardware accelerated rendering? Compare Google or Bing maps on the web with the native implementation and you'll notice obvious lag. Then browse to the same URL with iOS Safari and you'll see how it should be done.
C'Mon Google - We expect better than this. You're LAGGING behind. (Pun intended.)

Monday, 19 December 2011

No Festive Goodwill from Apple

You are chatting with Alicia, an Apple Expert
Hi, my name is Alicia. Welcome to Apple!
You: Hi - I am considering a MacBook Pro.
Alicia: Hi!
Alicia: Ok
Alicia: How can I help?
You: Wondering if there are any plans for a Boxing Day Sale price in Canada?
Alicia: We do not have sales for Boxing Day in Canada. I'm sorry.
You: Oh! Boxing Day is my birthday! Can you offer me any special deals?
You: :)
Alicia: If I had any promo codes, i sure would!
Alicia: But I don't.
Alicia: I'm sorry!
You: Where might I get a special promo code from?
Alicia: We don't have them right now.
Alicia: That space is for when we have any (like shipping codes).
You: When do you have them? When is the best time to buy a Mac?
Alicia: It is very rare that we ever have them.
You: I bet you have them on Black Friday? Why not on Boxing Day for Canadians?
Alicia: This chat service is here to help with the Apple Online Store. How may I help with your shopping?
You: I have the items in my cart and I'm having trouble hitting the buy button...
Alicia: Ok. What seems to be the issue then?
You: It costs too much. A little seasonal goodwill from Apple would help.
Alicia: I'm sorry. If I had any promo codes to offer, I would offer them to you. Apple is known to be a company with little to no sales.
You: Well you may have just lost a customer. I think I'll buy an ASUS for $1000 less.
Alicia: That's fine. keep in mind, their quality is not the same as ours. It won't last you half as long either.
Alicia: If that's what you choose.
You: I don't think that you can qualify that statement. A friend of mine (loyal Apple customer) told me to buy the AppleCare warranty because he has ALWAYS needed it.
Alicia: Well, his situation might be different. I'm not going to argue with you.
Alicia: I don't have any discounts or promo codes to offer you.
Alicia: Is there anything else today?
You: I didn't come here to bash Apple. I want to buy one but I'm not getting a warm and fuzzy that would make me a happy customer. I will have to think about it some more... Thank you for your time.
Alicia: Well you are asking me to give you something that I simply do not have. If I did, I totally would. But you thinking that I do and just won't give it to you.
You: If you threw in a free 1 year One-to-One membership or something like that, I think I would buy it today. All I want is a little good will or flexibility.
You: But it sounds like your hands are tied.
Alicia: My hands are tied. I have absolutely nothing I can "throw in" or any promo codes I can even offer. If I did, it would be no problem giving it to you!
You: OK. Bye Apple.
Alicia: Thank you for visiting the Apple Store. We appreciate your business. If you would like more help, please chat with us again.
Thank you for choosing the Apple Store. If you have any additional questions, please chat us again.