Collecting the Required Tools

The best place to find all the tools you need to get started with Silverlight is the Microsoft Web Platform Installer 3.0 which you can download here: www.microsoft.com/web/downloads/platform.aspx. The Web PI (for short) is a free tool that enables you to easily download and install components of the Microsoft Web Platform. You will find the tools that you require for Silverlight development in the Tools category on the Web Platform tab. Alternatively, you can visit the Get Started page on the official Silverlight web site, at http://silverlight.net/GetStarted, which has links to the required downloads.

The following subsections give a breakdown of the various tools required (or recommended) for Silverlight development and what each does.

images Note The following sections give you a starting point for what you should have installed to begin developing Silverlight applications; however, these are not all the tools you'll eventually need—additional tools will be introduced as required throughout this book.

Visual Studio

Theoretically, you don't need an integrated development environment (IDE) to develop Silverlight applications; that scenario is only for the most hardcore developers. The Professional edition (or higher) of Visual Studio 2010 is your best option by far as an IDE for Silverlight development, as it has no limitations to constrain you. However, for those of you on a budget, Visual Web Developer 2010 Express (containing a subset of Visual Studio functionality and available for free) provides an alternative IDE for building Silverlight applications. For the sake of simplicity, any instructions throughout this book will refer to the action to be taken in the professional edition of Visual Studio 2010.

images Note Visual Studio 2008 does not support Silverlight 4 or 5 development—you will need to upgrade to Visual Studio 2010 if you haven't done so already.

Expression Blend 5 and SketchFlow

Expression Blend could be described as an IDE for designing XAML user interfaces and animations, although its capabilities have been extended from version 3 onward to also include the ability to edit code. You could technically build an entire Silverlight application using only Expression Blend, but the tool is not designed to be used as such, and Visual Studio is much better suited for this purpose (Expression Blend is designed to be used primarily for designing and building user interfaces, rather than for writing code).

Expression Blend is targeted toward designers (user interface, user experience, and graphic designers), rather than developers, with a focus on helping support and enhance the developer/designer workflow. This book is primarily focused on a developer audience; therefore, we'll spend most of our time in Visual Studio when designing user interfaces. Designing user interfaces is much easier in Visual Studio 2010 than it was in Visual Studio 2008, which essentially had no user interface designer. However, it is not as feature rich or powerful as what you'll find in Expression Blend (particularly when it comes to creating animations). If you're serious about creating nontrivial user interfaces, Expression Blend will be a very useful tool in your arsenal.

SketchFlow is a prototyping tool within Expression Blend and is great to use as part of the user experience design process. With it, you can map out the flow of your screens and their layouts, and it can actually generate a Silverlight (or WPF) project for you.

Expression Blend is not a free tool—it must be purchased as a stand-alone product or as a part of Expression Studio. A 60-day trial is available from the Microsoft web site if you want to try out the tools before committing your hard-earned money. Expression Design (also a part of Expression Studio) can also be a useful tool to have (as a vector drawing program), but neither tool is essential for Silverlight development.

images Note Both Visual Studio and Expression Studio are included in the MSDN Premium and the Expression Professional subscriptions (the Expression Professional subscription is a new type of MSDN subscription specifically targeting designers and web developers), which you may find to be the most cost-effective means of obtaining these tools. These subscriptions also include licenses for Office, Windows, and various other Microsoft software products.. Startup software businesses less than three years old can take advantage of the Microsoft BizSpark program, which provides you an MSDN subscription (with all these tools) and numerous other benefits for $100 when you leave the program—a fantastic way to get the tools for no initial investment. Details and eligibility requirements can be found at www.microsoft.com/bizspark.

Silverlight 5 Tools

Visual Studio 2010 comes with support for Silverlight 3 out of the box, and Visual Studio 2010 Service Pack 1 adds Silverlight 4 support, but you will need to install the Silverlight 5 Tools in order to develop applications targeting Silverlight 5. The Silverlight 5 Tools download includes the Silverlight 5 SDK, the Silverlight 5 developer runtime, WCF RIA Services, and support for Silverlight 5 in Visual Studio. Once these tools are installed, you will find new project templates available in Visual Studio for creating Silverlight applications.

WCF RIA Services

WCF RIA Services provides a prescriptive pattern and framework for creating end-to-end Silverlight applications. The WCF RIA Services code generator projects your business object model on the server onto your Silverlight application along with shared business logic, and it provides the infrastructure that enables methods on the server to be called by your Silverlight application. We'll take a thorough look at WCF RIA Services in Chapters 4 and 5. This is now included as a part of the Silverlight 5 Tools installer, but you can install an associated toolkit containing additional features (most of which are still under development) if you wish.

Silverlight Toolkit

The Silverlight Toolkit is a free and open source project hosted on CodePlex, developed and maintained by Microsoft. This is an ongoing project that adds greatly to the available controls that you can use in your Silverlight project. The Silverlight 5 SDK contains only basic user interface controls (TextBox, Button, Canvas, Grid, and so on), so the Silverlight Toolkit provides a raft of more advanced controls, such as TreeView, Calendar, and Charting, among many others.

Blacklight is a similar open source project hosted on CodePlex, but unlike the Silverlight Toolkit it is a community-run project and does not attempt to overlap with the controls available in the Silverlight Toolkit. It's not listed on the Silverlight.net Get Started page, but you can get it here: www.codeplex.com/blacklight.

SQL Server 2008 R2 Express Edition

Business applications (as described in the introduction) are data-centric applications—hence they (almost always) interact with some sort of database. Silverlight applications can't read or write to a remote database directly—you need to provide a set of services to expose the data from the server to client applications. This means you aren't limited to a set number of supported databases—using Silverlight has no bearing on which database you can use. As long as you can communicate with the database in a standard .NET application, you can provide a way to allow your Silverlight application to communicate with it. For the purposes of this book, we'll be using SQL Server 2008 R2 Express Edition as our database of choice, because it's free and reasonably full featured. In most business settings, you would probably want to use the full SQL Server 2008 R2 product; the code provided in this book will work that edition without any changes. Earlier versions of SQL Server would be acceptable too. You can download SQL Server 2008 R2 Express Edition at www.microsoft.com/express/sql/download. Ensure (at a minimum) that you choose the Runtime with Management Tools option.

Silverlight Spy (and .NET Reflector)

Silverlight Spy is not a mandatory tool to obtain, but it's certainly recommended because it is extremely handy when debugging your Silverlight application. Silverlight Spy, created by Koen Zwikstra of First Floor Software, allows you to inspect the internals of a Silverlight application (including its file structure, XAML visual tree, and styles), monitor its memory and processor usage, and monitor its network connector (among many other features). It also integrates with .NET Reflector (a tool from Red Gate Software) to decompile the assemblies within the XAP file and view their code. From a debugging perspective, this tool is invaluable. Early versions of Silverlight Spy were free, but with its version 3 release, it became a commercial product with a price attached. A free edition with a limited number of features was later released (with integration with .NET Reflector being one of the features not included). .NET Reflector was a free tool (with a separate commerical version available), until version 7 was released in March 2011. At this point, Red Gate decided to pull the free version, leaving only the commercial one. Other free decompilers have popped up, but only Silverlight Spy integrates with .NET Reflector (at the time of this writing). Because both tools can save you a lot of time, and with their purchase prices being quite reasonable, they are both worthwhile tools to purchase.

You can download and purchase Silverlight Spy at http://silverlightspy.com/silverlightspy and .NET Reflector at www.red-gate.com/products/reflector.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset