Silverlight tutorials

Silverlight Services basic tutorials

Introduction Of SilverLight

Silverlight is a powerful cross-browser & cross-platform technology for building the next generation web experience & rich internet applications for the web.

Silverlight applications are delivered to a browser in a text-based markup language called XAML. XAML is a declarative markup language that you can use to define the UI elements for your Silverlight-based application.

Silverlight is considered as a competitor to Adobe's flash technology.

One of the design goals of the Silverlight technology is to fill the gap between windows application and web application in terms of creating Graphical User Interface (GUI). So far web developers were not able to make client happy in terms of UI, but now web developer will be able to full fill this with the help of Silverlight technology.

You can run Silverlight in most of all the popular browsers like Internet Explorer, Firefox, Chrome, Safari etc. Silverlight can run in various devices and operating systems like Windows, Apple Mac OS-X and Windows Phone 7.

Using Silverlight you can create rich, visually stunning web applications like flash. Also you can create smooth animations using Storyboards; you can stream media over the net etc.

Silverlight web browser plug-in comes as free to install (approximately 4-5 MB in size). You can download the required plug-in from Microsoft Silverlight Site.

Architecture Of Silverlight
Silver light architecture as a combination of four important blocks
  1. Some .NET framework components -

    Silver light uses some components from .NET framework. One of the main components is WPF. Many of the UI components ( check box , buttons , text boxes etc) , XAML parsing etc are taken from the core WPF system.

    It also has taken components like WCF to simplify data access. It also have CLR for memory management, safety checking and garbage collection. The base class libraries of Net are used for string manipulations, algorithms, expressions, collections and globalization.

  2. Presentation core -

    The core presentation framework has functionalities to display vector 2d animations, images, media, DRM and handle inputs like mouse and keyboard.

  3. Other technologies -

    Silver light interacts with other technologies like Ajax and javascript. So it also borrows some functionalities from there technologies.

  4. Hosting -

    Silver light animations finally run under the browser environment. So it has a the hosting functionality which helps to host the application the browser , expose a DOM by which JavaScript can manipulate the silver light components and it also has a installer functionality which helps to install silver light application and plug-in in the browser environment.

    One of the things which you can notice from the architecture diagram is that the presentation core reads from the XAML file for rendering. The XAML is a component which is a part of the .NET framework and the rendering part is done by the presentation core.

Why Silverlight
  1. Support of .NET framework - if you are already .NET developer it is easy to start programming on Silverlight.
  2. Support of Managed code - you can write programming in your favorite language which .NET CLR supports like C#,VB.NET, Dynamic languages(IronPython, IronRuby).
  3. Better development tools -Visual Studio 2010, Expression Blend.
  4. Large community- available lot of learning resource as compare to Flash technology.
  5. Integration with Enterprise based technologies like WPF, LINQ etc...
Minimum System Requirements

For Installing SilverLight SDK for development as follows

If you are a developer and want to start working on it, you must need the following environment to install the Silverlight tools.

Operating System Microsoft Windows XP Service Pack 2 or higher
Developer Tools
  1. Visual Studio 2008 SP1 (for Silverlight 3)
  2. Visual Studio 2010 (for Silverlight 3 & Silverlight 4)
Designers Tools
  1. Microsoft Expression Blend 3 (for Silverlight 3)
  2. Microsoft Expression Blend 4 (for Silverlight 3 & Silverlight 4)
Silverlight SDK
  1. Silverlight 3 Tools for Visual Studio 2008 SP1
  2. Silverlight 4 Tools for Visual Studio 2010
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, 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 develop er 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.
Difference Between Silverlight and ASP.NET AJAX

The Rich Internet Application (RIA) analysis shows a strong preference for AJAX at 58%.AJAX frameworks have for a long time been strong in the open source community. However, the analysis segmented the MicroSoft Windows-only users and found 92% do not use or intend to use Silverlight, 52% want AJAX and 24% Flex.

Benefits of Silverlight
  1. Silverlight offers cross-domain support for applications
  2. Silverlight plugin is just a 1MB download and is supported in windows XP and above.
  3. Silverlight also has a browser plugin but still needs to reach at pace with flash.
  4. supports asynchronous calls
Benefits of Ajax
  1. Ajax is absed on open standards so widely accepted and supported.
  2. Bandwidth usage of web is less as specfic demands are accomplished.
  3. Works with Flash and Flex
  4. Key component of Web2.0 apps
  5. Benefits of regular web apps like low cost etc.
  6. Supports asynchronous calls
Disadvantages of Ajax

Ajax also uses javascript,CSS and XHTML but there is an issue of cross browser compatibility that is what might work on one browser might not work on another browser which makes the debugging difficult.

Benefits of Flash / Flex
  1. Flash actually has the power of animation
  2. The flash player used to run the Falsh/ Flex apps are installed in about a billion computers.
  3. Flash is a multi-platform application that will appear the same on all browsers and platforms as long as its plug-in has be downloaded.
  4. Flash should be used when the primary goal is visual effects to the users but if looking forward to earn potential customers then it should be limited.