C# .NET - SilverLight - Asked By kunal mehta on 20-Aug-08 10:21 AM

What is SilverLight, its concept, why to use it and how to use it

SilverLight - Kalit Sikka replied to kunal mehta on 20-Aug-08 11:10 AM

What is Silverlight?

Silverlight is a new cross-browser, cross-platform implementation of the .NET Framework for building and delivering the next generation of media experiences and Rich Interactive Applications(RIA) for the web. It runs in all popular browsers, including Microsoft Internet Explorer, Mozilla Firefox, Apple Safari, Opera. The plugin required to run Silverlight is very small in size hence gets installed very quickly.

It is combination of different technolgoies into a single development platform that allows you to select tools and the programming language you want to use. Silverlight integrates seamlessly with your existing Javascript and ASP.NET AJAX code to complement functionality which you have already created.

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.

Currently there are 2 versions of Silverlight:

Silverlight 1.0 :

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.

Main features of Silverlight 1.0 :

  1. Built-in codec support for playing VC-1 and WMV video, and MP3 and WMA audio within a browser.
  2. Silverlight supports the ability to progressively download and play media content from any web-server.
  3. Silverlight also optionally supports built-in media streaming.
  4. Silverlight enables you to create rich UI and animations, and blend vector graphics with HTML to create compelling content experiences.
  5. Silverlight makes it easy to build rich video player interactive experiences.

Silverlight 1.1 :

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.[16] 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.

Main features of Silverlight 1.1 :

  1. A built-in CLR engine that delivers a super high performance execution environment for the browser. Silverlight uses the same core CLR engine that we ship with the full .NET Framework.
  2. Silverlight includes a rich framework library of built-in classes that you can use to develop browser-based applications.
  3. Silverlight includes support for a WPF UI programming model. The Silverlight 1.1 Alpha enables you to program your UI with managed code/event handlers, and supports the ability to define and use encapsulated UI controls.
  4. Silverlight provides a managed HTML DOM API that enables you to program the HTML of a browser using any .NET language.
  5. Silverlight doesn't require ASP.NET to be used on the backend web-server (meaning you could use Silverlight with with PHP on Linux if you wanted to).

How Silverlight would change the Web:

  1. Highest Quality Video Experience : prepare to see some of the best quality videos you have seen in your life, all embedded in highly graphical websites. The same research and technology that was used for VC-1, the codec that powers BluRay and HD DVD, is used by Microsoft today with its streaming media technologies.
  2. Cross-Platform, Cross-Browser : Finally build web applications that work on any browser, and on any operating system. At release, Silverlight will work with Mac as well as Windows!  The Mono project has also already promised support for Linux!.
  3. Developers and Graphic Designers can play together! : Developers familiar with Visual Studio, Microsoft.net will be able to develop amazing Silverlight applications very quickly, and they will work on Mac's and Windows. Developers will finally be able to strictly focus on the back end of the application core, while leaving the visuals to the Graphic Design team using the power of XAML.
  4. Cheaper : Silverlight is now the most inexpensive way to stream video files over the internet at the best quality possible. Licensing is dead simple, all you need is IIS in Windows Server, and you’re done.
  5. Support for 3rd Party Languages : Using the power of the new Dynamic Language Runtime, developers will now be able to use Ruby, Python, and EcmaScript! This means a Ruby developer can develop Silverlight applications, and leverage the .net Framework!
  6. Cross-Platform, Cross-Browser Remote Debugging : If you are in the need to debug an application running on a Mac, no problem! You can now set breakpoints, step into/over code, have immediate windows, and all that other good stuff that Visual Studio provides.
  7. The best development environment on the planet : Visual Studio is an award winning development platform! As it continues to constantly evolve, so will Silverlight!
  8. Silverlight offers copy protection : Have you noticed how easy it is to download YouTube videos to your computer, and save them for later viewing ? Silverlight will finally have the features enabling content providers complete control over their rich media content! Streaming television, new indie broadcast stations, all will now be possible!
  9. Extreme Speed :There is a dramatic improvement in speed for AJAX-enabled websites that begin to use Silverlight, leveraging the Microsoft .net framework.

Getting Started With SilverLight :

In order to create Silverlight applications with following :

Runtime :

Microsoft Silverlight 1.1 (currently alpha) : The runtime required to view Silverlight applications created with .NET Microsoft.

Developer Tools :

Microsoft Visual Studio codename "Orcas" (currently Beta 1) : The next generation development tool.

Microsoft Silverlight Tools Alpha for Visual Studio codename "Orcas" : The add-on to create Silverlight applications using .NET.

Designer Tools :

Download the Expression designer tools to start designing Silverlight application.

Expression Blend 2

Software Development Kit:

Microsoft Silverlight 1.1 Alpha Software Development Kit (SDK) : Download this SDK to create Silverlight Web experiences that target Silverlight 1.1 Alpha. The SDK contains documentation and samples.

Overview... - Atul Shinde replied to kunal mehta on 21-Aug-08 12:59 AM

Overview:

Silverlight Architecture Overview

.vb, .cs, .cpp, .nu { display:none; } .nu { display:inline; }
Silverlight Technical Articles
Silverlight Architecture Overview
 

Barak Cohen

Microsoft Corporation

April 2007

Applies to:
   Silverlight Community Technology Preview (CTP) Feb 2007

Note: The information in this article is out of date. For current information, see http://msdn2.microsoft.com/en-us/library/bb404713.aspx.

Summary: This white paper provides a high-level overview of the Silverlight (formerly known as code name "WPF/E") architecture and how it fits into the Microsoft offering for building next-generation Web applications. Also, this white paper provides an architectural review of the Silverlight technology. (6 printed pages)

Contents

Introduction
Silverlight as Part of a User-Experience Continuum
Silverlight Architecture
Deployment and Packaging
Scenarios for Using Silverlight
Conclusion

Introduction

Microsoft Silverlight is a cross-browser, cross-platform plug-in for delivering the next generation of .NET based media experiences and rich interactive applications (RIAs) for the Web. Silverlight offers a flexible and consistent programming model that supports AJAX, Python, Ruby, and .NET languages such as VB and C#, and integrates with existing Web applications. Silverlight media capabilities include fast, cost-effective delivery of high-quality audio and video to all major browsers including Firefox, Safari and Internet Explorer running on the Mac or on Windows. By using Expression Studio and Visual Studio, designers and developers can collaborate more effectively using the skills they have today to create Silverlight web experience.

Silverlight as Part of a User-Experience Continuum

Now, more than ever, customers are demanding applications and online experiences that not only meet their individual needs in terms of effectiveness and efficiency, but also address the perception of satisfaction the user has with a company's products or services. In most cases, the level of satisfaction will have a network and an emotional effect, shaping perceptions of the company as a whole, and, as an extension, the perceptions of those with whom the individual comes into touch. Microsoft acknowledges this connection and has a made a renewed commitment to user experience (UX) as a part of the end-to-end experience. UX is more than a pretty UI; it is the aggregation of the interaction point of a user with an application. Our mission is thus to enable a great user experience wherever the customer needs that: on the Web, on devices, in Office, and in Windows.

Two recent examples of Microsoft's own investment in UX are Microsoft Windows Vista and Microsoft Office 2007. By focusing on the end-user experience first, subtle and somewhat radical changes were made to both products in order to address productivity and satisfaction.

  • http://www.microsoft.com/windows introduces easier ways to visualize and organize your files, media, and communications. In every case of the UI, a focus on user-centric task accomplishment and experience was put first. Other examples of focusing on UX include the new task switcher (Alt+Tab) and Wi-Fi signal notification.
  • http://www.microsoft.com/office has introduced the new "Ribbon" concept to replace traditional toolbars. A natural extension, the ribbon reduces time to find any given feature in an Office application to about 10 seconds.

Both of these decisions were heavily influenced by design and designers, working collaboratively with the rest of the development team. To learn more, visit http://www.microsoft.com/design.

Figure1. Microsoft UX continuum

From a platform perspective, Microsoft introduces a consistent offering that uses common skills to address the different application-interaction surfaces, as indicated in Figure 1.

  • ASP.NET AJAX offers the benefits of standard Microsoft support (around-the-clock support for a period of 10 years) for AJAX-enabled applications built around Web standards. It allows standard Web applications to be more effective by improving the interaction parameters of the application (such as refresh, resource usage, and navigation).
  • For Web experiences that need 2-D animation, vector graphics, and high-fidelity audio and video on the Web, Silverlight is being introduced to extend the capability of the browser to render XAML in addition to HTML. By embracing Web architecture for development, including industry-standard AJAX (Asynchronous JavaScript+XML) and inline XML markup (XAML) for presentation, Microsoft is working to break rich elements on Web pages out of the "black box" that exists today. As an added benefit, content authored in Silverlight and ASP.NET AJAX becomes more discoverable while offering the benefits of being cross-platform (Windows and Macintosh) and cross-browser (Internet Explorer, Firefox, Safari).
  • ASP.NET AJAX and Silverlight are designed to be complementary technologies. In the broader sense, Silverlight can interact with any AJAX application, both client- and server-side. Examples for such integration include mapping applications, video playback with rich presentation, and more.
  • For connected applications on Windows, Microsoft provides the .NET Framework 3.0 programming layer (shipped in Windows Vista and available for Windows XP) that includes the Windows Presentation Foundation (WPF). By using WPF, one can create rich, immersive, connected applications and experiences that can take full advantage of the Windows platform, including UI, media, offline communication, and document support. WPF uses a superset of the same XAML that is used by Silverlight.

Figure 2. Microsoft end-to-end offering for UX

As Figure 2 shows, Silverlight is not an isolated island; it is a piece in a consistent end-to-end offering that enables taking application experiences to the next level. This offering includes server-side components, tools (http://www.microsoft.com/expression and http://www.microsoft.com/vstudio), and http://www.microsoft.com/design technologies.

Silverlight Architecture

Silverlight has few basic properties:

  • It integrates with various browsers on Windows and on the Macintosh.
  • It enables rendering of richer user experiences that are defined by XAML.
  • It render media (music and video).
  • It enables programming that is consistent with the Web programming model.
  • It is small.

Silverlight was designed to address these properties, as Figure 3 shows.

Figure 3. Silverlight architecture

  • Lightweight browser plug-in—Silverlight has Windows and Macintosh modules that are designed to enhance Internet Explorer (versions 6.0 and 7.0), Firefox 2.0, and Safari browsers. The December 2006 CTP for Windows is 1.1 MB in size.
  • Native presentation runtime— Software-based browser enhancement that allows rendering of XAML-based interactive 2-D graphics, text, and media, in addition to the browser native rendering of HTML. XAML can be used inline, in a file, or in a package.
  • Interactive video and audio—Cross-platform independent media runtime that can render Windows Media content (WMV and WMA) in addition to MP3 (will be available after the December 2006 CTP). Video and audio are handled as a media element in XAML, enabling flexibility in their presentation. Furthermore, the media support leverages the huge infrastructure and ecosystem around Windows Media, enabling cost-effective delivery of top-quality media.
  • Programming layer—In consistency with the Web architecture, Silverlight XAML is exposed using a DOM model to JavaScript. That way, AJAX programs can utilize the extended markup rendering capability using the same programming paradigms and practices (on the client and on the server). After the December 2006 CTP, we will also enable a managed code programming model using a subset of full CLR that will enhance the programmability side of the browsers to enable more performant and more scalable Web applications.

Deployment and Packaging

Content for a Web page that contains Silverlight elements can be created by using the following tactics:

  • Inline XAML and JavaScript.
  • External XAML files and JavaScript files.
  • Compressed content package (available after the December 2006 CTP) that contains XAML, managed code, images, fonts, and media. Streaming media sources can be referenced from the XAML media elements.

Figure 4. Silverlight packaging (after Feb 2007 CTP)

We believe that the flexibility of application packaging and the consistency of the application architecture with Web standards and operations will create many opportunities for improving the impact and effectiveness of Web applications, making applications more scalable, fault-tolerant, and dynamic (they can change their markup on the fly), and making content more discoverable.

Web pages that require Silverlight can detect if the Silverlight plug-in is installed, and can direct users to download it and install it (either through a redirect or through an object tag). The Silverlight SDK has documentation on that.

Scenarios for Using Silverlight

Silverlight is perfect for the following Web application scenarios that encompass many real-world scenarios:

  • Web media— Branded playback with events, video and marketing mix, dynamic videos with ads, audio playback, and so forth
  • Rich islands on a page (mini apps)— Casual games and gadgets
  • Web visualization elements— Navigation properties, data visualization, and ads

Silverlight is designed for Web page content that is connected to its host (it will not work offline), that deeply engages the user, and that can render on any browser.

Conclusion

This article provided a high-level overview of the Silverlight architecture and how it fits into the Microsoft offering for building next-generation Web applications. Silverlight is part of a larger revolution of the ways applications are designed, built, and delivered. With markup-based UI and flexible programming models, businesses will be able to offer better experiences on the right form factor for their customers.

Link: http://msdn.microsoft.com/en-us/library/bb428859.aspx

Silverlight Overview - Atul Shinde replied to kunal mehta on 22-Aug-08 01:24 AM

What is Silverlight?

Silverlight is a new cross-browser, cross-platform implementation of the .NET Framework for building and delivering the next generation of media experiences and Rich Interactive Applications(RIA) for the web. It runs in all popular browsers, including Microsoft Internet Explorer, Mozilla Firefox, Apple Safari, Opera. The plugin required to run Silverlight is very small in size hence gets installed very quickly.

It is combination of different technolgoies into a single development platform that allows you to select tools and the programming language you want to use. Silverlight integrates seamlessly with your existing Javascript and ASP.NET AJAX code to complement functionality which you have already created.

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.

Currently there are 2 versions of Silverlight:

Silverlight 1.0 :

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.

Main features of Silverlight 1.0 :

  1. Built-in codec support for playing VC-1 and WMV video, and MP3 and WMA audio within a browser.
  2. Silverlight supports the ability to progressively download and play media content from any web-server.
  3. Silverlight also optionally supports built-in media streaming.
  4. Silverlight enables you to create rich UI and animations, and blend vector graphics with HTML to create compelling content experiences.
  5. Silverlight makes it easy to build rich video player interactive experiences.

Silverlight 1.1 :

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.[16] 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.

Main features of Silverlight 1.1 :

  1. A built-in CLR engine that delivers a super high performance execution environment for the browser. Silverlight uses the same core CLR engine that we ship with the full .NET Framework.
  2. Silverlight includes a rich framework library of built-in classes that you can use to develop browser-based applications.
  3. Silverlight includes support for a WPF UI programming model. The Silverlight 1.1 Alpha enables you to program your UI with managed code/event handlers, and supports the ability to define and use encapsulated UI controls.
  4. Silverlight provides a managed HTML DOM API that enables you to program the HTML of a browser using any .NET language.
  5. Silverlight doesn't require ASP.NET to be used on the backend web-server (meaning you could use Silverlight with with PHP on Linux if you wanted to).

How Silverlight would change the Web:

  1. Highest Quality Video Experience : prepare to see some of the best quality videos you have seen in your life, all embedded in highly graphical websites. The same research and technology that was used for VC-1, the codec that powers BluRay and HD DVD, is used by Microsoft today with its streaming media technologies.
  2. Cross-Platform, Cross-Browser : Finally build web applications that work on any browser, and on any operating system. At release, Silverlight will work with Mac as well as Windows!  The Mono project has also already promised support for Linux!.
  3. Developers and Graphic Designers can play together! : Developers familiar with Visual Studio, Microsoft.net will be able to develop amazing Silverlight applications very quickly, and they will work on Mac's and Windows. Developers will finally be able to strictly focus on the back end of the application core, while leaving the visuals to the Graphic Design team using the power of XAML.
  4. Cheaper : Silverlight is now the most inexpensive way to stream video files over the internet at the best quality possible. Licensing is dead simple, all you need is IIS in Windows Server, and you’re done.
  5. Support for 3rd Party Languages : Using the power of the new Dynamic Language Runtime, developers will now be able to use Ruby, Python, and EcmaScript! This means a Ruby developer can develop Silverlight applications, and leverage the .net Framework!
  6. Cross-Platform, Cross-Browser Remote Debugging : If you are in the need to debug an application running on a Mac, no problem! You can now set breakpoints, step into/over code, have immediate windows, and all that other good stuff that Visual Studio provides.
  7. The best development environment on the planet : Visual Studio is an award winning development platform! As it continues to constantly evolve, so will Silverlight!
  8. Silverlight offers copy protection : Have you noticed how easy it is to download YouTube videos to your computer, and save them for later viewing ? Silverlight will finally have the features enabling content providers complete control over their rich media content! Streaming television, new indie broadcast stations, all will now be possible!
  9. Extreme Speed :There is a dramatic improvement in speed for AJAX-enabled websites that begin to use Silverlight, leveraging the Microsoft .net framework.

Getting Started With SilverLight :

In order to create Silverlight applications with following :

Runtime :

Microsoft Silverlight 1.1 (currently alpha) : The runtime required to view Silverlight applications created with .NET Microsoft.

Developer Tools :

Microsoft Visual Studio codename "Orcas" (currently Beta 1) : The next generation development tool.

Microsoft Silverlight Tools Alpha for Visual Studio codename "Orcas" : The add-on to create Silverlight applications using .NET.

Designer Tools :

Download the Expression designer tools to start designing Silverlight application.

Expression Blend 2

Software Development Kit:

Microsoft Silverlight 1.1 Alpha Software Development Kit (SDK) : Download this SDK to create Silverlight Web experiences that target Silverlight 1.1 Alpha. The SDK contains documentation and samples.