WPF is the coolest thing an MFC programmer has ever seen. Of course, developers who have been working with declarative markups (HTML, SVG, XUL or Laszlo) and RAD form builders (Delphi and VB) are not hyperventilating. Sure, its nice that Microsoft has introduced a development platform that is actually easy to use, but such platforms have been around a while. Now, WPF/E is ready to take rich internet application (RIA) development by storm. Its not the first (XUL, Flash, Flex and Laszlo are not betas), but Microsoft’s entry is not to be taken lightly.
The WPF/E hype and the quest for a non-Adobe SVG viewer in Internet Explorer (IE) made me to start to wonder what it would take to get Mozilla’s platform running in IE. Turns out, it’s easier than I thought:
- Get XULRunner on your Windows machine.
(From Mozilla or as part of my XUL Explorer) - Register the Mozilla ActiveX control
- Mark control “Safe” or Tweak IE’s security.
(You can register and mark the control safe using this patch) - Done!
This could even be made easier (zero steps) by creating a CAB file for XULRunner and adding code to the Mozilla ActiveX control to mark itself “safe”.
Control Setup using Patch
- Unzip the patch files to wherever you installed XULRunner. If you just installed XUL Explorer, XULRunner is in a subfolder.
- Execute “mozactivex-reg.bat”
For those of you wondering about the “patch”. It simply registers the Mozilla ActiveX control and then adds 2 registry keys to the control that tell Windows that the Mozilla control is “Safe for initialization” and “Safe for scripting”. See this Microsoft page for more information.
XUL/E Samples
These samples can be run in Firefox (any platform) and IE (windows). Make sure you have installed and configured the Mozilla ActiveX control. The difference between these links and the ones on a previous post is that these are displayed using a special “viewer” HTML page.
- Entry form using a grid for layout: entryform-using-grid.xul
- Tabbox with groupboxes and other controls: tabbox-with-groups.xul
- Tree an popup menu: simple-tree-with-popupmenu.xul
- Simple text editor application: notepad-app.xul
- Ted Mielczarek’s XUL editor: http://ted.mielczarek.org/code/mozilla/xuledit/xuledit.xul
- SVG in XUL (lion): svg-in-xul-lion.xul
- SVG in XUL (parrot): svg-in-xul-parrot.xul
- Simple clock: canvas-in-xul-clock.xul
- Basic “drawing” canvas. Use the mouse to scribble lines: canvas-in-xul-scribbler.xul
Note: If using IE7, the yellow information bar will prompt you to let the Mozilla ActiveX control run. In IE6, you will see a dialog prompt.
Not only can you create rich clients in IE using XUL, but you can also view SVG in IE! As always, feedback, comments and new ideas are welcome.
This sounds really cool. I think Mozilla Corp/Foundation (or someone else) should look into making use of these possibilities to give WPF/E some competition.
I’ve added it to http://svg.startpagina.nl
Hi Mark,
Ok, I’m officially starting to get excited about this. I’m assuming you’ve seen this discussion on svg-developers: http://tech.groups.yahoo.com/group/svg-developers/message/56745
But can you help me understand with your proposal:
1) Would the “plugin” (for lack of a better term) also work with XHTML and XHTML+SVG content? How do you set it up so that IE tosses control over to the Mozilla plugin/control when encountering certain MIME types?
2) Does it support SVG DOM scripting also? This would be VERY important.
3) How hard would it be for Mozilla to officially get the “zero step” version of this up and supported so that we can point people at it? We need something as simple as a browser plugin download if we’re going to pursue the Mozilla-within-IE option. Even though Adobe won’t be removing the plugin download, it’s still a dead-end, so I think the movement off of ASV should start as soon as there is a minimally viable solution that comes close to ASV’s level of support. And Mozilla-within-IE feels kind of like a “coup” š
Thanks,
Jeff
Oh, and this is a more recent discussion: http://tech.groups.yahoo.com/group/svg-developers/message/57598
This could be it:) Someone please make the zero-step version official:)
This is cool, would it be possible to include it as part of for example the Google / Yahoo Toolbar ?
If it could be done (and it was) it’d instantly get a large userbase. What about 3D stuff in the XUL language one of the major benefits with WPF is that it supposedly makes 3D objects with video and audio easy to tie together, can something similar be achieved with XUL?
First, I just wanted to make clear that this control has existed in Mozilla for a while. Checkout Adam Lock’s website for more information about it:
http://www.iol.ie/~locka/mozilla/control.htm
Jeff – Currently, there is no MIME-type handoff from IE. The control acts like an embedded Mozilla webbrowser. You can navigate to any content type that Mozilla browsers support. DOM scripting should work, but doesn’t in my tests. The control has a “Document” property that should give IE (or any container) access to the internal DOM. I am looking into this. It works when hosted from a C++ application , but not IE.
Dan – XUL / SVG do not directly support 3D. I say directly because there are libraries to add 3D support to SVG. While WPF does support 3D, WPF/E currently does not either.
The “zero-steps” version will be very easy, once a host server and certificate are available. I am going to start some internal discussions at Mozilla to see what approach the company wants to take.
Alright – I’m still confused by this. Are you saying that the control has to be manually “invoked” by my web page? If this is the case, then that’s not the greatest news for us web developers who want to be browser/plugin-agnostic when it comes to next-gen web technologies like XHTML/SVG. I guess some JS sniffing for that control would have to be added by every XHTML/SVG web developer out there.
How hard would it be to make the control a true IE plugin based on this ActiveX control that AUTOMATICALLY handles XHTML and SVG content based on the MIME type? I’m clueless when it comes to this stuff at the moment…