« March 2008 | Main | May 2008 »

April 26, 2008

Adobe AIR Security and future features

Adobe AIR, like so many development platforms, has you sign your code. This is not a problem. Tools are built in to Flex Builder 3 that create the signing certificate for you and the process is simple. Your code, however, is not signed by a trusted authority. For that, you need to spend money on a software signing certificate. These are of dubious value for several reasons.

First, web and computer users have been conditioned to simply not read anything to do with software licenses or installation instructions (the EULA is the longest, most unread document in the world == just a waste of bytes). The user invariably clicks yes, yes, ok, yes, no , yes, accept, yes, finish or such as fast as they can. Frankly, the only people who read these things are those most qualified not to (like your mother), causing confusion and time loss. "Yes, mom, it's safe to install the software. Don't worry about your licensee requirements under GPL version 2,"  or "You clicked what?? You didn't do a default installation? Sorry, I have no idea where your photos are now." So do users care who signed the software? No.

Second, most people install software from reputable sources and they also only install things that others are. This community helps filter out software that contains all manner of malware. Idiot emptor.

Third, everyone in the world can have free high-quality virus protection from AVG (and you are foolish not to). Download here: http://free.grisoft.com/ww.download-avg-anti-virus-free-edition When you download software (or anything), you should just scan it if you have any doubts. This won't solve all problems, but do it anyway.

So what is the value of signing? Nada. Unless, Adobe has something else up their sleeve, which I really hope they do. Signing does have value for developers, and ultimately the end-user, since signing certificates can be used to provide advanced features to the developer, depending on the type of certificate they have. What this means is if I buy a software signing certificate, I can use more powerful features of the language and create potentially better software.

What features should Adobe AIR expose to users with real signing certificates? Here are a few ideas:

  • launch native applications (not just the browser)
  • make native system calls
  • loading new code dynamically over the web (java-style class loading)
  • use webkit in off-line mode for advanced application support
  • support running flex SDK tools and allow creating self-modifying code...

These are all features that will make the AIR platform much more successful and capable against the competition (like java) that can already do these things.

Do I want to buy a software signing cert? No. I actually think these have hampered and limited mobile development for years. Do I think we need them? No, but if we are going to have them, let's get something in return. 

When looking for info for this post, I came across this interesting blog: http://www.brajeshwar.com/2008/air-security-part-1/

April 22, 2008

Adobe AIR and Webkit: problems and suggestions

I'm doing some complicated things with AIR. Or at least I want to- AIR does not always cooperate. Here is an one problem I have found in AIR 1.0 for Windows.

When using flash content (via an object tag) in an mx:html control, certain events just seem to get swallowed up by the runtime (or perhaps by webkit).

The events that are the most problematical involve opening new browser windows. If using someone else's flash object from the web (a widget, for example), it works fine until you click a link in it. Many launch new windows when run in a regular browser (like an RSS widget), but none perform properly when run in webkit using adobe AIR. I have caught at least one event and it is shown below:

[MouseEvent type="click" bubbles=true cancelable=false eventPhase=3 localX=189 localY=149 stageX=228 stageY=159 relatedObject=null ctrlKey=false altKey=false shiftKey=false buttonDown=false delta=0 commandKey=false controlKey=false clickCount=0]
[object Sprite]

Nothing indicates that an object that links to another web page was clicked nor is there a useful way to identify what the link was- you just know where you clicked in the overall mx:html control. Is there some other event that is fired? Maybe, but I can't find it.

What's curious is that clicks that lead to other behaviors work fine. You can play flash games, use music players, etc. It is just launching the default browser to a web page that fails. I know that if you specifically put in the navitgateToURL command that you can get this to work, but that implies you have some control over the flash code you are trying to use and in this case, you don't. I've also added the allowNetworking parameter to the object tag and set it to 'all' to try to convince webkit to let the flash object open the default browser, but no luck. It doesn't even load the new page into the existing window that the flash object is running in.

My suggestion is that all events in webkit html pages need to be handled or propagated (bubbled)  so that you can properly handle them elsewhere, if need be. I'm sure the internals of webkit are well-understood and that this behavior is not a fluke. In other browsers, this is not a problem, so I have to think it is a bug or done on purpose for some reason in AIR.

Here is some code that exhibits the above behavioral problem.

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" type="application/x-shockwave-flash" width="400px" height="343px" id="InsertWidget_6ab48d11-c347-4240-8001-ae3752cf2f50" align="middle"><param name="movie" value="http://widgetserver.com/syndication/flash/wrapper/InsertWidget.swf"/><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="menu" value="false" /><param name="flashvars" value="r=1&appId=6ab48d11-c347-4240-8001-ae3752cf2f50" /> <embed src="http://widgetserver.com/syndication/flash/wrapper/InsertWidget.swf"  name="InsertWidget_6ab48d11-c347-4240-8001-ae3752cf2f50"  width="400px" height="343px" quality="high" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" align="middle" flashvars="r=1&appId=6ab48d11-c347-4240-8001-ae3752cf2f50" /></object>

Anyone care to take a stab at this?

I'll be posting some other problems soon involving AIR and performance when creating windows with mx:html objects, javascript inconsistencies depending on whether an app is built with flex builder or the command line (very different apps allowed), and a memory problem when using background images to skin an app. New products are such a blast!!

April 13, 2008

Cadillac 2008 CTS 40gb hard drive and the truth

Cadillac keeps bragging about the big hard drive in the new CTS. I have one question- how do you fill it up? The answer- slow and painful, unless you really pay attention and get a little lucky. (If you just want the right answer, skip to the last paragraph).

First, the hard drive is 40GB but after you install the navigation system, 10GB is left. That is still enough for lots of music, podcasts, and audible.com (only) audio books.

Any music has to be in the mp3 format and DRM is not supported. What this means is if you have an iPOD loaded with iTunes music, it won't play on this system. The DRM will not let you convert from Apple's format. Now if you have bought some apple DRM-free tunes, you can convert to Mp3 and load onto something else and transfer to the caddy. Yeah- I see that happening.

If you use a store like eMusic instead, you could have all DRM-free music and play your library in the caddy and on anything (yes, even the iPOD). I use eMusic and it's about 25 cents a song. They just got all the really good Rolling Stones music, too- 1964-1970.

So what will people really do? Just play music on their iPOD plugged into the system. Or a CD. Or XM. Or even AM/FM. No hard drive needed (except for navigation). Oh, and how do you update the nav system? Manually, with news discs. AARRGGHH!

If you do want to fill the 10GB with music, you have a more manageable problem but what a hassle. 10-15 trips with an Mp3 CD or memory stick will solve it. We're talking about 3,000 songs- you will be wishing you put Mp3's on your iPOD.

Now you can also record an hour of AM/FM/XM onto the hard drive. The quality will be horrid. AM/FM to mp3, anyone? This is like when in high-school I used to make tapes off the radio. It worked but I can't imagine why you want a $3,000 system to play low-quality music. I guess the iPOD has turned everyone's ears to mush and if you don't hear compression artifacts, you probably think something is wrong with the music since it doesn't sound right (to you).

How does the auto industry get this right? Your car has to talk to a network. A wifi card would be a start, but not a good one. You could download music from your home network, assuming you park real near your house. But what service do you use to access your media? There is no "wifi provider" that offers services (and never will be). Maybe you could use Universal Plug and Play, but no one does. The right answer is a pervasive wireless network, like Wimax or EVDO ( or EVDO Rev A.) with a service provding access to your media through the Internet. High-speed data, no software to install at home (maybe a browser plugin), and meeting your needs. This is more secure, too, and ultimately provides a platform for real in-car services. You could download video, make VoIP calls, download updates for your nav system. The advances in this area over the next few years will be truly amazing and more importantly, more useful than a 40gb hard drive that is hard to fill.

 

 

April 10, 2008

Designing Next-gen applications with mobility in mind


As telcos try to build out new data networks, one thing is certain- there will be coverage problems. The question is, how will developers respond? Are they even thinking about how to deal with a device that has an intermittent connection?

I'm running skype on a Nokia N800 (with the n810 firmware) and using wifi. Phone calls work fine but when you hit the edge of wifi coverage, it is a pretty sharp cliff. In my case, in a span of 10 feet you go from talking to nothing to dropped call. If you run back and forth through the edge zone, the call will stay active, but you will lose lots of packets and hence, the audio. Once fully back in coverage, skype has no problem with the intermittent connection and making subsequent calls. Good.

Other apps are no so pleasant. Youtube, for example, does not start downloading/playback again following a loss and subsequent reconnection. Why not? My guess is no one thought of it. I tried revver.com, but it doesn't work on the Nokia tablets. Revver also makes you choose the type of video content you want meaning they don't know what type of device it is that you are using. Device recognition is an important part of context, but is routinely ignored.

Veoh works on the Nokia and uses progressive download. When it loses the connection, the video stops after the cached data is exhausted, as expected. But the player does not go to the "pause" state, judging by the pause button being is playing (meaning it thinks it is still playing). Upon reconnection the download is not resumed and you can't make it. No more (of that) video is playable.To test audio, I went to www.somafm.com and launched an mp3 stream. This launched the nokia media player (Kudos, Nokia!). It buffers and then commences playback. Very small buffer in use, though. Just a few seconds of data. Once the connection is restored, though, the app re-buffers and continues playback. That's the way it should work.

This type of multimedia experience will be very frustrating with new mobile devices operating on the go and in imperfect network conditions. Developers assume perfect network connectivity, but that is going to change and they must change their ways.

What do you do? For apps that update periodically and need a web connection to do so, you have some design choices. You can "look ahead" and cache some additional content while you have a connection. This is what progressive video does (think youtube), but can also apply to a photo slide show or your RSS reader. I would always recommend caching video to support future playback even when disconnected and provide easy ways to re-initialize the video player in case you get stuck with a partial download. Larger buffers are a good idea, too.

I really think the app should control behavior when a connection is lost- maybe even do something as the connection weakens, if possible (yes, developers can read radio performance properties and use them). Think about the natural behavior. Does the user want to see an error message or maybe just keep looking at the last photo of the slide show until the connection is back? Do they want to see the rest of the video they were watching? Maybe the app can resume when re-connected? Let's make it easy.

April 02, 2008

Why NASA job cuts are good for space exploration

The space shuttle is going away and for years, we won't have the same space launch abilities as before. Private companies are looking to fill that void and make a bundle. Just check out http://www.spacex.com/updates.php

This in itself is a great opportunity and if the privateers are successful, it will change NASA forever. The other opportunity is to get the NASA brain-trust into the private sector. The government is handling this by laying off about 8,000 people involved in the space shuttle program. This will happen over the next couple of years. Not all 8,000 will fiind a new home in private space exploration, but many will and some will even start their own companies.

I predict a flurry of activity. Like any new industry, you start with pioneers, then many new entrants come along lured by the success of a few, and then a consolidation occurs. Look at the history of the auto industry for how this works.

I also believe great new innovations will occur. I only wish our desire for space was stronger. I decided to become a nuclear engineer over 20 years ago so that I could operated nuclear plants on the moon (no kidding!). That is now for the next generation.


Hosting by Yahoo!