Tuesday, April 14, 2009

Book Review - Data-Driven Services with Silverlight 2

As mentioned in a previous post, I deal with data-centric applications on a daily basis. Data-Driven Services with Silverlight 2 by John Papa is an excellent book for folks in the same situation. Here's what I really like about it:
  • Focused Topic
  • Concise Code Snippets
  • Clear and Useful Samples
  • Full Coverage of Silverlight 2 Data Access

Let's take a look at each of these.

Focused Topic
The book covers only data access concepts in Silverlight 2. It assumes that you have a basic Silverlight background and does not focus on areas such as controls, XAML or layout. This keeps the book brief (around 350 pages) and allows you to focus on the relevant topic: data in Silverlight 2.

Concise Code Snippets
Code snippets are used liberally throughout the text, both XAML and C#/VB code. The snippets build on previous samples and so only show the "new" parts. This keeps the code snippets short and relevant. And even though the code shows both C# and VB, neither seems to be too long or distracting. I found myself even forgetting that the "other" language was included at times. (You should be able to figure out which language I'm referring to -- not that there's nothing wrong with it. Both languages are pretty much equivalent, so it's just a matter of preference when it comes to syntax.)

Clear and Useful Samples
The samples (downloadable from John Papa's webite) are very clear. When there are multiple examples covering a single topic, they are packaged into a single application. This makes it very easy to navigate the samples both at design-time and run-time.

(Click image to enlarge)

A couple things to notice in the screen-shot. First, the menu system on the left. This lists the different samples that are included in the project. This makes it very easy to flip back and forth to make comparisons among the samples.

Second, notice that the sample on the right is pleasant to look at. I know that this isn't really all that important. But, many times sample applications for data access methodologies are merely functional. These actually use a custom control template library to make the samples look less generic. The control templates are out of the way in the samples, so it is still easy to focus on the functionality when reviewing the XAML.

Full Coverage of Silverlight 2 Data Access
Finally, since this book is focused simply on data access, it can cover a variety of data sources and methodologies. Chapters 1-4 are overviews of the technologies used in data access in Silverlight. Chapters 5-11 cover specific data sources. Here's a breakdown of the book chapter by chapter:

  1. Getting Started with Silverlight 2
    A few Silverlight 2 basics (such as Data Services and the Control Model) and .NET topics (such as LINQ and C# language enhancements) which are needed in later topics such as data binding.
  2. Silverlight Data-Binding Foundation
    The data-binding basics including dependency properties, XAML binding markup, and the DataContext.
  3. Modes and Notifications
    OneTime, OneWay, and TwoWay binding modes and the INotifyPropertyChangedInterface.
  4. Managing Lists, Templates, and Converters
    An overview of working with list-based controls, implementing data templates, and building value converters.
  5. WCF, Web Services, and Cross-Domain Policies
    How to build and call ASMX services, and also using WCF services that are compatible with Silverlight 2.
  6. Passing Entities via WCF
    How to send entities (simple classes) back and forth using LINQ to SQL and Entity Framework.
  7. Consuming RESTful Services with WebClient and HttpWebRequest
    An introduction to REST and using WebClient (simpler) or HttpWebRequest (more complex, but more flexible) to interact with RESTful services.
  8. Consuming Amazon's RESTful Services with Silverlight 2
    A specific example interacting with Amazon to search items, create a shopping cart, and add items to that cart.
  9. Creating RESTful Services and Introducing SilverTwit
    More REST, including consuming JSON services. The SilverTwit sample uses a series of services to create a Twitter client in Silverlight.
  10. Syndication Feeds and Silverlight 2
    How to interact with RSS and Atom feeds.
  11. Silverlight 2 and ADO.NET Data Services
    An overview of ADO.NET Data Services and how to interact with them with Silverlight.

If you create data-centric applications and are working with Silverlight 2, you need this book. By the time I got to the end of this book, I was extremely comfortable creating services and consuming them with Silverlight. This is an excellent addition to my collection of reference books, and I am finding myself repeatedly opening up the sample applications to review different data access techniques. I am very glad that I came across this excellent resource.

I read between 8 and 10 technical books per year (generally in the 500 to 900 page range). I find the majority of them useful, but occasionally one will jump out as being particularly relevant. That is how I felt with Data-Driven Services with Silverlight 2.

No comments:

Post a Comment