Just like everything in life, we start things off with an overview. If you have picked up this book on purpose, then I'm sure you have at least some idea what Silverlight is. But, if you just picked this book because the cover looked inviting, fear not, as this chapter will provide all the basics you'll need in your journey to become a certified Silverlight guru.
As Confucius once said, "A journey of a thousand miles begins with a single step", so let's take the first step now and get to know all the basics of Silverlight.
In this chapter we will cover the following topics:
Silverlight is Microsoft's cross-platform, cross-browser, and a .NET-based framework for building in and out-of-browser Rich Internet Applications (RIAs). In simple words, you can write Silverlight applications using a language you already know (be it C# or VB), and run it on all major operating systems (such as OSX, Windows, and Linux) and browsers (such as Internet Explorer, Chrome, Firefox, and Safari).
It's worth noting that the Linux variation of Silverlight is not developed or maintained by Microsoft. Moonlight, which is the name of the Linux variation, is developed by the Mono project with aid from Microsoft and Novell, and is primarily targeted for Linux and other Unix/X11-based operating systems. In addition, your Silverlight application doesn't have to stay inside the browser. Using the out-of-browser capabilities of Silverlight, you can take your application out of the browser and into the desktop, but we will learn more on that later.
Using Silverlight you can build just about anything—from a simple media player that streams movies from your server, to a complex line of business (LOB) application that fetches data from a database and uses some business logic to transform that data into a visually stunning executive dashboard with interactive charts and gauges.
Many companies nowadays are using Silverlight to enrich their applications. Take a look at Seesmic Desktop 2 for example (http://www.seesmic.com/products/desktop), which is a social media tool for Windows and Mac built entirely in Silverlight.
The main competition to Silverlight comes from Adobe Flash. Both are browser plugins targeting rich media applications. While not a direct competitor, HTML5 can also be considered as an alternative in some cases. While Silverlight has matured into a rich line of business platform that is getting increasingly popular for creating intranet applications, HTML5 offers greater reach, as it can be viewed on more devices. But, it is also much harder to develop the same level of business applications using HTML5 instead of Silverlight.
In addition, the HTML5 specifications are not finalized yet and, thus, not all the browsers implement it evenly. For example, while some browsers fully support the Canvas
control, others support just some of its features, making it difficult to use the "code once, run everywhere" approach.
Whether you are an ASP.NET developer trying to decide if Silverlight is the right technology for your next project or you are a part of a development team in a big enterprise, here are some reasons to use Silverlight over other technologies:
The adoption rate of Silverlight has recently reached the 70 percent milestone (http://www.riastats.com/), which means that almost every three out of four PCs already have Silverlight installed! With the rise in the adaptation rate comes the rise in the need for developers. A leading job-hunting site—http://www.dice.com/—has recently found that Silverlight-related jobs experienced a 12.6 percent growth in demand over the last three months, while Adobe Flash-related jobs experienced just 2.2 percent growth over the same period of time (http://www.readwriteweb.com/enterprise/2011/05/it-hiring-and-salaries-up---wh.php). In addition, Silverlight is the language of choice to develop applications for Microsoft's newest mobile phone system—Windows Phone 7, which means that if you know Silverlight, you are not only a web and desktop developer, you are also a mobile developer!
If I have to sum up the last paragraph in simple words, I would say that you couldn't have picked a better time to become a certified Silverlight developer.
Now that you know what Silverlight is, what it can do, and why you should use it, let's move on to set up your development environment. Your development environment requires the following hardware and software components:
Setting up your development environment is as easy as it can get. The process consists of three downloads (two are mandatory and one is optional) and the installation of those components.
The first thing you need is Visual Studio 2010. If you have Visual Studio 2008 or an earlier version, you will need to upgrade it, as the Silverlight 4 developer tools don't support these versions. You can download a free version of Visual Studio 2010 from the Microsoft website at http://www.microsoft.com/express/Downloads/.
Once you have Visual Studio 2010 installed, you will need the Silverlight 4 developer tools. These tools add the support for developing and designing Silverlight 4 applications in Visual Studio 2010. If you have Service Pack 1 for Visual Studio 2010 installed, you already have the tools; if not, you can get them either by using the installed Microsoft/web platform located at http://www.microsoft.com/web/gallery/install.aspx?appid=silverlight4tools;silverlight4toolkit;riaservicestoolkit or downloading the Microsoft Silverlight 4 Tools for Visual Studio 2010 directly from http://go.microsoft.com/fwlink/?LinkID=177428.
The last thing you should download and install is the Silverlight 4 Toolkit from CodePlex. This toolkit adds new components and functionality to the developer tools, and it is highly recommended that you install it. This toolkit can be downloaded from http://silverlight.codeplex.com/releases/view/43528.
Now you have a fully equipped development environment for Silverlight. With this accomplishment, we can move on and talk about the first major concept of working with Silverlight—XAML.
3.15.168.211