Software Business Partners: .NET and C++ outsourcing company from Romania

The web gets closer to the desktop. Case study: WPF and Silverlight

Dec 21, 2010

Windows Presentation Foundation, known as WPF, is a Microsoft development platform for building (mostly) rich desktop applications. On the other hand, Silverlight is a framework (provided by Microsoft) that facilitates the development of rich internet applications, with complex multimedia features, such as streaming and animations.

If until now programmers were focused on the competition between Silverlight and Adobe Flash, now the point of interest has shifted to the battle between desktop vs. web applications, and in our article, between WPF vs. Silverlight. If some are hurrying to declare WPF as obsolete, claiming that cloud computing and web applications will dominate the market of the future, Microsoft is not ready to stop the development process for WPF and still has some cards hidden in its sleeve.

Shipped as part of the .NET Framework, the latest version of WPF (WPF 4) was released on April 2010, and brings important improvements in terms of graphics and controls. It's important to mention that, although WPF is used for developing Windows applications, it is also capable of running hosted web applications thanks to the XBAP (XAML Browser Application). A minus of WPF would be that it runs exclusively on Windows machines: Windows XP, Windows Server 2003, Windows Vista, and Windows Server 2008.

Released at the same time as WPF 4, Silverlight 4 is focused on building powerful business applications "on the web". More independent than WPF, Silverlight runs mainly in web browsers, such as: IE, Firefox and Safari, and is compatible with Windows, Mac and also Linux OS (via Moonlight). Although Silverlight is considered to be a "subset of WPF", Silverlight 4 proves to be more than that, extending its capabilities beyond the browser into the desktop. Features such as "Offline DRM" (adds the possibility for Silverlight DRM to work offline), "UI control" (which allows to control parts of UI: "start position, size and chrome") and "run desktop programs" (such as Office) make Silverlight to appear that it's offering the best out of the two worlds.

If until now we've seen the surface differences between WPF and Silverlight, now it's time to go in more depth and see the architectural discrepancies.

One of the most important differences is that Silverlight is a downloadable plug-in (running within a browser) and has access only to a subset of the full .NET Framework (called CoreCLR), while WPF has access to the main .Net Framework and its entire associated tools. As a result, this triggers numerous discrepancies between the two:
* WPF apps run mainly on a Windows client platform (make an exception the browser-hosted applications), while Silverlight runs mostly in web browsers (Silverlight 3 brought about the OOB extension which allows developers to write out-of-browsers apps)
* WPF apps have the possibility to access local file resources, while Silverlight has limited access
* WPF supports all the fonts found in the Windows OS, but Silverlight natively supports only a few fonts (Note: Silverlight contains a default font, used when no other font is selected, called "Portable User Interface.")
* WPF supports the creation of custom routed events (via the EventManager helper class). Silverlight doesn't support custom routed events.
* WPF supports all types of routed events: direct, bubbling and tunneling, but Silverlight only supports direct and bubbling events.
* Regarding data-binding (the mechanism of associating data to controls), WPF supports four binding modes (One-Way, Two-Way, One-Time, One-Way To Source) and Silverlight only three - minus the One-Way To Source mode.
* Regarding networking: Silverlight can only make asynchronous network requests (a synchronous call may block the main UI thread). On the other hand, WPF has no restrictions, and has full access to the networking features in .NET Framework.
* Although, WPF and Silverlight share a large part of XAML language, the former benefits from some extra XAML elements, such as "Styles".
* Concerning the printing functionality, although previous versions of Silverlight didn't support this, Silverlight 4 brings in the possibility to print documents, reports, charts, and also allows a "virtual print view".
* WPF supports an extensive range of 3D features: animation, cameras, materials, lights, models, transformations etc.. Silverlight 3 brought improvements in terms of  3D graphic and animation support such as: "Pixel Shader effects", "New Bitmap API", and spring and bounce animation effects.
 
Although there are a lot of core differences between WPF and Silverlight, Microsoft tries to bring the two technology closer, with each new version it releases. In order to ease the code reusing process, Silverlight and WPF share a number of elements, such as: Data Binding, Animation, Dependency Properties and Custom Controls. Also, both technologies support vector-based drawing elements, resource
dictionaries (Silverlight supports only static resources, while WPF supports both static and dynamic resources).

Note: Dynamic resources are a type of resource that is evaluated each time it is accessed.

So, in terms of desktop vs. web applications, neither WPF nor Silverlight has a clear victory, because both Microsoft technologies offer plenty of advantages, which can be regarded as disadvantages when you are not using the right tool for your application. However, one thing is certain: both WPF and Silverlight offer the Microsoft proven experience and support, which can be a great asset for a software development company.


Also read:

An alternative called Silverlight



Recent articles

Security in software outsourcing
May 07, 2015
One of the first things that comes to mind when thinking about outsourcing a software project is related to data security... read more
Attractive software outsourcing destinations in Eastern Europe
Mar 19, 2014
The Asian region was regarded, for many years, as the only suitable destination for software outsourcing (customers were attracted by affordable hourly rates and smaller development time frames). However in the last decade a new destination has emerged: Eastern Europe. Countries such as: Latvia, Hungary, Czech Republic, Romania, Poland, Ukraine etc. made a name for themselves on the outsourcing market by providing a complete set of services - consulting, development, support, maintenance.... read more
Romania - an attractive software outsourcing destination in Eastern Europe
Feb 25, 2014
Today's outsourcing market provides a wide range of outsourcing destinations and a high number of software development companies, so choosing an outsourcing company for your business can be a challenging and complicated process.... read more
Outsourcing: how to keep up with the competition
Jan 08, 2014
If at first, the economic climate forced more companies to outsource their IT departments towards outsourcing software companies, now outsourcing has become a viable solution for having access to a multitude of skills and expertise. ... read more
Software development: let's make it custom
Sep 09, 2013
We all want to have our requirements met immediately, but as a company it's even more important to receive personalized services, that are adapted to your day-to-day activities.... read more
...but what does software consulting mean?
Aug 15, 2013
What is software consulting? Software consulting is a service that helps other companies or self-employed individuals to meet their needs in terms of software infrastructure, development & support... read more
Products  |  Press  |  Site Map  |  Technologies  |  Terms of Use  |  Privacy Policy
© 2017 SBP Romania. All rights reserved.