Review: Silverlight 1.0 Unleashed

I suspect that most ASP.NET developers would like to get started with Silverlight development. For most of us, it's a question of finding the time, overcoming some inertia, and getting over a touch of anxiety about the learning curve. Adam Nathan's Silverlight 1.0 Unleashed is a good way to get your fingers into Silverlight code and feel your way around - much the way you did when you first encounter any new platform.

Keep in mind that this is a book for developers who prefer to work directly in code and markup. If you expect instructions on how to direct a graphical interface to generate the XAML and JavaScript, you'll be disappointed: this is not an Expression Blend book.

A couple of observations worth noting at the outset: First, this Unleashed book is a manageable size! I don't recall a book in this series weighing in at under 300 pages. A smaller book is far less intimidating for beginners. Secondly, the book is in colour, including the syntax highlighting. Colour enhances the readability of any computer book, especially one that deals with such a visual topic.

The author establishes a rapport with developers early in the book. For example, in "A Note for Those Afraid of JavaScript", he recognizes that many of us aren't enthused about being "forced" to use JavaScript in Silverlight 1.0. On the positive side, he points out that Silverlight limits your exposure to the differences in browser DOMs that make JavaScript on the client a pain. And, like most of us, he looks forward to Silverlight 2.0's support for .NET languages even while offering a 1.0 book.

You notice Adam Nathan's expertise and enthusiasm in the world of XAML on every page. For example, in the chapter on Brushes and Images, he shows how to use the VideoBrush object to paint a block of text with live video. The rest of us wouldn't know where to start to implement these effects - or even that they could be done by mere mortals. Despite being a Microsoft employee, Nathan doesn't gloss over Silverlight 1.0's limitations. His "warning" sidebar on image file formats points out that the 1.0 release doesn't support .gif or .bmp - you must use .png and .jpg. In a comparison with Flash, he notes Silverlight's lack of morphing, blurring, and glowing effects. That said, he offers helpful tips and workarounds where possible.

I'm of two (or three!) minds about how to approach Silverlight development. When I learned ASP Classic, it was all hand coding at the start. As the tools came along (Visual InterDev), development became much faster. But I could always fall back to hand coding when the tool couldn't do what I wanted or was just too slow. Should I take the same approach with Silverlight 1.0 - code by hand and then learn the graphical way? The trouble is, the graphic tool is here now and hard to ignore. I suspect that coding for Silverlight will be a hybrid process where you let Blend do the grunt work and then turn to Silverlight 1.0 Unleashed as a valuable reference for tweaking the code to get the exact effect.

I've learned a lot from Silverlight 1.0 Unleashed and plan to dig in further to create some animations for my new Web site. That said, I look forward to the day when I can build JavaScript-free Silverlight 2.0 apps in VB using Visual Studio.

No Comments