Monday, June 27, 2011

Creating a Silverlight application

To create a Silverlight application in Visual Studio, all we have to do is to go to File->New Project and select "Silverlight application".

All the details including the name of the project, it's location in the filesystem, etc can be configured by changing values at the bottom of the window.

When we create an application, the wizard will prompt us to find out if we want to create just a Silverlight application (I am presuming for the desktop), or we want to create an ASP.NET application which is a web application bundled with the Silverlight app. If we choose the latter, we will have two applications. One the Silverlight app, and the web app. The web app will run on the browser, and will pull the Silverlight app for running in the Silverlight plugin in the browser.

Since Silverlight has a plugin, it seems very similar to a Java Applet, but I am sure they have taken more care to allow it to interact with Javascript, etc on the webpage.

Starting to learn Silverlight

Today I started looking for some tutorials to learn Silverlight. Silverlight.net has a good many video as well as text tutorials. However, most of these tutorials do not mention the order in which we should view / read the tutorials.

If you are beginning to learn Silverlight, you will find the Silverlight Essential Playlist of videos to be very useful. Unfortunately these videos are not listed in the order in which they should be viewed. Fortunately, since these videos are part of a free tutorial from Lynda, you can see their order on Lynda.com here.


Silverlight is a Rich UI technology which in ways is similar to Java Applets, Adobe Air, Flash, and the more recent HTML5. Silverlight initially began as a plugin, but from what I understand now, it is a full fledged business application platform, with technologies such as RIA web services, etc.

I found the UI to be very slick, and as expected Microsoft has created a very user friendly environment called Expression Blend to design the UI for Silverlight applications. The UI is represented as XAML files, which is a declarative language for user interfaces in Silverlight.

Another nice thing I noticed in Silverlight is that, the links within the plugin are exposed in the browsers navigation bar. This makes them bookmarkable.

Silverlight is available on all popular platforms - Windows, Linux, Mac. On Linux it is available as the Moonlight plugin.