views:

466

answers:

2

So here I am, first time windows developer (done java swing, iphone, flash/flex) and I'm confused by what technology Microsoft wants me to use for in browser rich applications. The application I'm designing is a file uploader that supports drag and drop from the filesystem, seems easy, I already implemented this already in Java and I figured it'd be even easier using Microsoft's tools but which deployment platform to use...

Silverlight: Great for video, lightweight applications, tons of controls and widgets, runs in browser, its just like Flash, awesome. No drag-and-drop filesystem access, boo.

ClickOnce: You can deploy a full-fledged windows application with all the bells and whistles, however it won't run inside the browser even for a web-only deployment, it opens in a new window, boo.

In browser DLLs: These work exactly like the old ActiveX applications which is great, except the only way a user can run them is by adding the site as a trusted site via the security panel and modifying their .Net security using caspol which isn't an acceptable deployment strategy. You should be able to just prompt the user to trust, just like a Java app.

ActiveX: Does almost everything a full-fledged windows application can, including full filesystem access, runs inside a browser, awesome. For some reason this is a deprecated technology nobody talks about or uses anymore, seems like you can only generate ActiveX cab/ocx files from really old VS versions (2003) or VB6.

So is what I want just unattainable? Can I not have full filesystem access with drag and drop, in an app that is run inside the browser without having the user jump through hoops to run it? I'm trying to find a good reason for the problems I'm running into to explain to my coworkers.

+7  A: 

Sounds like you want a WPF Browser Application (XBAPs). These apps run within the browser, but have full support for the .NET Framework and WPF (and potentially even full trust, if granted by the user). The only thing to really detract from that is that they only run on Windows (clearly) and only within IE7/FireFox (with a plugin).

Side note: Silverlight 3 applications can in fact be run from the desktop, without the need for a browser window.

Noldorin
Interesting, I guess the reason I didn't look into this before is our application needs to be compatible with .Net 2.0 but if I can't clear this trust/installation issue then maybe I can change the spec to .Net 3.0. So with a XBAP the trust request is similar to a Java trust request, it just prompts the user? I'll look into this.
Shizam
@Shizam: Yes, I believe trust works that way. By default, XBAPs run in "partial trust" mode however (if I remember correctly). Definitely something worth checking into. When .NET 4.0 is nearing release, I think you agree you shouldn't still be uinsg .NET 2.0. ;)
Noldorin
Reading the doco on XBAP it keeps saying 'launched from IE', this is sounding like the ClickOnce deployment strategy, does a XBAP run within the browser or is it 'launched' and opens in a new window? Digging more.
Shizam
XBAP can do both, depending on how you configure your application. The default behavior is to run within browser. To see how it looks, go here: http://xceed.com/Grid_WPF_Demo.html - it is an XBAP application.
Pavel Minaev
@Noldorin. re: Shouldn't still be using .NET 2.0, hah, if Vista had a higher saturation at this point I'd agree but since so many people are still on XP sp2 one can only assume that a good chunk of the user base out there max out at .NET 2.0 :) I tried to find data that showed .Net version saturation but couldn't find anything, if only Google Analytics gave that data...
Shizam
@Shizam: You're absolutely right... I've just never had the issue of needing to distribute to the mass market though, so installing .NET 3.0/3.5 has always been an option. Too bad MS don't include .NET version updates in Windows Update. :P
Noldorin
Well I must say XBAPs are looking like the solution (provided .Net 2.0 compatibility isn't an issue) so I'll wrap this question up. Still wish there were a good 2.0 solution.
Shizam
Note that "many people still on XP" doesn't have any correspondence with .NET 2.0 - since XP (and all its SPs) doesn't come with _any_ version of .NET preinstalled. Win2003 came with .NET 1.1; Vista came with 3.0; Win7 comes with 3.5 SP1.
Pavel Minaev
Oops, you're right, I thought XP sp2 came with .NET 2.0 but it doesn't. Sheesh.
Shizam
Silverlight 3 out of browser won't give you fancy drag and drop, fyi; but +1 on this answer
Jeff Wilcox
+1  A: 

Why do you feel the need to limit yourself to Microsoft technologies? I'm a big Microsoft/.NET fan, but I also believe in using the right tool for the job. If Java works, then use it. If Flash works, then use it.

David Brown
I built our Java uploader and it works great 100% of the time for everybody but windows users, IE users especially. It turns out not every windows user has Java installed, so then they gotta install it which is a small pain but at least its detectable. The worse problem are users who have a recent version of java installed but for whatever reason its corrupt, which its turning out is a frequent issue. Uninstalling and reinstalling even the exact same version of java will fix the issue. Those problems and that java doesn't use the native file browser pushed us to .Net.
Shizam
Ah, ok. Well, since I'm a .NET programmer, I didn't know about those issues. But thanks for explaining your position. :)
David Brown
Minus one to Java. The updater component prompts entirely too often and even puts something in the system tray. Takes me back to '98 ;)
James Cadd