Even a chimp can write code

Friday, June 30, 2006

Cross-browser support for WPF apps

Windows Presentation Foundation has two flavors of applications: standalone and browser-hosted. The former is in the mold of a conventional "smart client" Windows application, installed on your computer, with Start menu and Add/Remove Programs presence. The browser-hosted app runs in a partial trust security sandbox within a browser.

You can launch either flavor of application by clicking on a URL in your browser. WPF's deployment model is based on ClickOnce, giving you the advantages of a single-click, per-user install, with sophisticated application update mechanisms, local isolated storage support etc. WPF apps can be launched from or rendered in any browser that supports the WebBrowser control. That means Internet Explorer 6, Internet Explorer 7, Internet Explorer 7+, MSN Explorer, Netscape 8.0 and above, AOL Explorer and Maxthon.

Unfortunately, ClickOnce currently does not have support for Firefox as of .NET Framework 2.0. To be fair, when Whidbey (code name for .NET Framework 2.0) features were being planned a couple years before .NET 2.0 shipped, Firefox hadn't yet taken off. Later when .NET 2.0 was close to RTM, the team made an effort to revisit this but their proposed DCR didn't make the bar at that late stage. The ClickOnce team understands this needs to be corrected in the Orcas timeframe. But in the short term, don't let that be a dampener. I recently tried out two Firefox plug-ins that I'd recommend as short term measures:IEView provides a context menu item such that when you right-click on a hyperlink to a WPF application, you can choose to open it in Internet Explorer. IETab does one better: it provides a similar context menu that lets you launch content in a new tab that runs the IE rendering engine.
3D cube animation XBAP in Firefox using IETab
The problem of providing native support for deploying and rendering WPF within all the browsers out there isn't just about flipping a switch and providing support. There are both huge technical and non-technical challenges in getting this right; plenty more of the former than the latter, but I won't go into those in this post.

How do you feel about browser support for WPF apps? Are there obvious things we should be doing, but aren't? I'd love to incorporate the feedback you provide into our planning process.

Other related links:


Tags: , , ,

Email this | Bookmark this

Saturday, June 24, 2006

How do my end users get WPF or .NET FX 3.0?

Customers often ask me:
  • "How do we get Windows Presentation Foundation on our application users' desktops?"
  • "Can we redistribute .NET Framework with our application?"
  • "Should I bet on WPF given that .NET Framework 3.0 isn't yet installed on millions of PCs?"

I figured a post capturing my answers was merited. [Needless to say, standard disclaimers apply: The views expressed here are my own. Although I work for Microsoft, this is my personal blog and I do not speak for my employers, nor do they endorse whatever I say here]. So, let's look at these one by one:

.NET Framework is pre-installed on Windows Vista
.NET Framework 2.0 and 3.0 are Windows components and will be pre-installed on Windows Vista. I just installed internal build 5464 of Vista yesterday and am very impressed with how it is looking. Going by the interest on MSDN, the number of downloads from Microsoft Download Center, and simply from first-hand comments I've got from customers, partners and the community, I personally expect Vista will be widely adopted faster than XP or Win2k was.

Redistributing the platform with your application
You can redistribute .NET Framework with your application. Visual Studio makes this easier by allowing you to specify pre-requisites for your application. On Publish, a setup bootstrapper (setup.exe) is created. Your end users invoke your app via the setup.exe which sniffs their machine for pre-requisites and downloads/installs them as appropriate before launching the app. I recommend reading this article for details.

Alternately, you can detect whether an end user has .NET Framework installed, by sniffing the User Agent string or reading the HTTP Accept Headers for application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml and application/x-ms-xbap.

Intelligent bootstrapping of .NET Framework on IE7
Internet Explorer 7 ships with the .NET Framework 3.0 bootstrapper. When you navigate to XAML/XPS/XBAP content but do not have the platform, it will prompt you "The content you are trying to access requires Microsoft .NET Framework. Would you like to download and install it?". Upon user granting consent, .NET Framework will be downloaded and installed and the originally requested content will be displayed.

Your compelling applications
This one's a biggie. I really do believe that compelling applications that exploit the .NET Framework 3.0 features (including Windows Presentation Foundation) will be the most potent catalyst for adoption of the platform. This version of .NET provides some very powerful features and APIs (for UI and visualization, communications, workflow, authentication etc.), making possible a new generation of rich applications on Windows. Even at about 45 MB (.NET 2.0 + 3.0, or roughly half that for 3.0 only), there will be many applications that make it worth the effort for consumers to download the platform.


Tags: , ,

Email this | Bookmark this

hCalendar on the Events page in the WPF community site

hCalendar on WPF Events page
I tweaked the Events page of the Windows Presentation Foundation community site and exposed the events as hCalendars. Here's a shot of the Tails pane in Firefox. Tails is a Firefox plug-in which detects the presence and details of hCalendar microformats (in addition to hCard and hReview). I don't ordinarily use Firefox but thought it'd be interesting to see how Tails displayed the events (There aren't any IE7 plugins for Microformats that I know of).

Tags: , ,

Email this | Bookmark this

Wednesday, June 14, 2006

Do you blog about WPF?

Well, do you? If you'd like your blog to be on the WPF community site's aggregator, please drop me a comment with your site URL, feed URL (RSS/Atom) and name. If you blog about WPF very often but also talk about your cat, that's not a problem. We won't hold that against you. (Don't know, maybe your cats will).

You are free to contribute code, samples and articles on the community site if you so desire. These submissions are currently moderated. Use the Gallery section to submit content.

Tags: ,

Email this | Bookmark this

Tech Ed Chalk Talk: XAML Browser Applications and the Partial Trust sandbox

Karen and I tag-teamed on a chalk talk yesterday at Tech Ed. The slide deck has been posted online. [Click here to launch]

Tags: ,

Email this | Bookmark this

Resources for designers on Microsoft platforms

David Shadle has a new site specifically for designers and creative professionals who want to create user experiences on Microsoft platforms. It's called Next Design Now. We in Microsoft are investing heavily in these areas. Designers have partied on features in Windows Presentation Foundation that let them channel their creative energies into producing rich user experiences. This, coupled with the designer-oriented Expression tools are baby steps in realizing a bigger goal. David's site takes a panoramic view on this and provides resources and tips.

I also want to highlight Thirteen 23, a design site that Robbie pointed me to. They've done some superb stuff with WPF that's definitely worth checking out.

Tags: , , ,

Email this | Bookmark this

Monday, June 12, 2006

Tech Ed: Day Zero

Well I'm finally here in Boston for Tech Ed 2006, Microsoft's largest developer conference. Lots of things happening today: WinFX v3.0 has been re-branded to .NET Framework v3.0. Read Soma's post on this.

I'm also happy to announce that the WinFX .NET Framework community site (netfx3.com) that I've been secretly working on the side (w/ Marjan, Michael, Parimal and James Conard) is now live! Go ahead, check it out. There's a section on WPF. This is meant to be the community watering hole for designers and developers alike on all things WPF. Please provide feedback. What do you like? Or don't? What would you like to see added?

I thought the keynotes on day zero were somewhat interesting. Besides, there was some classic Microsoft humor interspersed as video capsules where a bunch of our VPs playing characters in a show called "4", a play on the hit show "24".

Tags: , ,

Email this | Bookmark this