Silverlight and Windows Presentation Foundation (WPF) are 2 different products from Microsoft,
but has lot of overlap. Silverlight is a sub set of WPF in terms of features and functionality.
Silverlight is a Microsoft technology, competing with Adobes Flash and is meant for developing rich
browser based internet applications.
WPF is a Microsoft technology meant for developing enhanced graphics applications for desktop platform.
In addition, WPF applications can be hosted on web browsers which offers rich graphics features for web applications. Web Browser Appliactions (WBA) developed on WPF technology uses XAML to host user interface
for browser applications. XAML stands for eXtended Application Markup Language which is a new declarative programming model from Microsoft. XAML files are hosted as descrete files in the Web server, but are
downloaded to the browsers and converted to user interface by the .NET runtime in the client browsers.
WPF runs on .NET runtime and developers can take advantage of the rich .NET Framework and WPF libraries to
build really cool windows applications. WPF supports 3-D graphics, complex animations, hardware acceleration
etc.
Basic difference between WPF & Silverlight is that WPF is for desktop applications & silverlight is for Web application.
Windows Presentation Foundation (WPF) and Silverlight
Microsoft has released Silverlight 1.0. There are lot example applications up. See for example this beta application showing a search UI made in Silverlight. Silverlight is often portrayed as Microsoft’s
Flash-killer. Flash is important as a tool for showing rich multi-media content, but in the future,
frameworks like this might be the new platform applications are based on.
Silverlight’s architecture is interesting. It includes parts of Windows Presentation Foundation (WPF),
but runs on more operating systems.
First some words on WPF… WPF is Microsoft’s new GUI framework that replaces all of the old “Windows Forms”
and Win32 API. It builds on a vector based and GPU-enabled drawing framework (DirectX), and adds the ability
to create richer UIs than Windows Forms does. The look and feel is also new. In my view, WPF is Microsoft
most important project the last years. Everybody is discussion Windows Vista, but WPF is probably more
important for application developers than Vista is. WPF also runs on Windows XP, so it is not tied to Vista.
Read this and this and this to get a better understanding of WPF. Also watch this video. Even if you never
plan to use WPF, knowing the technology and the concepts is useful.
WPF applications can be deployed to the desktop or run in Internet Explorer (on Windows only, as far as I know). When WPF application run in Internet Explorer they run in a sandbox, so users simply point Internet Explorer
at an URL and your application appears without any installation or confirmation need. All development tools
are the same (Visual Studio) when making desktop and browser-based WPF applications, and you can use the same widgets for both.
WPF running in Internet Explorer have some restrictions compared to a program running on the desktop. For
example, opening new windows is not possible and communication (WCF) is not allowed. Apparently SOAP calls
can be used instead.
Making a WPF application run in the browser is easy. You create a project in Visual Studio marking it as
a “WPF Browser Application”. After compilation, you publish the executable to a web server. I think one idea
in Visual Studio is to allow a desktop-based WPF application and the same browser-based application to be
produced from the same codebase. I have not tried this yet, but this looks like a promising concept.
Back to Silverlight… Like WPF-applications can run in a browser, so do Silverlight applications. But
Silverlight applications can be deployed to more platforms (OS X and Linux) and more browsers. This does however come with a cost… Like browsers-based WPF applications lose access to some functions compared to desktop applications, Silverlight applications can build on even less infrastructure. The GUI is one (of many) missing elements in Silverlight:
“ (…) it's important to note that a lot of the staple approaches you may be familiar with from building
Windows Presentation Foundation (WPF) applications will not work in Silverlight, which uses only a subset
of WPF's capabilities. Silverlight does not support most of the WPF component primitives, such as Buttons
and TextBoxes, and it supports only one layout type: the absolute positioning layout. As a result, porting an existing WPF application to Silverlight will force a total rewrite of all the UI-related code.” (From DevX)
Of course, people are building widget libraries for Silverlight, but wouldn’t it better if WPF was fully
included? There could be various reasons for not including it… One could be size, but does that really matters these days? Another reason could be that Microsoft simply does not want all other operating systems to be
able to run (the new wave of) Windows programs for free.
For application developers this sums up to using one of these platforms (not counting web interfaces) when
writing new software in Visual Studio:
WPF applications running on the desktop (Vista/XP) -- all OS features enabled.
WPF applications running sandboxed in Internet Explorer on Vista & XP -- missing WCF and some permissions,
e.g. opening new windows.
For the two solutions above, you use same tools and frameworks. Then, for the third one you enter another
world:
Silverlight running sandboxed on “major browsers” on Windows, Linux and OS X -- heavily reduced WPF (missing
some 3D functions, widgets gone, etc.) Depend on other 3rd party tools for this functionality.
If you develop a Rich Internet Application, it seems like choosing between WPF and Silverlight will be an important decision that will heavily shape your project.
follow this link