Document Sample
Introducing+Silverlight Powered By Docstoc
					Introducing Silverlight
What's New in the .NET Framework
As of the writing of this course, version 3.5 of the .NET Framework has been released. Version
3.5 includes features that encompass all facets of Windows, Web, and network development:

       Includes just under 10,000 classes, methods, and properties.
       Complies with the latest Web development standards.
       Introduces revolutionary technologies used in Windows Vista development, rich media
        and user experiences, workflow management, security and authorization, and complete
        distributed communication protocols.

The .NET Framework can also be fully extended by developers to create custom classes and
types. The functionality of the .NET Framework spans the server, the workstation, and the Web.
The four primary additions to the .NET Framework as of version 3.0 are:

   1.   Windows Presentation Foundation (WPF)
   2.   Windows Communication Foundation (WCF)
   3.   Windows Workflow Foundation (WF)
   4.   CardSpace

Windows Presentation Foundation (WPF)

WPF is used to develop elaborate user interfaces like those that adorn Windows Vista and
managed advanced media streaming and integration. WPF is the a complete revamp of Windows
Forms so that user interface, graphic, and media development is now designed around the .NET

Windows Communication Foundation (WCF)

WCF encompasses the ASP.NET Web Services and .NET remoting functionality that was
contained in the .NET Framework 2.0 as well as new communication technologies.

Windows Workflow Foundation (WF)

WF is used to model complex workflow processes.


CardSpace is the embodiment of new security and user authorization functionality.

ASP.NET AJAX was developed to improve performance in the browser by making post backs
and calls between the browser and server asynchronously. ASP.NET AJAX uses new built-in
types and controls and JavaScript.

Both ASP.NET and ASP.NET AJAX are heavily dependent upon the ASP.NET page event life
cycle, are tightly coupled to the server, and have a tough time competing with advanced, media-
rich plug-in solutions such as Adobe Flash. Additionally, it is difficult to create Web applications
that offer a consistent experience across all supported browsers and platforms by using ASP.NET
and AJAX. In 2006, Microsoft began developing a solution to extend into the browser and offer
media experiences more robust than competing plug-in solutions.

In 2007, Microsoft introduced Silverlight. (see footnote) 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 (see footnote), 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.

Silverlight Architecture
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.

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 figure below illustrates the major differences between version 1.0 and version 2:

The diagram located at ClassFiles/WhatIsSilverlight/Demos/SilverlightTechnologyMap.gif gives
a broad picture of the technologies to be supported by Silverlight version 2.

Silverlight Hosting
Microsoft Silverlight functionality is completely encapsulated within the Silverlight plug-in.
Web applications typically require the server hosting the Web application to meet minimum
requirements. Silverlight applications simply require a Web server to be equipped as they would
be for hosting HTML documents. Silverlight applications can be hosted on any Web server
accessible to the target audience. The two most commonly used Web servers are Microsoft
Internet Information Server (IIS) and Apache.

Executing a Silverlight application on a Web client machine is a two step process. First, the
application will detect if the Silverlight plug-in is installed on the Web client machine. If the
plug-in is not installed, the user will be prompted with an option to download the plug-in. If the
user opts to do so, a request will be made of the Web server to download and install the plug-in.
The Silverlight plug-in is embodied in a .dll executable file that is loaded into the Web client
browser memory once installed. The only interaction required by the Web client when installing
the Silverlight plug-in is to grant permission for the plug-in to be installed. Various Web servers,
including Microsoft Internet Information Server (IIS), may require slight configuration
modifications so that the Silverlight executable file will be downloaded to the Web client when

Second, once the Silverlight plug-in is installed on the Web client machine, the Silverlight
application itself must be downloaded. A Silverlight application may consist of many types of
files. Slight configuration modifications may be necessary on the Web server, such as MIME
types, so that XAML and XAP files are associated with Silverlight and downloaded correctly to
the Web client machine when requested.

Once the Silverlight plug-in is installed on a Web client machine and a Silverlight application is
downloaded, the Silverlight application is then hosted on the Web client machine. There are
some requirements necessary for the Web client machine as discussed in the sections below,
however all media players, audio and video codecs, compilers and the runtime are encapsulated
in the Silverlight plug-in.

Supported Platforms
Silverlight can be installed on Windows and Macintosh machines. Silverlight applications run
within the confines of a plug-in. There are many benefits to using a plug-in with the primary
benefit being consistency across implementations. A plug-in application can provide a consistent
result in every instance where it is supported. Other plug-in solutions, such as Adobe Flash, have
become popular due to consistency across implementations. For instance, a plug-in application
should deliver a consistent result regardless of whether it is displayed using Internet Explorer on
Windows or Safari on a Macintosh.

Silverlight 2 is currently supported on the platforms discussed below. (see footnote)

                    Platforms that Support Silverlight 2
             Operating System                            Browser
       Windows Vista
                                                   Internet Explorer 7+
       Windows XP SP2
                                                   Firefox 1.5+
       Windows 2000
                                                   Google Chrome
       Windows Server 2003

                                                        Safari
       Macintosh OS 10.4.8+ (Intel Based)
                                                        Firefox 1.5+


Many developers are unaware that a version of the .NET Framework exists for the Linux
operating system. Linux is an open source operating system that is supported heavily in the
online community. The version of the .NET Framework that supports Linux is named the Mono
project and was also developed by the open source community. The developers of the Mono
project keep the project close to in sync with the .NET Framework when updates are released by
Microsoft and created an initial, limited version of Silverlight (called "Moonlight") that supports
Linux in approximately 21 days! (see footnote) You can get up to date information on this
project at

Future Platforms
The Silverlight plug-in renders graphics and multimedia using a vector-based graphics engine.
Vector graphics can easily be scaled from very small displays to very large displays of varying
resolutions with virtually no loss of image quality. Silverlight on a Windows Mobile device will
accommodate delivering live, streaming, high quality video to smart phones and similar devices.
The goal is to enable developers to deliver rich interactive applications (RIA) to any type of

Microsoft has announced support for Silverlight on mobile devices with a limited initial support
for Windows Mobile and the Nokia S60 models. You can learn more about this future support at

What is Silverlight? Conclusion
In this lesson of the Silverlight tutorial, you

       Explored Microsoft Silverlight at a high level.
       Studied some of the history leading up to the release of Silverlight.
       Investigated the architecture of Silverlight.
       Learned which operating systems and browsers support Silverlight 2.