views:

1131

answers:

8

Given the list of new features announced in Silverlight 4, when is WPF still required?

+2  A: 

When you don't want to depend on a browser to do your work, when you need full and fast access to the file system without prior confirmation, when doing interop with unsafe bits of code. These are the few I can think of, but they might be other reasons as well, depending on what features Silverlight 4 will really have and how well will they really work.

luvieere
Did you look at the list of new Silverlight 4 features Scott Guthrie announced at the PDC keynote today? Silverlight 4 **will** include out-of-browser operation and file system access. Interop with unsafe code will still be a WPF exclusive, though.
Ray Burns
OOB File System Access will only be included for "Trusted" applications. The user will be given an additional alert during install that lets them know this application wants to be trusted.
Ben McCormack
+5  A: 

I've been using mostly XBAPs for browser deployments while waiting for a Silverlight version that includes WPF's full templating and data binding capabilities. Perhaps Silverlight 4 will do it.

Several things that Silverlight 4 definitely won't be able to do are:

  • Allow you to seamlessly integrate your WinForms and MFC user interface components with your application
  • Efficiently work with data file structures originally defined in C/C++ (with WPF you can simply copy the code across and easily replicate the original C++ code using unsafe and StructLayoutAttribute)
  • Include unmanaged C++ code in your application

I have not actually downloaded the Silverlight 4 beta yet, so this list is necessarily incomplete.

Ray Burns
+8  A: 

WPF still has a lot fuller 3D rendering capabilities.

Also even though they announced enhancements to the commanding and binding capabilities, that's no guarantee that it will have the full ability that WPF currently has or will have in the next version

Edit: After playing around with Silverlight 4 beta, it looks like pretty much all of the new features (webcam, file access, full screen keyboard, COM interop, etc) only work when the application is elevated trust, and elevated trust can only be enable when running out of browser. Some of this may change by RTW, but for now, WPF still looks like the only way to do these things inside of a browser window

Jacob Adams
While certainly true, I have never in my life used 3D rendering in anything, certainly not a LOB application.
Peter Wone
Webcam does not require elevated trust - simply a permission window similar to that asking for Clipboard access.
Daniel May
+2  A: 

The next version of Visual Studio will not be written in Silverlight ;) I can't wait to write an Audio utility in WPF---and Silverlight must be sand-boxed away from the incredible Windows Audio subsystem. However, I can see the day when WPF will be called Silverlight (or perhaps the other way around).

rasx
Yes - it is a shame about the lack of access to the Audio subsystem - however SL4 does have access to the audio input stream from microphone devices, so there is some movement in this area. However API access to the full audio subsystem would probably be problematic from a security point of view...
Gordon Mackie JoanMiro
Silverlight mic support lines it up with Flash spec's---cool!
rasx
A: 

If you want to do direct database access through ADO.NET that's not something you'll be able to do in Silverlight 4. Access to devices will still be limited although you will now have some printing support and webcam/microphone. I haven't heard anything about 64 bit support so if you want to offer a 64 bit version of your app you'll need WPF. I also think even if Silverlight 4 makes better use of the GPU, it still won't be to the level that WPF utilizes it.

There are also a ton of other assemblies in the .NET framework that Silverlight doesn't include so if you need any of those you'll need to go WPF.

Just like HTML5 will reduce the need for a plugin like Flash or Silverlight in some cases, Silverlight will reduce the need for WPF but there are still plenty of cases where you'll need it.

Bill Reiss
+1  A: 

The applications we (in our company) write today use nothing that is not supported by Silverlight except for local TCP/IP connections without limitations.

This is the only reason we are using WPF. If we could use Silverlight instead (desktop mode) we'd be able to give our customers the choice of working on Mac (and linux) systems as well instead of being forced (by us?) to use a recent version of Windows (you'd be surprised how many companies still use old (partially) unsupported versions).

Even in WPF we try to limit access to the system, we create our own sandbox and try not to go outside of it. (Never require admin rights, never access stuff you don't have to)

So for what we do, Silverlight + real tcp/ip support would be more than enough... but there is absolutely still room for WPF and I'm pretty sure it's here to stay.

It all depends on what you're building.

TimothyP
+1  A: 

Silverlight will always favor small payloads over functionality. Strategically, Microsoft will attempt to out feature Adobe's offerings using Silverlight, while WPF will be competing against other heavy platforms. If you look at WPF 4 you'll notice a push towards heavier weight features. I try to keep in mind that WPF started out as Avalon which was intended to permanently displace Win32. I won't be surprised if one day Windows XX is "native" WPF and Win32 will be emulated.

Grant BlahaErath
A: 

WPF is still required if you need to do extensive Rich Text (FlowDocument) editing. Silverlight 4 has the new RichTextBox, but it is limited to very basic content, and doesn't provide the full set of features that are available in FlowDocuments in WPF. A FlowDocument can effectively do what the WinForms RichTextBox can do; but if you only need the basics, a RichTextBox in Silveright may do what you need.

TodK