Monday, February 05, 2007

WPF/E = JavaScript + Windows Media Player?

So, I just checked out the Microsoft Community Technology preview of Windows Presentation Framework Everywhere, the supposed "Flash Killer". After seeing this, I'm under the impression that WPF/E and the Flash Player are not really in the same conceptual sphere.

WPF/E seems to boil down to some JavaScript libraries and Windows Media Player (and maybe a little SVG) so far. It's unclear to me how much of the animation is controlled by JavaScript and how much is handled by the WPF/E ActiveX control: some of the examples have more animation-oriented JavaScript than others. All of the interactivity appears to be handled by JavaScript. In the network-aware examples, there is an Ajax library that looks to be responsible for communication.

So, in concept, WPF/E seems to leverage existing web technologies and tries to handle their varying implementations. Flash Player, on the other hand, provides its own implementation for those technologies.

I have a lot of questions about how WPF/E works. Does it leave the JavaScript interpretation up to the browser, or have they implemented another JS interpreter in the ActiveX control? Does WPF/E handle image display, or is that left to the browser as well? Basically, all of my questions boil down to this: is WPF/E merely coordinate the various technologies it uses, or does it actually provide its own implementations of those technologies?

If WPF/E is just coordinating a variety of implementations, it will always be limited by the browser, and Flash will always be a jump ahead.

Was this post helpful to you? If so, please consider making a small donation to keep this blog going.

3 Comments:

Blogger Richard Leggett said...

In answer to your questions. WPF/E does use the browsers JavaScript engine. At present you can think of the ActiveX/netscape control doing 3 things, all represented in XAML markup:

1. Presentation of vectors, text, images, video.

2. Animation timelines, i.e. ways to animate properties of XAML elements over time using keyframes or other forms of interpolated animation.

3. Dispatch events (run JS functions) when the user interacts with a XAML element by mouse or keyboard.

With JavaScript you can manipulate the properties of any element in your XAML, so you can ignore the built in animation tags, and animate the x and y or opacity of something yourself. You also generate or load XAML and "inject" it as you wish using myControl.createFromXaml().

I think that in time it might include a .NET2 runtime so that would give an alternative to just JS, and may make the control appear to do more than it does at present.

8:19 AM  
Blogger tom said...

So, does that mean you won't need Windows Media Player to play video anymore? WPF/E does that by itself?

8:52 AM  
Anonymous Anonymous said...

Windows Media Player includes many codecs. The WPF/e browser plugin includes one, the VC-1 decoder.
http://msdn2.microsoft.com/en-us/asp.net/bb187438.aspx#whataudiovideo

I believe you'll still need Windows Media Player (assuming it's still available for your OS) to view many Microsoft videos. You'd also need, ah, the video engine used on most popular sites today as well, for the rest of the web's content. (ie, "it can play some video" is distinct from "it can play all the web's video".)

For logic, the current release passes mouse events to the hosting browser's JavaScript engine, and also keyup/down events to the browser.
http://blogs.msdn.com/jstegman/archive/2007/01/31/feb-ctp-is-live.aspx

A future version is expected to also support a Microsoft logic engine, at additional download size, which should avoid the overhead of passing messages to the various browsers' JavaScript engines, but will demand different development techniques.

I don't know of any direct SVG involvement, although it should be possible to parse it into either Microsoft's VML or Microsoft's newer XAML curves, just as you could render SVG within the Adobe Flash Player.
http://www.google.com/search?q=svg+%28wahlers+OR+triolo%29

"Does WPF/E merely coordinate the various technologies it uses, or does it actually provide its own implementations of those technologies?"

Sorta both, depending... graphics & video are in the MS download... logic currently is external, in whichever browser is hosting, although at some point they say there will be an additional download for higher-performance logic.
http://www.theregister.co.uk/2003/11/10/microsoft_if_you_cant_buy/

jd/adobe

10:19 AM  

Post a Comment

<< Home