Silverlight enables development of the next generation of Microsoft .NET-based media experiences and rich interactive applications (RIAs) for the Web. Silverlight is delivered as a cross-platform and cross-browser plug-in that exposes a programming framework and features that are a subset of the .NET Framework and Windows Presentation Foundation (WPF).
Silverlight is there with us since the beginning of 2007 when Microsoft began demonstrating its power at developer conferences. In fact, no other development technology has been so highly anticipated since the arrival of the .NET Framework and Silverlight resources and examples abound on the Web. To spark developer interest in Silverlight, Microsoft launched several community Web sites dedicated to Silverlight development including the Silverlight home page (http://www.microsoft.com/silverlight) and the Silverlight.net community Web site (http://silverlight.net).
Some of the Implementations of Silverlight
In response to the overwhelming developer community anticipation for the arrival of Silverlight, many developers and companies have become early adopters of the technology.
Some example sites are listed below:
- World Series of Poker
- Discovery Channel
- The Emmys
- Home Shopping Network (HSN)
- World Wrestling Entertainment (WWE)
- Fox
- XBOX 360
- Netflix – uses Silverlight to allow subscribers to instantly watch movies on their PCs or Intel-based Macs.
Many of the published early adopter applications are featured in the Silverlight.net showcase.
The Silverlight Platform
In 2007, Microsoft introduced Silverlight. Silverlight is a free plug-in that encompasses a subset of functionality from the .NET Framework and WPF. In a manner similar to the JVM , Silverlight runs in the browser as a “sandbox” – a secure zone installed into the browser that accommodates Silverlight functionality while completely protecting the host platform from any possibly adverse actions performed by Silverlight.
Unlike ASP.NET, the bulk of Silverlight processing occurs on the client machine thus decreasing server resource utilization and improving the Web experience on the client. The figure below shows the difference between ASP.NET processing and Silverlight processing:
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.
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). As Silverlight applications are composed of text-based files that include markup and code, they can be created using any text editor; however, more advanced tools and development environments such as Visual Studio or Expression Blend simplify the task significantly.
To be more precise, the Silverlight platform as a whole consists of two major parts, plus an installer and update component, as described in the following table.
Component | Description |
---|---|
Core presentation framework | Components and services oriented toward the UI and user interaction, including user input, lightweight UI controls for use in Web applications, media playback, digital rights management, data binding, and presentation features, including vector graphics, text, animation, and images. Also includes the Extensible Application Markup Language (XAML) for specifying layout. |
.NET Framework for Silverlight | A subset of the .NET Framework that contains components and libraries, including data integration, extensible Windows controls, networking, base class libraries, garbage collection, and the common language runtime (CLR).
Some parts of the .NET Framework for Silverlight are deployed with your application. These “Silverlight Libraries” are assemblies not included in the Silverlight runtime and are instead shipped in the Silverlight SDK. When Silverlight Libraries are used in your application, they are packaged up with your application and downloaded to the browser. These include new UI controls, XLINQ, Syndication (RSS/Atom), XML serialization, and the dynamic language runtime (DLR). |
Installer and updater | An installation and update control that simplifies the process of installing the application for first-time users, and subsequently provides low-impact, automatic updates. |
Silverlight Technologies
Version 1.0 of Silverlight used JavaScript and supported the industry-leading Windows Media Services enabling delivery of audio and video that includes 2D and vector graphics.
Version 2 includes all features of version 1.0 and:
- support for the .NET Framework.
- support for .NET-compliant programming languages such as C#, Visual Basic, Python, and Ruby.
- support for database operations and language-integrated query (LINQ).
The figures below will explain components of the Silverlight architecture, along with related components and services.
The figure below illustrates the major differences between version 1.0 and version 2:
The diagram gives a broad picture of the technologies to be supported by Silverlight version 2.
The figure illustrates the architecture of Silverlight 3.0
As you can figure it out from both diagrams. Silverlight 3 comes with new features such as Deep Zoom, more WPF databinding and layout control supports and supports more meda codecs and as well as more Browsers too.
Browser compatibility has been improved in Silverlight 3.
Silverlight version 2 supports two programming models: the JavaScript API for Silverlight and the managed API for Silverlight. The managed API is based on a subset of the .NET Framework.
The Silvelight 4.0
The latest version of silverlight version 4.0 is under beta.
has the following features introduced as comparing to version 2.0 and 3.0.
- New Out-of-Browser Features
- Elevated Trust
- Support for Late Binding
- DRM for Offline Scenarios
- Right to Left Flow Direction
- RichTextArea Control
- WebBrowser and HtmlBrush Controls
- ViewBox Control
- Implicit Styles
- Applying Multiple Transforms is Simplified
- Networking with Multicast
- Printing
- Data Binding Improvements
- Navigation Extensibility
- Collection Sets
- Tuples
- Parsing and Formatting Time Intervals
- Drag-and-Drop and Clipboard Scenarios
- Right-click Mouse Events
- Webcam and Microphone Support
- ADO.NET Data Services
- WCF RIA Services
- Silverlight Designer Improvements
- Dynamic Language Runtime
more on silverlight 4.0 will be explained in detail later. let continue with out topic.
Core Presentation Components
The core presentation features of the Silverlight platform, shown in the previous section and illustration, are described in the following table.
Feature | Description |
---|---|
Input | Handles inputs from hardware devices such as the keyboard and mouse, drawing, or other input devices. |
UI rendering | Renders vector and bitmap graphics, animations, and text. |
Media | Features playback and management of various types of audio and video files, such as .WMP and .MP3 files. |
Deep Zoom | Enables you to zoom in on and pan around high resolution images. |
Controls | Supports extensible controls that are customizable through styling and templating. |
Layout | Enables dynamic positioning of UI elements. |
Data binding | Enables linking of data objects and UI elements. |
DRM | Enables digital rights management of media assets. |
XAML | Provides a parser for XAML markup. |
Developers can interact with this presentation framework by using XAML to specify presentation details. XAML is the primary point of interaction between the .NET Framework and the presentation layer. Developers can programmatically manipulate the presentation layer using managed code.
The .NET Framework for Silverlight
The following table describes a partial list of the .NET Framework for Silverlight features shown in the previous illustration.
Feature | Description |
---|---|
Data | Supports Language-Integrated Query (LINQ) and LINQ to XML features, which ease the process of integrating and working with data from disparate sources. Also supports the use of XML and serialization classes for handling data. |
Base class library | A set of .NET Framework libraries that provide essential programming functions, such as string handling, regular expressions, input and output, reflection, collections, and globalization. |
Window Communication Foundation (WCF) | Provides features to simplify access to remote services and data. This includes a browser object, HTTP request and response object, support for cross-domain HTTP requests, support for RSS/Atom syndication feeds, and support for JSON, POX, and SOAP services. |
CLR (common language runtime) | Provides memory management, garbage collection, type safety checking, and exception handling. |
WPF (Windows Presentation Foundation) controls | Provides a rich set of controls, including Button, Calendar, CheckBox, DataGrid, DatePicker, HyperlinkButton, ListBox, RadioButton, and ScrollViewer. |
DLR (dynamic language runtime) | Supports the dynamic compilation and execution of scripting languages such as JavaScript and IronPython to program Silverlight-based applications. Includes a pluggable model for adding support for other languages for use with Silverlight. |
The .NET Framework for Silverlight is a subset of the full .NET Framework. It provides the essentials of robust, object-oriented application development for application types (such as Internet applications) for which this support has not traditionally been available.
Developers can interact with the .NET Framework for Silverlight layer by writing managed code using C# and Visual Basic. .NET Framework developers can also access the presentation layer by authoring in Visual Studio 2008 or Microsoft Expression Blend.
Additional Silverlight Programming Features
Silverlight provides several additional features that help developers create rich and interactive applications, including those described in the following table.
Feature | Description |
---|---|
Isolated storage | Provides safe access from the Silverlight client to the local computer’s file system. Enables local storage and caching of data isolated to a particular user. |
Asynchronous programming | A background worker thread carries out programming tasks while the application is freed up for user interaction. |
File management | Provides a safe File Open dialog box, to ease the process of creating safe file uploads. |
HTML-managed code interaction | Enables .NET Framework programmers to directly manipulate UI elements in the HTML DOM of a Web page. Web developers can also use JavaScript to call directly into managed code and access scriptable objects, properties, events, and methods. |
Serialization | Provides support for serialization of CLR types to JSON and XML. |
Packaging | Provides the Application class and build tools to create .xap packages. The .xap package contains the application and entry point for the Silverlight plug-in control to run. |
XML libraries | XmlReader and XmlWriter classes simplify working with XML data from Web services. The XLinq feature enables developers to query XML data directly within .NET Framework programming languages. |
Related Technologies and Tools The following Microsoft applications include special features for Silverlight development:
- Microsoft Expression Blend. This tool can be used to create and modify the presentation layer of an application by manipulating the XAML canvas and controls, working with graphics, and programming the presentation layer with a dynamic language such as JavaScript.
- Visual Studio 2008/2010. Visual Studio provides productivity tools for developing applications using managed code. All the existing features of Visual Studio are available for Silverlight. In addition, this version of Visual Studio includes Silverlight-specific features, including IntelliSense, debugging, and Silverlight project templates that create and link all required files.
Because Silverlight-based applications are executed in a run-time environment on the client machine, no particular application is required to be installed on the server. However, developers may find that their ability to create rich applications that integrate services and data from multiple sources on the server is enhanced by integrating the following types of services and server-side applications into their Silverlight-based applications:
- ASP.NET AJAX. This includes a set of controls, services, and libraries for creating rich and interactive Web-based applications.
- Microsoft Windows Communication Foundation (WCF) services.
- Internet servers, including Microsoft Internet Information Services (IIS), and the Apache Web server.
- Internet-based applications and services, including Microsoft ASP.NET, PHP, Windows Streaming Media services, Windows Live services, and other open Web services.
Source/Referance Courtesy : This article is an abstract of MSDN Article on Silverlight architecture and WebCastor silverlight tutorial.
I post what’s best for the people who want to learn. It’s not my personal finding. But i refered and extracted these information from the above sources and grouped in together at appropriate areas. So the credit goes to sources only.
Good luck and happy learning…
Discover more from Cloud Distilled ~ Nithin Mohan
Subscribe to get the latest posts sent to your email.