ProfileRob RelyeaBlogLists Tools Help

Blog


    November 09

    XBAP = next-generation ActiveX?

    Anne 2.0 posted a short note about .Net Framework 3's launch and include the short phrase:

    "XBAP = next-generation ActiveX?"

    I ended up typing a quick reply in comments...but I figured it was worthy of a post.  I am too busy to tweak it so it is perfect...I'll post now and adjust based on comments and further thinking...

    Are XBAPs next generation ActiveX?

    That is an interesting way to think about them.  I hadn't heard that comparison before.
    Clearly we are trying to enable some similar things...and luckily we realize many of the problems of ActiveX.

    So, maybe that is a valid way of thinking of them...but read the details below...

    ActiveX Problems

    ActiveX allowed web sites to take advantage of Windows and the power of Win32. It had a few problems:
    1) once installed, activeX controls could do anything, even things the user might not want you to do - like delete files...
    2) activex controls, because of 1, required a user prompt. Many developers weren't excited by that...or the complexity of installation that users had to go through.
    3) activex controls only worked in IE based browsers

    XBAP Comparison

    XBAP powers that are shared with ActiveX
    XBAPs have some of the positives that ActiveX controls had:
    1) they can do powerful things more easily than they could be done in DHTML.

    XBAPs fix some of the Cons of ActiveX controls:
    2) XBAPs run in a sandbox, and can't do things like delete files.
    3) since there is a sandbox, that limits the power of what XBAPs can do to the local machine. that means we don't need to prompt for approval to run the app...giving the user a better experience.

    XBAPs go beyond ActiveX controls:
    4) XBAPs can use all (or 98.2%) of the power of WPF to build great user experiences.

    XBAPs add one CON over ActiveX controls:
    5) xbaps must live inside of a Frame/IFrame or top level window...so the incremental addition to an existing web page is not as strong as activex controls enable. we know of this limitation and would like to fix it in the future...
    6) becuase the hosting strategy is currently a DocumentObject application, instead of an activex control, the granularity of communication from a hosting web page into the XBAP is weak. You can communicate via querystring.  This area has a bunch of room for improvement
    [thanks to Footballism for calling out this point in comments...this list wasn't complete without it.]

    XBAPs share this con

    7) XBAPs today only run in IE6 or IE7 (or in other browsers that host IE technologies: netscape, firefox...but that isn't as great as native support).  This is not a technologically blocked...as long as .Net Framework 3.0 is installed on a machine, other Browsers should be able to support XBAPs...if you want those browser vendors to enable that, please ask them to enable it
    [Thanks to Logan for calling out this issue in the comments]

    Related Posts/Information

    Thoughts?

    Updates:
    November 13, 2006 - added bullet 6 and 7 and the links to Karen Corby and Charles Petzold.
    July, 2007 - added the link to Karen's XBAP and Trust levels

    Someone on Windows Live

    Comments (14)

    Zhou Yong - Nov. 10, 2006
    Hi, Rob, I am completely with you when you say that XBAP can be sanboxed, which can provide much better security than the ActiveX, but XBAP cannot be scriptable, that's a downside of XBAP, If I understand correctly, the upcoming WPF/E implementation is based on the "managed" ActiveX idea.

    Sheva
    Logan - Nov. 10, 2006
    You cite two problems with Active X controls. There are actually three - Active X controls only run in one browser. I would really like to see an effort to make XBAP cross browser on Windows and ultimately cross platform (to the greatest degree possible).
     
    XBAP really looks poised to take on the flash environment and adobe - but this will not be possible unless XBAP has a more portable and widely deployed execution environment.
    Rob Relyea - Nov. 13, 2006
    Logan-
    Great point about:
    x-Browser on Windows
    and
    x-Plat
     
    footballism-
    Yes, the communication into an XBAP is weak today
     
    Thanks, I will enhance my list in the post based on both of these comments.
    Also, Charles Petzold just posted how to move an App to an XBAP.  I'll add a link.
    IRhetoric - Nov. 13, 2006
    Also check out the flexible application template for Visual Studio that allows you to toggle between XBAP and .exe in your build configuration:
     
    FABIO GALUPPO - Nov. 13, 2006
    One more comparison
     
    XBAPs doesn't work in Windows Vista Sidebar, ActiveX does! :-)
     
    I hope that Windows Side Bar support .NET soon. Until there, ActiveX != WPF
    Someone on Windows Live - Dec. 17, 2006
    You write that:

    XBAPs go beyond ActiveX controls:
    4) XBAPs can use all (or 98.2%) of the power of WPF to build great user experiences.

    What functionality of WPF is not actually supported in XBAP?

    Thanks, Michaekh
    Rob Relyea - Dec. 18, 2006
    Michaekh-
    There are a few things that don't work in partial trust (in an xbap.)
     
    WCF and Image Effects (blur, etc...) are the example that stick out in my mind.
    Check out the link to Karen Corby's link that I list above for more precise examples.
     
    Thx, Rob
     
    Phil Carney - Nov. 10, 2007
    "activex controls, because of 1, required a user prompt. Many developers weren't excited by that...or the complexity of installation that users had to go through. "
     
    I am using VS2008 Beta 2 - When I publish an XBAP and click to download it, I am prompted with an unknown publisher dialogue box. How do I switch this off?

    Trackbacks

    Weblogs that reference this entry
    • None