in
Forums
Blogs
DevExpress.com
Client Center
Support Center
DevExpress Channel

The One With

Silverlight on a Desktop

Silverlight or WPF/E (WPF/Everywhere) was built to be a browser plugin. Small, secure and rich*. Why? I mean why stop at the browser? Why can't we deploy it in our own sandbox? Just imagine a brand new class of applications (or applets as I like to call them).

At this year's PDC, rumors were flying around about *good* Silverlight Hosting API possibilies in the next version. But even then, how would they work? Would they be cross platform?

One solution to enable this new class of applications is to host everything inside Trident (IE WebBrowser). This works if you want to run your app.on Windows only. To me, this particular class of apps would need to be cross platform to succeed. Even if you disagree and say you are fine with Windows only, you'll still be limited to the Trident's sandbox. Accessing the local system would be possible via window.extern but you'll need to solve the "same origin" (same domain) security restrictions if your xap is gonna be run from say (res:// or file://). And then on top of that, what are you gonna use to host the WebBrowser (Trident), WinForms? If so go straight up WinForms or WPF.

What else can we do? NPAPI to the rescue. Why not pretend to be a browser and load the Silverlight plugin just like a browser would. Gecko and WebKit based browsers do just that. They use the public Netscape Plugin API to load the plugins that the page needs, based on the MIME type specified in the embed. In our case it's the application/x-silverlight type. By going this route, we can control the sandbox, we can feed the functions to our applets to enable access to local system resources. We can control the same domain security restrictions. And finally, we can be cross platform and we don't need the hosting API even if it existed.

How cool would it be if I could include a .target file in my Silverlight project, and that .target would include all the steps needed to pack my xap into a single executable?

Welcome to project Fiji. An experimental work to do just that.

You can download the preview bits (fiji.exe) here http://community.devexpress.com/blogs/theonewith/fiji.zip.

To run it, simply pass in the name of your xap file in the command line: "fiji.exe C:\MySilverlightApplication.xap". (full path)

Would love to hear what you think.

Cheers

Azret

Published Dec 04 2008, 06:23 PM by Azret Botash (Developer Express)
Filed under:
Technorati tags: Silverlight

Comments

 

John Harrison said:

What's the * for on the first line?

December 5, 2008 3:10 AM
 

Patrick van Dijk said:

Sounds like a great idea...and I've tried it, but for some reason it is not working all the way. Still investigating what might be wrong, but I think it has to do with trying to access resources/image on the Internet. Probably need a crossdomain policy or something.

December 5, 2008 4:02 AM
 

Azret Botash (Developer Express) said:

Patrick,

Make sure you don't make calls into HtmlPage.Window or HtmlPage.Document. Those objects are not fully implemented.

December 5, 2008 4:33 AM
 

Shloma Baum said:

Hi Azret,

This soooooo cool! I'm really excited to ths. I tested it with a small app and although the UI loaded fine, it had a problem to communicate to a outside source, the same xap file works fine in the browser. The way it communicates is via RemObjects DataAbstract, which internally uses the WinInetChannel, I'm not sure thought where the problem is.

Just a note that when I loaded the page in the browser that contains the html vis the file:// it had an issue locating the server due to the cross domain, it only worked when accessing it over http://localhost:port/ etc. this might be the cause here as well.

Really looking forward to a full implementation.

Regards,

Shloma

December 5, 2008 9:38 AM
 

Azret Botash (Developer Express) said:

Shloma,

Yes this is because the webservice call is not made from that domain. There will be a way to specify the domain in the config. file. Stay tuned to the Silverlight Line of Business apps. series of blogs for more...

December 5, 2008 10:10 AM
 

Click Zimmerman said:

Sounds absolutely brilliant to me.  Is there anywhere where I can see Developer Express' development plans for Silverlight?

Regards,

Click

December 7, 2008 6:10 AM
 

Community Blogs said:

In this issue: Pete Brown, Tim Greenfield, Boyan Nikolov, Jesse Liberty, Mike Ormond, David Justice,

December 7, 2008 10:29 PM
 

2008 December 08 - Links for today « My (almost) Daily Links said:

Pingback from  2008 December 08 - Links for today « My (almost) Daily Links

December 8, 2008 1:56 AM
 

peancor said:

Great! it would be nice command line options to control the aspect of the window (autosize, borderless, topmost, etc)

December 8, 2008 6:30 AM
 

Renaud Bompuis said:

This looks very promising. I'm curious to see how far this can go in terms of functionalities without having to jump through enough hoops that it becomes preferable to use WPF.

A major use case of this is for business apps that need little maintenance, can easily be installed and updated without requiring an administrator account, and still offer all of the expected features.

It's a nice start.

December 8, 2008 10:14 AM
 

Azret Botash (Developer Express) said:

peancor,

Yes controlling the window would be very useful.

PS: Nice game :)

PS2: You can try to change the title:

HtmlPage.Window.Eval("window.document.title=\"MyTitle\"");

December 8, 2008 2:17 PM
 

Azret Botash (Developer Express) said:

Renaud,

I don't know how far this can go yet. This is just an experiment so far. But I would love to see www.adobe.com/.../air like possibilities come out of it.

December 8, 2008 2:21 PM
 

#.think.in said:

#.think.in infoDose #11 (8th Dec - 12th Dec)

December 14, 2008 5:14 PM
 

ctodx said:

Scott Guthrie's big keynote of MIX09 has just ended and we're left with the aftershocks of some

March 18, 2009 6:05 PM

Leave a Comment

(required)  
(optional)
(required)  
Verification code: Required
   
Add
Copyright © 1998-2010 Developer Express Inc.
ALL RIGHTS RESERVED