Monday, March 19, 2007

How To Screw People For No Reason, Whilst Trying To Be Helpful

Windows Mobile IE has long been a pain in the arse when it comes to device targetting through UserAgent detection - almost as bad as the various mobile Operas, with the sole saving grace that for all the millions of Windows handset variations HTC kick out hardly anyone buys them.

Handset manufacturers set a very low standard with their utter lack of consistency - take a brief skim through the WURFL if you need examples. In the end though even Samsung sticks to a core set of patterns you can latch on to, once you understand your SPH from your SGH.

Windows Mobile however sees things differently. From an application programmer's perspective, you probably need to find out a couple of key things about the device:
  1. Screen size - currently that can be 176x220, 240x240, 240x320, 320x240, 640x480, 480x640, 800x600 and probably a few other rehashes of those figures, which makes quite a difference to the graphics you send.
  2. Input device(s) - devices on the PocketPC side (now, inexplicably, Windows Mobile 6 'Professional') use touchscreens with a handful of keys, devices on the Smartphone ('Classic') use phone keypads.
It would also be really nice to know if you're expected to rotate a rectangular screen whenever the optional keypad is pulled out - for some games that makes a major difference and when delivering content OTA you want to minimise download size... the actual presence of that keypad would also also nice to know, but not essential at deployment time.

Traditionally a Windows Mobile UA would look a little like this:
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320)
or
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; Smartphone; 176x220)

Both those useful bits of info I mentioned are immediately available from this UA, so the standard code that all mobile developers running deployment servers are cursed to rewrite can easily select the right content and send it out. It's not perfect - we are rarely told if a JVM is present (and it's rarely integrated well enough to do an in-browser OTA installation smoothly either), and we rarely get enough info to know whether to expect the screen rotation and the QWERTY keyboard, but enough basics are there to get us where we need to be.

Apparently, however, this is not good enough. For the sake of tidiness or somesuch, some idiot over at Microsoft decided to remove both the screensize and the core platform name from the UA as of Windows Mobile 6.0 because "Since the capabilities of the Pocket PC and Smartphone versions of the browser are identical, and they're built from the identical code base, there's no reason to differentiate them any more".

For web sites being browsed, arguably might be true (though optimising AJAX just got a bit harder if you don't know what will be clicking on your bits) - but for OTA deployments you just made things way harder. This is what happens when people decide it's safe to break backwards compatibility for the sake of "tidiness" without having any clue what the consequences are, and it really annoys me.

We do now have some extra headers giving the screen size etc, and yes it is possible to adapt deployment servers everywhere to handle this - costing many months of work across the world, because the many independent solutions to the mobile deployment problem that exist were all designed to sniff just the UA.

Apparently M$ "really appear to have got mobile with Crossbow" (sorry, can't remember which hack lifted that from a Microsoft PR bot) - I beg to differ. If they really got mobile they'd know people depended on these things and just leave them the hell alone, and while they were at it put a standard well-integrated JVM on the OS and ditch .Net Compact; I fail to see how (from a 'getting the mobile marketplace' point of view) some totally random non-standard environment can be totally core and yet a JVM could be seen as an optional extra for 3rd parties to worry about, but then that's politics.

Anyway, rant over. I shall resist the urge to go and explain that I would rather see the IEMobile Team's heads removed from their bodies because, hell, it won't affect my life and go back to preparing the two big posts I've been meaning to write for ages which will be loads more relevant and interesting than this one. Grrrr.

Labels:

8 Comments:

Blogger Andrea Trasatti said...

Unfortunately MS people think they are doing it the right way.

I had posted an article about their browser on my blog, new MS IEMobile user-agents

11:13 am

 
Anonymous Anonymous said...

Aw, this was an incredibly good post. Spending some time and actual effort to make
a very good article… but what can I say… I hesitate a lot and don't manage to get nearly anything done.

my blog :: greatest locations to look for gynecomastiahelp

10:01 am

 
Anonymous Anonymous said...

Hey! I just wanted to ask if you ever have any
problems with hackers? My last blog (wordpress) was hacked
and I ended up losing months of hard work due to no data backup.
Do you have any methods to stop hackers?

Here is my blog :: Classifications associated with Gynecomastia

10:13 am

 
Anonymous Anonymous said...

There's certainly a great deal to learn about this issue. I like all of the points you've made.


My weblog Chestfatburner.Com

10:22 am

 
Anonymous Anonymous said...

Appreciate the recommendation. Will try it out.

Stop by my page: http://chestfatburner.com

9:07 am

 
Anonymous Anonymous said...

Woah! I'm really enjoying the template/theme of this site. It's simple, yet effective.
A lot of times it's challenging to get that "perfect balance" between superb usability and visual appearance. I must say you've done a awesome job with this.
Additionally, the blog loads very fast for me on Safari. Outstanding Blog!


my blog post: chestfatburner.com

9:47 am

 
Anonymous Anonymous said...

Please let me know if you're looking for a author for your blog. You have some really good articles and I believe I would be a good asset. If you ever want to take some of the load off, I'd love to write some content for your blog
in exchange for a link back to mine. Please blast me an
email if interested. Thank you!

Also visit my web page: chestfatburner.com

10:18 pm

 
Anonymous Anonymous said...

Why visitors still use to read news papers when in this technological world all is accessible on web?


My blog post ... Perform diet and also practice have a role withinside the treatment of gynecomastia?

12:09 am

 

Post a Comment

<< Home