12 May, 2008
Things I wish AIR and WPF had
Posted by Bhavin Turakhia
This makes a great follow-up to my last post on the Paradox of Choice. Life would be simpler with a single platform :). Before I start a flame war on that subject let me quickly turn your attention to the real topic of this post. I have been grappling with deciding between AIR and WPF for internal application development and in all honesty, I’d like to have them both. Here are my short list of gripes (or on a more positive note, my wishlist for AIR and WPF)
Missing in AIR
- Advanced socket manipulation functionality (ability to create UDP sockets, NIO etc)
- Talk to any RDBMS
- Multi-threading
- Decent server socket libraries for building server applications (yes I know AIR is a desktop client platform, but given the Web 2.0 world, the line between a client and a server is beginning to blur considerably)
- Accessing global keyboard shortcuts
- Accessing native libraries (the kind that I get with XPCOM on XUL)
- Ability to instantiate external applications
- Greater control on the installer and installation process
Missing in WPF
- Write once, run anywhere ie the ability to run on Mac/Linux (I have already confessed that this is a wish list)
- A full-fledged HTML rendering engine (as opposed to having to instantiate an IE control with limited flexibility)
Hopefully folks at Msft and Adobe are listening


Firstly, because of some weird bug, textbox below the captcha is not visible in Firefox.
Secondly,
1) Multithreading is a high priority feature for next AIR release
2) But I do not think Adobe wants to promote AIR as a platform which can replace (or offer possibility of replacing) an OS specific API. What they are planning for is to offer desktop interaction with unlimited storage and processing power i.e. to shift them in a cloud.
Some links that I consider important for assessing AIR’s potential and acceptance
http://www.readwriteweb.com/archives/adobe_thermo_ria_design_tool.php
http://www.techcrunch.com/2008/04/03/seesmic-aquires-popular-twitter-air-client-twhirl/
In the recently announced .NET 3.5 SP1 (http://blogs.msdn.com/tims/archive/2008/05/12/introducing-the-third-major-release-of-windows-presentation-foundation.aspx), we have introduced a richer control to do HTML rendering more easily.
From the blog:
“The third control does ship in-box with .NET Framework 3.5 SP1, and is a richly-functional WebBrowser control. Since the initial release, WPF has enabled web content to be displayed via the Frame element, but that had a number of limitations: you couldn’t interact with the content of the frame programmatically, HTML content could only be hosted from a URL (not from an in-memory stream or string), you couldn’t navigate programmatically through the history, and you couldn’t interact with any JavaScript on the page. The WebBrowser control offers all those capabilities, enabling much more seamless interoperability between WPF and HTML content. It also provides a great way for WPF to host Silverlight content - just point it at the Silverlight .XAP file. One other nice touch: it supports partial-trust mode for use within XBAPs, enabling an XBAP to include an inline frame of HTML content that can be interacted with. ”
Hope that helps swaying your choice
@pandurang: thanks for your reply. However I cant help but wonder if this is an identical paradigm to the webkit rendering engine available in AIR. When using a browser control to render HTML I do not get a true event based programming model or a true code-behind feel.
Hey Bhavin,
Have you checked out Zinc ( http://www.multidmedia.com/software/zinc/ ) - it allows to code in Flash/Flex and use native Windows/Mac/Linux APIs as well as access databases, etc.
I’m in the process of evaluating it myself.
Regards,
Swaroop
@Swaroop: I have checked out Zinc (had bookmarked it in our wiki - http://wiki.directi.com/x/MwAa). I have heard that they are not too happy about AIR :). The advantage with Zinc as you mention is the ability to access native code. There is actually one more product which allows that too - I forget the name. It allows compilation of AIR apps into executables that do not require the runtime download.
Hey Bhavin,
Yeah, I’m sure AIR would’ve hurt them to some degree
Are you referring to http://www.shu-player.com ?
Have you (or any of your colleagues) evaluated Zinc and/or Shu? Would be of great help to get your take on it (we can talk about it offline).
Thanks again,
Swaroop
@Swaroop Yes - shu-player. I havent personally checked it out. I remember the time I stumbled upon them they were in the midst of negotiating a licensing arrangement with adobe to allow them to bundle the runtime with their program. Would be happy to connect with you to discuss. Why dont you shoot me your contact details at bhavin DOT t AT directi.com.