|
||||
Scenarios More Suitable to Either WPF or SilverlightWPF is designed to provide Windows desktop applications with access to rich user interface features such as animation, 3D graphics, audio and video, as well as direct access to graphics acceleration hardware in order to achieve much better graphics performance. Most WPF applications, since they run locally on the user's computer, do not involve the same security restrictions as web applications. WPF applications can, therefore, store their data on the user's computer with few, if any, restrictions on access to the file system. Also, since the application does not have to be downloaded from some remote location, there is little reason for the applicable Microsoft .NET® Framework not to include the full panoply of features which have been created.Silverlight, on the other hand, is designed to provide a much broader reach than WPF by supporting multiple platforms—that now include not only Windows, but also Mac and, via an arrangement with Novel, Linux as well (Moonlight—currently matching Silverlight 1.0 although a Silverlight 2 equivalent is under development). However, to achieve this broader scope, Silverlight must be capable of running in a number of different web browsers on these different platforms. This requirement imposes some structural limitations on Silverlight. For example, it is not possible to make certain assumptions regarding the availability of hardware and the APIs which can be used to access that hardware (e.g. Direct X® and the Windows Display Driver Model, neither of which are present on Mac or Linux). Next, on the assumption that a very small size is critical to being a successful browser plug-in, Microsoft was required to omit many things which were present in the full .NET Framework, that otherwise would have been considered desirable if download file size were not such an important consideration. While it is probably true that as download speeds continue to increase, this restriction will be relaxed a bit over time, for the moment, as well as for the near to medium term future, this factor will continue to impede the ability of Silverlight to offer all of the features present in WPF. Deciding which technology is more suitable to a given project is a subject unto itself. But at a high level, if access to graphics acceleration or those extra features only present in WPF is important, or if performance is paramount, WPF is the preferable platform. On the other hand, if you can live without the extra performance and features found in WPF and prefer additional reach to the Mac and Linux platforms, Silverlight should be your choice. Scenarios Possibly Suitable to Both WPF and SilverlightAn application originally developed in WPF for use on Windows clients may at some stage become a candidate for extension to the Mac and/or Linux platforms. For example, when WPF was introduced (and long before Silverlight 2 existed), I built an XBAP application (XAML Browser Application), loosely based on a webcast by Filipe Fortes. This XBAP application included photos from and a description of a visit which I had made to Senegal in 2006. Unfortunately, however, my friend who accompanied me on that trip was never able to see this application because it simply wasn't practical for him to install the full .NET Framework on an Internet cafe computer in Zambia. By converting this application to Silverlight, I could easily make this content available to my friend—and frankly to many others who for varying reasons are unable or unwilling to install a copy of the full .NET Framework.One interesting example of a case where an application was initially created for Silverlight but later converted to WPF is referred to in a Mike Tucker blog article. Tucker was looking for a profiler to assist him in tuning the performance of his Silverlight application. Not finding such a tool for Silverlight, he decided to create a WPF equivalent in order to use the profiling tools available for that technology. Caliburn, an application framework designed to assist developers to implement various patterns such as MVC, MVP, Presentation Model (MVVM), Commands and Application Controller, is an example of an application simultaneously developed for both WPF and Silverlight. Similarly, developers of custom controls would almost certainly want to build versions of their controls for use with both technologies.
|
||||
|
||||
|
|