Android 2.2 got rolled out for my HTC Desire this afternoon, and I am both pleased and surprised to report that Flextrine runs on it without any problems!
There have been some nasty fights recently between Apple and Adobe regarding allowing the Flash Player to run on mobile Apple platforms, which is starting to descend into massive criticism of the Flash platform itself. I guess its obvious which side of the debate I am going to be on and here is some of my reasoning:
- Another of Apple’s problems is that Flash is a closed platform. Its true, and I as much as anyone would be happy to see the AVM open up; however, Apple are being pretty hypocritical here – the iPhone/iPad platform (as opposed to Android) is also completely closed. Furthermore Apple own patents in H.264 (the video codec they are promoting in concert with HTML 5 as the replacement for Flash video) and stand to make a mint out of their ‘open’ replacement. This sounds like a business tactic to me, rather than any high morals to advance the open source community.
- As a case in point Apple are quick to mention that even on high powered OS X machines Flash performs badly. Well, the main reason for this is that Apple block access to certain API required for higher performance, no doubt so that they can then claim that Flash performs badly on high powered OS X machines.
- In almost all the chat around the web Apple seem to be complaining about one thing (although without specifically saying it); streaming video. Flash is of course used heavily to deliver video and streaming over the web, but this is a tiny part of what Flash can and does do. What about Flex, RIAs, applications, etc? Flash is a fully featured platform which happens to be ok at delivering video but by taking this stance Apple will be blocking everything else that is good about Flash.
- Despite the fact that HTML 5 is a standard, history strongly suggests that its going to perform differently in IE, Firefox, Safari, Opera and every other browser increasing development and maintenance time. Flash is a plugin, and although this certainly has its negative points at least you can be sure that it will do the same thing in every browser and platform.
- If there is a bug in the Flash Player, Adobe release a new version which updates itself from within the player. Imagine if something turns out to be wrong with HTML 5? Its a standard which means that the bug fix will need to be implemented as a upgrade to the standard, then every browser will need to implement the update off their own steam. We will certainly end up with a situation where browsers support different states of HTML 5 at the same time. Adding new features will face a similar issue.
The whole thing feels like Apple playing off consumer loyalties and technical ignorance to try and control as much of the web as they can. I believe that ultimately this will result either in developers falling away from the Apple mobile platform in favour of devices that support the cross-platform model which will end up damaging their business model. At which point, no doubt, Flash will suddenly be supported again 🙂
As Flash and Flex developers know all too well, browsers have a habit of caching SWFs so that when you put up a new version it doesn’t always show up on client machines. There are two classic ways to get around this – either by manually clearing your cache (and telling your clients to do the same) or by appending a random number to the end of the filename as a parameter which is then ignored by the application but fools the browser into thinking that the file has changed. The first method is unreliable and the second method causes the SWF to reload every time you visit the page (even if it hasn’t changed) which munches up your bandwidth and your time.
As it turns out, there is a third and far superior way! With a tiny bit of PHP in your embed code you can make browsers refresh the SWF only when it has changed. Note that this uses the SWFObject library, but would work equally well with any embedding method.
It works by using the file modification timestamp of the swf as the version number with the result that browsers will refresh their cached copy if and only if you replace the swf with a new version. Simple and extremely useful!