I noticed a lot of people have misconceived notions of what Silverlight is and does. I will attempt to explain what Silverlight is and how it fits into the web spectrum. Many websites define Silverlight as:
“Microsoft Silverlight is a web application framework that provides functionalities similar to those in Adobe Flash, integrating multimedia, graphics, animations and interactivity into a single runtime environment”
Although the initial emphasis for Silverlight was on providing rich media experiences, enabling designers and developers to add rich degrees of interactivity, media and animation to their Web sites. Later versions extended the capabilities of the platform and added many new features essential for business application development. Silverlight has much more functionality than just showing Video or putting some cool visual effects. More and more real business applications are using Silverlight.
How Silverlight fits in Building Business Applications
A business application has a distinct purpose or goal, and generally helps a company to save money or time, or perhaps helps them to improve customer satisfaction. Common examples might include CRM applications, time-tracking and expense claim applications, e-commerce and e-tail experiences, purchase request applications, and HR employee management systems.
Users of business applications expect rich, functional, and well-performing interfaces such as those typically provided by the desktop applications they are used to. With the latest business application-focused enhancements to Silverlight, the rich capabilities of its user interface, and the associated tooling provided by Visual Studio and Expression Studio, you can now rapidly build this type of application and enjoy the benefits of Web delivery and deployment.
What is Silverlight
- Silverlight is a web browser plug-in.
- Plug-in is small in size and self-in self-contained.It can be installed on demand.
- Plug-in runs in all popular browsers, including Microsoft Internet Explorer, Mozilla Firefox, Apple Safari, Opera.
- Silverlight is a plug-in similar to Flash in a sense. It won't run and use any machine resources until you hit a Page that contains Silverlight application.
- Pug-in runs cross-browser , cross-platform that exposes a programming framework and features that are a subset of the .NET Framework and Windows Presentation Foundation (WPF)
- Silverlight is a powerful development platform for creating rich media applications and business applications for the Web, desktop, and mobile devices
Silverlight and Flash
- Silverlight is more of a presentation tool. If Flash is the content, Silverlight is the container and the mode of delivery.
- Silverlight goes beyond Flash, as it offers more features for delivering rich web content as a single package rather than a conglomeration of different content delivery methods.
- Silverlight tries to combine the creative delivery of Flash with the application development.
- Silverlight applications are delivered to a browser in a text-based markup language called XAML. XAML is a declarative markup language that you can use to define the UI elements for your Silverlight-based application. Search engines, like Google, can scan XAML but they can't dive into compiled Flash applications. So Silverlight applications are more findable.
- Silverlight and Flash do many of the same things but Flash do some things even better. See the detailed comparison here : http://www.smashingmagazine.com/2009/05/09/flash-vs-silverlight-what-suits-your-needs-best/
Where Silverlight Fits
Silverlight executes in the client browser. What does it means. It means:
- Silverlight applications need to be hosted on a web server
- Silverlight does NOT need to be hosted in IIS, any web server will do
- Silverlight does NOT need ASP.NET on the server
- Silverlight applications cannot access databases without an intermediary (like a web service, WCF service)
- Silverlight applications cannot access server-side classes or variables without an intermediary (like a web service, WCF service)
When a client initially attempts to run a Silverlight application, if the Silverlight plug-in has not been installed on the client machine, it will be downloaded and installed. Upon subsequent requests to run the application, the application will instantiate on the client machine and make requests for resources from the server ONLY when necessary.
The Silverlight plug-in can be thought of as a scaled-down version of the full .NET Framework. It only contains those classes and functionality that are applicable to a Silverlight Web client and those were streamlined and optimized for use on the Web client machine.
- The plugin contains a limited version of the .NET framework. What this means is that you can write real, compiled and managed code that executes in the context of the client browser itself.
- Silverlight also introduces what is known as the DLR, or Dynamic Language Runtime. This allows you to write code in non-traditional .NET languages such as IronPython or IronRuby
- Silverlight was designed using the same design paradigm as ASP.NET. Each page of a Silverlight application includes an associated code behind file that includes the code that handles events fired by the page.
- Silverlight resembles WPF in that it uses Extensible Application Markup Language (XAML) to construct the user interface (presentation layer).
- <object> tag launches the plug-in. Source parameter points to the Silverlight Application
- Browser requests XAP file, unzips it, runs .NET code. .XAP files come from any web server
- .XAP files contain .NET app code
- Integrates within the HTML page
- .NET app code is code with mark-up
- Controls which bind to data
- Connects with a range of services
- UI/Code separation facilitates design
Silverlight and WPF
The Silverlight is Microsoft's latest development platform for building next-generation Web client applications.
The Windows Presentation Foundation (WPF) is Microsoft's latest development platform for building next-generation Windows client applications.
Silverlight is generally considered to be a subset of WPF and is a XAML-based technology that runs within the sandbox of browser plug-in.
WPF is generally considered to be a subset of .NET Framework and is a XMAL based technology.
Silverlight will be used in development of Rich Internet Application (RIA) for web client users
WPF will be used in development of Rich Windows Graphical User Interface(GUI) for windows client users
Cross OS, cross browser, cross device
Silverlight is the add-on mechanism available for most of the browsers, in order to run Silverlight applications at client machines we need to install Silverlight software on client machine once.
WPF on the other hand does not support any plug-in mechanism instead we need to install completed WPF client application in order to use the WPF application at client place.
Silverlight has very small own rich base class library to make plug-in as small as possible. that is highly optimized for size and is a small subset of the full .NET Framework, to embed within it
WPF, on the other hand, has full access to the main .Net Framework and all its associated assemblies.
Silverlight applications are hosted within a web server and a web page. To minimize client download size, Silverlight uses an XAP archive. A XAP archive is a zip-compressed archive of the Silverlight application, plus a manifest file describing the content. Visual Studio automatically generates the XAP archive when using the Silverlight project template.
WPF applications can be deployed as a standalone application, ClickOnce application, or a XAML Browser application.
This is the first release of Silverlight technology in 2007.Originally this release was called WPF/E, which stands for Windows Presentation Foundation/ Everywhere. This release consists of the core presentation framework, which is responsible for UI, interactivity and user input, basic UI controls, graphics and animation, media playback and DOM integration.
The Major drawback of this release is not supporting managed code, which means you can't use .NET supported programming languages for manipulating GUI elements. This was managed by scripting programming languages like Java Script (Only interpretation no compilation), which is hard for non Java Script programmers.
Silverlight 2.0 released in March 2008. We can consider this is the first release of the Silverlight for start application development which supports managed code, living in the .NET world without managed code is very difficulty (actually not possible ).
Silverlight 2.0 supports .NET programming languages like C#, VB.NET to write business logic or manipulate UI Elements at client side. Silverlight 2.0 is based on .NET Framework 3.5.
You can have a code behind file for every XAML (.xaml) file like ASP.NET (.aspx) pages to handle the business logic. It can be used to programmatically manipulate both the Silverlight application and the HTML page which hosts the Silverlight control. The XAML markup as well as the code, is compiled into .NET assemblies which are then compressed using ZIP and stored in a .xap file.
Silverlight version 3.0 was release in July, 2009, which is an extension to Silverlight 2.0 and mainly provides improvements in graphics capabilities, media management, application development areas (additional controls, enhanced binding support, and out-of-browser functionality), and integration in the designers' Expression Blend 3 tools.
Silverlight version 4.0 was release in April, 2010. New features in Silverlight 4 include:
- Support for Google's Chrome browser.
- Printing support.
- Improved mouse support including right button support and mouse wheel support.
- Web cam and microphone support.
- Clipboard and drag and drop support.
- New hosted browser support for rendering HTML inside Silverlight.
- New and enhanced controls such as a RichTextBox and an enhanced DataGrid control.
- New notification support to display messages to end users.
- New support for implicit theming of controls.
- WCF data layer enhancements.
- Localization enhancements with bi-directional text.
- Support for Managed Extensibility Framework.
- Enhanced data binding support.
- Enhanced animation effects.
- Deep Zoom performance enhancements.
- WCF Rich Internet application (RIA) Services.
- Full keyboard access while running in full screen mode.
- Programmatic access to a user's local document folder.
- Silverlight Developer Poster
- Silverlight Programming Model