MICROSOFT SILVERLIGHT

(Redirected from Silverlight)

'Microsoft Silverlight' (code-named 'Windows Presentation Foundation/Everywhere' or 'WPF/E') is a proprietary runtime for browser-based Rich Internet Applications, providing a subset of the animation, vector graphics, and video playback capabilities of Windows Presentation Foundation.
Silverlight aims to compete with Adobe Flash and the presentation components of Ajax. It also competes with Sun Microsystems' JavaFX, which was launched a few days after Silverlight.[1][2]
Version 1.1 will include a complete version of the .NET Common Language Runtime, named ''CoreCLR'',[3][4] so that Silverlight applications can be written in any .NET language.

Contents
Overview
Compatibility
Versions
Silverlight 1.0
Silverlight 1.1
Development tools
Licensing
Criticism
See also
External links
References

Overview


Silverlight provides a retained mode graphics system, similar to WPF and integrates multimedia, graphics, animations and interactivity into a single runtime. It is being designed to work in concert with XAML and is scriptable with JavaScript. XAML can be used for marking up the vector graphics and animations.
Silverlight supports playback of WMV and some VC-1 profiles-based video content and WMA and MP3 audio content [5] across all supported browsers without requiring Windows Media Player, the Windows Media Player ActiveX control or Windows Media browser plugins. However, the EULA says VC-1 is only licensed for the "personal and non-commercial use of a consumer".[6]
Content created with Silverlight would be more searchable and indexable than that created with Flash as it is not compiled, but represented as text (XAML).[7]
Silverlight makes it possible to dynamically load XML content that can be manipulated through a DOM interface, a technique that is consistent with conventional Ajax techniques. Silverlight exposes a ''Downloader'' object which can be used to download content, like scripts, media assets or other data, as is required by the application.[8] With version 1.1, the programming logic can be written in any .NET language. It also supports common dynamic programming languages like Ruby and Python.[9]

Compatibility


OS/BrowserIE 6 SP2IE 7Firefox 1.5Firefox 2.0SafariOpera
Windows VistaN/A1.0, 1.11.0, 1.11.0, 1.1N/APlanned
Windows Server 20031.0, 1.11.0, 1.11.0, 1.11.0, 1.1N/APlanned
Windows XP1.0, 1.11.0, 1.11.0, 1.11.0, 1.1N/APlanned
Windows 2000Planned 1.1N/APlanned 1.1Planned 1.1N/APlanned
Mac OS 10.4.8+ PPCN/AN/A1.01.01.0Planned
Mac OS 10.4.8+ IntelN/AN/A1.0, 1.11.0, 1.11.0, 1.1Planned
LinuxN/AN/AMoonlightMoonlightMoonlightPlanned

Notes:

Opera will be supported with future builds[10]

★ On Linux, the FireFox, Konqueror, and Opera browsers will be supported.[11]

★ Support for the major Linux distributions through the 100% Silverlight compatible implementation Moonlight has been announced. [12][13]

★ Mobile device support is planned for the future, according to Scott Guthrie.[14]

★ Additional platforms are being considered as well.[15]

Versions


Version NameVersion NumberRelease Date
1.0 CTP1.0.?December 2006
1.0 RTW1.0.208162007-09-05
1.1 Alpha Sept Preview1.1.?2007-09-05

Silverlight 1.0

A Silverlight 1.0 application hosted in Internet Explorer

Silverlight 1.0 consists of the core presentation framework, which is responsible for UI, interactivity and user input, basic UI controls, graphics and animation, media playback, DRM support, and DOM integration.[16] It is made up of the following components:

★ Input - handling input from devices like keyboard, mouse, stylus etc.

★ UI core - managing rendering of bitmap images (including compressed raster images like JPEG), vector graphics, text and animations.

★ Media - playback of MP3, Windows Media and VC-1 streams.

XAML - to allow the UI layout to be created using XAML markup language.
A Silverlight application starts by invoking the Silverlight control from the HTML page, which then loads up a XAML file. The XAML file contains a ''Canvas'' object, which acts as placeholder for other elements. Silverlight provides various geometrical primitives like lines, ellipses and other shapes, to elements like text, images, and media etc. The elements are properly positioned to achieve the desired layout. Any arbitrary shape can be created as well. These elements can be animated using ''Event triggers''; some animation effects are predefined, others can be created as composite of the pre-defined effects. Events like keyboard or mouse movements can also raise ''Events'' which can be handled by custom scripts.[17]
Programmatic manipulation of the UI is achieved by using scripting languages to modify the Document Object Model of the Silverlight Canvas object. To facilitate this, Silverlight exposes a DOM API, accessible from any scripting language supported by Silverlight, which in version 1.0 release is limited only to JavaScript running in the browser. However, there are no UI widgets built in. The native widgets of the browser must be overlayed on top of the Silverlight ''Canvas'' for user input. Support for data formats is limited to XML, POX and JSON only.
Silverlight 1.1

A Silverlight 1.1 application hosted in Internet Explorer

Silverlight 1.1 includes a version of the .NET Framework, with the full Common Language Runtime as .NET Framework 3.0; so it can execute any .NET language including VB.NET and C# code. Unlike the CLR included with .NET Framework, multiple instances of the CoreCLR included in Silverlight can be hosted in one process.[18] With this, the XAML layout markup file (''.xaml file'') can be augmented by code-behind code, written in any .NET language, which contains the programming logic. It can be used to programmatically manipulate both the Silverlight application and the HTML page which hosts the Silverlight control. Silverlight ships with a lightweight class library which features, among others, extensible controls, XML Web Services, networking components and LINQ APIs. This class library is a subset of and is considerably smaller than .NET Framework's Base Class Library. Silverlight code runs in a sandbox which prevents invoking platform APIs.[19] Silverlight 1.1 also adds support for DRM in media files.
The version of .NET Framework in Silverlight adds a subset of WPF UI programming model, including support for shapes, documents, media and animation objects of WPF. However, the set of UI controls Silverlight ships with in the current release is limited. Also, in the current release, the UI controls do not have support for databinding to any data source. But, Microsoft has clarified that the limitations are due to this being an early preview release. Future releases will add more UI controls, add databinding support, and automated layout management.[20] However, third party libraries for expanded sets of UI controls are being made available for the current alpha release as well.[21]
Silverlight 1.1 Architecture

The included Base Class Library (BCL) provides classes for collections, reflection, regular expressions, string handling and data access. It also supports LINQ, with the full support for LINQ to Objects and expression trees. Almost all of the ''System.LINQ'' and ''System.LINQ.Expression'' namespaces are exposed. However, LINQ to XML is not present in the Silverlight 1.1 Alpha release, though further releases of Silverlight 1.1 will include it.[22] It also supports serialization of objects, for data persistence. Silverlight can handle data in either RSS, POX, and JSON formats, in addition to XML. The BCL provides enhanced support for working with XML data, including the ''XMLReader'' and ''XMLWriter'' classes. Silverlight also includes classes for data access over XML-based Web services (POX), REST and WCF Services. The networking support in Silverlight can be used by Silverlight applications to communicate over HTTP. However, in the current release of Silverlight 1.1, cross domain communication is not allowed.[23] Silverlight also supports asynchronous programming via the use of the threading libraries.
Silverlight 1.1 is distributed with the Dynamic Language Runtime which allows dynamic compilation and execution of dynamic (scripting) languages. The first available languages written for the DLR are Managed JScript and IronPython 2.0. Microsoft is also building IronRuby and Dynamic Visual Basic (VBx) languages. All four languages share the same infrastructure to allow Silverlight to compile and execute the language source. Conversely, other .NET languages must be compiled ahead of time and delivered to Silverlight as .NET assemblies. The implementation of Managed JScript conforms to the ECMAScript 3.0 specification, and Microsoft claims that it is 250 times faster than interpreted JScript.
With the integration of .NET Framework, Silverlight also allows HTML-managed code interaction, which allows manipulation of HTML DOM elements from managed code, as well as allow JavaScript code to call managed code and use objects instantiated by managed code. Silverlight encloses JavaScript objects and DOM elements in managed wrappers to make them available from managed code.[24] However, in the 1.1 alpha release directly calling JavaScript code is not implemented, but managed code events can fire JavaScript handlers. A Silverlight instance does not need to have a UI component in order to manipulate the HTML DOM from managed code.[25] It is done by creating a XAML ''Canvas'' with its width and height set to zero, and using its code-behind code to modify the Document Object Model of the HTML page via the APIs in the ''System.Browser'' namespace.[26]
A Python interpreter in Silverlight 1.1 hosted in Mozilla Firefox

Silverlight 1.1 also allows limited filesystem access to Silverlight applications. It can use the operating system's native ''Open'' file dialog box to browse to any file (which the user has access to). The file will be sanitized of path information to prevent the application from getting access to information like user name. It will be opened in ''read-only'' mode. For local storage of data, Silverlight provides ''isolated local storage'' (isostorage), which is stored, outside the browser cache, in a hidden folder inside the user profile's private folder. In the current releases, isostorage is limited to 1 MB per URL, though this limit will later be made configurable. Data stored by a Silverlight application, identified by the URL that it loads from, can be accessed by that application only. All instances of Silverlight share the same isostorage, so all instances of a Silverlight application can share the saved data, even if they are running on different browsers.
Silverlight CoreCLR uses an attribute based security model, as opposed to the ''Code Access Security'' (CAS) model of the desktop version of .NET Framework.[27] All assemblies are marked with a security attribute, which can be either ''transparent'' (''SecurityTransparentAttribute''), ''safecritical'' (''SecuritySafeCriticalAttribute'') or ''critical'' (''SecurityCriticalAttribute''). Methods in ''transparent'' assemblies runs with partial trust, and any code in such assemblies cannot call ''critical'' methods. They also cannot contain unverifiable code (use the ''unsafe'' C# keyword or use pointers) or invoke system functions by means of P/Invoke. Code in both ''critical'' and ''safecritical'' assemblies run with full trust, and are not subject to such limitations. However, ''critical'' methods can only be called from ''safecritical'' methods and not ''transparent'' methods. Thus ''transparent'' methods are prevented from using methods that can cause system wide changes. Instead, they have to call ''safecritical'' methods which will verify that the call is safe and within the limited rights of the caller, and then proxy it to the ''critical'' methods. In fact, the IsoStorage APIs are exposed as ''safecritical'' methods. An assembly that does not have any attribute set is run as a ''transparent'' method. The limitations also apply for type inheritance, virtual method calls and interface method calls as well.[28] Silverlight assemblies can contain members that are not usable by CoreCLR but can be by .NET Framework CLR; such methods will not be loaded when the assembly is being executed by CoreCLR.[29]
However, only platform code is allowed to be marked as ''Critical'' or ''SafeCritical''. The Silverlight runtime ensures that platform assemblies are loaded only from the Silverlight installation directory, and are signed by Microsoft. This effectively means that all user application assemblies can only be ''transparent'' code and run under partial trust and limited rights.[30] Platform code can be marked with either attribute. The BCL methods of the .NET Framework, which have the ''Internet'' attribute set allowing them to be called from untrusted code originating from Internet, are exposed in Silverlight BCL as ''transparent'' methods.

Development tools


Silverlight applications can be written in any .NET programming language. As such, any development tools which can be used with .NET languages can work with Silverlight, provided they can target the Silverlight CoreCLR for hosting the application, instead of the .NET Framework CLR. Microsoft has positioned Expression Blend 2.0 for designing the UI of Silverlight applications. Visual Studio 2008 can be used to develop and debug Silverlight applications. However, the current beta release of Visual Studio 2008 requires the ''Visual Studio Tools for Silverlight'' (currently an alpha release) to create Silverlight projects, and let the compiler target CoreCLR.[31] A Silverlight project contains the ''Silverlight.js'' and ''CreateSilverlight.js'' files which initializes the Silverlight plugin for use in HTML pages, a XAML file for the UI, and code-behind files for the application code. Silverlight applications are debugged in a manner similar to ASP.NET applications. Visual Studio's ''CLR Remote Cross Platform Debugging'' feature can be used to debug Silverlight applications running on a different platform as well.[32]

Licensing


An unattributed report claimed[33] that Microsoft aims to release certain parts of Silverlight source code as open source software, but Sam Ramji, director of platform technology strategy at Microsoft, said the company has no plans to do so.[34] However, portions of the Dynamic Language Runtime, included with Silverlight, have been made available on Microsoft's CodePlex website using the Microsoft Permissive License.

Criticism


Silverlight has received criticism for ignoring existing international standards. According to Ryan Paul of Ars Technica, Microsoft could have chosen SVG to implement the vector graphics subset instead of a "limited and incompatible facsimile", to show their commitment to open standards and also fix the standards problems that plague Internet Explorer. He thinks this is consistent with Microsoft's ignoring of open standards in other products as well.[35]
However, according to David Betz, a standards advocate, Microsoft would have needed to alter the SVG specification to add .NET integration and UI constructs on top of SVG. Consequently, the "choice by Microsoft to use XAML over SVG, served to retain the SVG standard by not adding proprietary technology." He further says,
"Silverlight can be viewed as a web extension of the Windows Presentation Foundation (WPF), a .NET 3.0 technology and not simply as a new web technology. As such, it makes sense that Silverlight uses XAML, not SVG. If Silverlight were based on SVG, then there would be a chasm between Silverlight and the .NET Framework, but as it stands Silverlight's use of XAML makes it part of the .NET family. In fact, it’s important to note that elements in XAML usually represent objects in the .NET Framework; this would simply not be possible in SVG."[36]

See also



Microsoft Silverlight Streaming by Windows Live

Adobe Flex

JavaFX Script

Moonlight - Silverlight compatible implementation for Linux

External links



Silverlight official website

Silverlight community site

MSDN Silverlight Developer Center

Silverlight samples gallery

Official Silverlight discussion forums

Lap Around Silverlight: Presentation by Scott Guthrie

BCL classes in Silverlight 1.1

Silverlight development guidelines

References


1. Sun's JavaFX may pose challenge to "Silverlight" Shubha Krishnappa
2. Does JavaFX Spell The End Of AJAX? Andy Patrizio
3. Code Sample: Is Your Process Using the Silverlight CLR?
4. Rounding up DLR questions
5. Silverlight FAQs
6. Microsoft Silverlight 1.0 beta license
7. What is Silverlight, really? Rafe Needleman
8. Using a Downloader Object
9. Mono developers to bring Silverlight to Linux
10. Opera Watch: More details on Silverlight support in Opera
11. Microsoft/Novell Collaboration on Silverlight.
12. Silverlight 1.0 Released and Silverlight for Linux Announced
13. Microsoft/Novell Collaboration on Silverlight.
14.
15. MSDN Forums Silverlight General Discussion: Linux support Joe Stegman
16. Silverlight architecture
17. Silverlight 1.0 Beta QuickStart
18. Side by Side In Process CLRs Start with Silverlight
19. Microsoft polishes the Silverlight
20. Silverlight
21. Some Great Silverlight Controls Tim Sneath
22. Linq Support in Silverlight 1.1 Alpha Kim Hamilton
23. Silverlight v1.0 Beta vs. Silverlight 1.1 Alpha - Huh?? Kevin Hoffman
24. MIX07: Extending the Browser Programming Model with Silverlight
25. Silverlight isn't just about presentation
26. Programming HTML with C# Tim Sneath
27. The Silverlight Security Model Shaun Farkas
28. Silverlight Security III: Inheritance Shaun Farkas
29. How to: Explore Silverlight Assemblies with the Visual Studio Object Browser
30. Silverlight Security II: What makes a method critical Shaun Farkas
31. How to: Create a Silverlight Project
32. MIX07 Your Product is a feature of the Web! Nigel Parker
33. Microsoft Goes Open Source? Elizabeth Montalbano
34. Silverlight glow dimmed by cross-platform concerns Gavin Clarke
35. Microsoft's Flash-killer Silverlight steals the show at MIX07 Ryan Paul
36. Silverlight's Adoption as Public De-Facto Standard David Betz


This article provided by Wikipedia. To edit the contents of this article, click here for original source.

psst.. try this: add to faves