Sunday, January 16, 2011

What is Silverlight??

Microsoft Silverlight is a cross-browser, cross-platform, and cross-device plug-in for delivering the next generation of .NET based media experiences and rich interactive applications for the Web. By using Silverlight's support for .NET, High Definition video, cost-effective advanced streaming, unparalleled high-resolution interactivity with Deep Zoom technology, and controls, businesses can reach out to new markets across the Web, desktop, and devices.

Silverlight enables you to create a state-of-the-art application that has the following features:
·         It is a cross-browser, cross-platform technology. It runs in all popular Web browsers, including Microsoft Internet Explorer, Mozilla Firefox, and Apple Safari, and on Microsoft Windows and Apple Mac OS X.
·         It provides a consistent experience no matter where it runs.
·         It is supported by a very small download that installs in seconds.
·         It streams video and audio. It scales video quality to everything from mobile devices to desktop browsers to 720p HDTV video modes.
·         It includes compelling graphics that users can manipulate—drag, turn, zoom—directly in the browser.
·         It reads data and updates the display, but it doesn't interrupt the user by refreshing the whole page.  



Advantage:

          Lightweight at 4-6 MB, quick download
          .NET based
          Write in C# or VB.NET
          Use familiar class libraries
          Rich state-of-the-art GUI
          Vector based
          All types of content handled uniformly
          Secure – sandboxed

Disadvantage:
          Sandboxing limits functionality
          Conflicting products within Microsoft?

Introducing Silverlight


The .NET Framework has been released in version 3.5 and includes features that encompass all facets of Windows, Web, and network development. The .NET Framework 3.5 includes classes, methods, and properties numbering just under 10,000 and complies with the latest Web development standards and has introduced 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 local workstation, and across the Web. The four primary additions to the .NET Framework as of version 3.0 are Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), Windows Workflow Foundation (WF), and CardSpace.

WPF is used to develop elaborate user interfaces like those that adorn Windows Vista and managed advanced media streaming and integration. 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. WF is used to model complex workflow processes and CardSpace is the embodiment of new security and user authorization functionality.

A frontier that the .NET Framework had not fully extended to is the Web user's browser space (browser). ASP .NET AJAX was developed to improve performance in the browser space by making postbacks and calls between the Web client and server asynchronously and has been a great success. ASP .NET AJAX utilizes JavaScript and new types and controls developed specifically for use with ASP .NET AJAX.

Although ASP .NET and ASP .NET AJAX offer impressive capabilities in the browser, both 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 plugin solutions such as Adobe Flash. Additionally, it is incredibly 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 plugin solutions.

In order to further extend the .NET Framework and associated functionality into the browser and do so in an extremely competitive manner, Microsoft introduced Silverlight (originally referred to as WPF/E). Silverlight is a free plugin that the user downloads and it encompasses a subset version of the .NET Framework and WPF. In a manner similar to the JVM, Silverlight functions in the browser within the boundaries of the "sandbox". The sandbox is 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.


What Features Are in Silverlight?

Silverlight combines multiple technologies into a single development platform that enables you to select the right tools and the right programming language for your needs. Silverlight offers you the following features:

WPF and XAML: Silverlight includes Windows Presentation Foundation (WPF) technology, which greatly extends the elements in the browser for creating UI. WPF lets you create immersive graphics, animation, media, and other rich client features, extending browser-based UI beyond what is available with HTML alone. Extensible Application Markup Language (XAML) provides a declarative markup syntax for creating WPF elements. See Creating User Interfaces with Silverlight for more information.

Extensions to JavaScript: Silverlight provides extensions to the universal browser scripting language that provide powerful control over the browser UI, including the ability to work with WPF elements. See Silverlight 1.0 - Development with JavaScript for more information.

Cross-browser, cross-platform support: Silverlight runs the same on all popular browsers (on any platform). You can design and develop your application without having to worry about which browser or platform your users have. See Creating and Deploying Silverlight Applications for more information.

Integration with existing applications: Silverlight integrates seamlessly with your existing JavaScript and ASP.NET AJAX code to complement functionality you have already created. See Integrating Silverlight with ASP.NET Web Pages for more information.

Access to the .NET Framework programming model and to associated tools: You can create Silverlight-based applications using dynamic languages such as managed JScript and IronPython as well as languages such as C# and Visual Basic. You can use development tools such as Visual Studio to create Silverlight-based applications. See Common Language Runtime and Base Class Library in Silverlight and Dynamic Languages in Silverlight 2 for more information.

LINQ: Silverlight includes language-integrated query (LINQ), which enables you to program data access using intuitive native syntax and strongly typed objects in .NET Framework languages. See Parsing XML Data in Silverlight for more information.

Silverlight Tools

With Silverlight being so popular, there are already many editors and design tools being planned by vendors. The two most common Silverlight design and development tools are:

Visual Studio 2008 :


Visual Studio is Microsoft's premiere integrate software development environment. Visual Studio now hosts management utilities as well as development tools. The figure below shows Visual Studio 2008.
At this time, Visual Studio 2008 offers the ability to build Silverlight applications by using XAML but does not offer a visual designer.

Expression Blend 2 :


Microsoft has introduced a whole new line of cutting edge tools for use by designers, Microsoft Expression Suite. Microsoft Expression Suite includes a tool, Microsoft Expression Blend, that is a Silverlight development tool targeting designers. In a brilliant move, Microsoft designed the Expression suite of tools to integrate nicely with Visual Studio. This comes close to completing the cycle of tools needed to work with the .NET Framework technologies and architectures. ASP.NET, for instance, was redesigned with code behind files containing compilable code so that developers could work on programming language code and components while designers could work on the markup and user interface.

Lunar Eclipse :



In the first module, we mentioned that just as there is a version of the .NET Framework that runs locally on the Linux operating system, the Mono Project, there is a version of the Silverlight plugin that also runs locally on the Linux operating system, Moonlight. Lunar Eclipse is a new design tool created by open source developers that was created to run locally on Linux and design Moonlight applications.

Versions of Silverlight :

Version 1.0 was released to market in September 2007. Silverlight version 1.0 includes the ability to:
  • Create and manage 2D graphics and animation.
  • Handle mouse, keyboard, and ink input.
  • Deliver WMV, WMA, and MP3 media.
  • Work with JPEG and PNG imaging.
  • Format and manipulate text.
  • Communicate with services and download server resources by using the HTTP downloader.
  • Parse Extensible Application Markup Language (XAML) content and markup.
  • Navigate Web content by utilizing the JavaScript Document Object Model (DOM).
Version 2.0 was released to market in March 2008. Silverlight version 2.0 will include:
  • All of the functionality included in Silverlight version 1.0 .
  • Support for managed code C#, VB, Python, Ruby.
  • XAML extensibility.
  • Control class and sample controls.

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.

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.