Now that Silverlight 4 is released you can expect to see a whole plethora of books around all aspects of Silverlight development, the most predominant area would be building business applications. It was no surprise then when “Microsoft Silverlight 4 Business Application Development” by Packt publishing landed on my doorstep.
This book targets people new to Silverlight and who want to build business applications. It also breaks the mold of tradition titles, buy having large focus on practical examples that you work through.
Chapter 1
The first chapter sets off with a high level look at Silverlight as a technology. Under the tools needed I would have liked to see a bit more clarity. Silverlight 4 only runs under VS2010, which is what the title, but not this paragraph implies – A nice little matrix would have eased confusion here. I would have also liked to see the Express (read free) of VS2010 edition mentioned. This chapter also mentions the tools to help develop Silverlight solutions, such as Silverlight Spy, and the Expression Suite. On page 20 we are into our first ‘hands on lab’. It’s a shame the screenshots were not updated to reflect the RTM version of VS2010, these were VS2008. The lab then takes you through a simple hello world example and layout options. I personally would have like a bit more behind the scenes, such as building and the XAP file which is created.
Chapter 2
Cake-O-Rama is the subject of chapter 2, a fictitious website, whose owners want to move it to Silverlight. It looks at replacing the HTML navigation with Silverlight, the container controls and applying styles across the navigation buttons, touching briefly on markup extensions and implicit styles, before we start a hands-no-lab. This lab uses blend to show us how to style, re-template and finally utilize the visual state manager to build our navigation buttons. It then goes on to look at Storyboards and animations, including custom easing, It finishes of with embedding Silverlight in a web page.
Chapter 3
This chapter focuses on Rich Media. It uses blend to demonstrate adding audio and video into a Silverlight application. I would have preferred this to be done in VS2010, and in XAML view to let the developer understand what’s happening. Whilst you can get a trial of Blend, it’s not free, so you can’t assume everyone will have it. It then looks at adding a behavior, before giving an overview of Expression Encoder
Chapter 4
Deep Zoom, Bing Maps, Digital Ink and Isolated Storage are the focus of chapter 4, a bit of a mixed bag here. The first part of this chapter walks us through building a simple deep zoom application, using the deep zoom composer, before swiftly moving on the Bing map control and downloading that. I’d have preferred this as Bing separate chapters, so the reader can just move on if they are not interested in the topic. It talks us though the licensing for the Bing map control, programmatically setting locations, and adding a collection of pushpins, before finally restyling the pins. We then move on to the InkPresenter control, which has been in Silverlight since Silverlight 2, for creating, saving and erasing ink, before we use isolated storage to persist our xaml artwork. It also demonstrates uploading the xaml to a server using a web request post.
Chapter 5
I was actually expecting chapter 5 to appear earlier in the book, after all most business applications are about the data. This chapter expands on the inkpresenter control to save the data to the server using WCF. The lab takes us through building the WCF service which takes an object and saves it to an XML file. We then go back into blend to create the data form and send the data. The lab then create s a class which implements INotifyPropertyChanged to hold the customer details, and then uses Blend wire it all up.
Chapter 6
We dive straight into a lab on RIA services to build the Cake-O-Rama application, covered at a high level. It then jumps to Sharepoint integration to build a Silverlight web-part. A subject I thought would take up the majority of the book turned out to be one of the shortest chapters, at just 30 pages, including Sharepoint.
Chapter 7
Chapter 7 starts with us creating a simple database, before moving on to explain and build an entity framework domain service. It then goes on to build some UI to support updates and queries to the Cake-O-Rama ordering service, including creating a converter and showing master/details in our ui. We also got to use the powerful dataform control.
Chapter 8
In Chapter 8 the book looks at using the charting functionality in the Silverlight Toolkit. It uses Linq to filter the queries and the DataGrid to render the data.
Chapter 9
In Chapter 9 we look at building a signature control, for the cake-o-rama delivery and using hooking in bind maps for the Geo-Data location for the route mapping of the delivery.
Chapter 10
Chapter 10 is a bit of a wrap up, covering Network Connectivity, taking Silverlight out-of-browser, install and uninstall and a brief discussion on WPF.
Conclusion
It’s always difficult when you try a break from the norm, and in some ways this works, in others it doesn’t. It’s nice to have a walkthrough on a topic, but I would have preferred more of the what’s going on explanations. I personally would have structured the book back to front, and started with some requirements and creating the Database/Services, the current flow seems awkward, although you could potentially do these in your own sequence. I would have liked to see more business functionality around navigation applications, and more coverage of RIA services. ‘A change in requirements’ would have been good and the impact on services/entity framework and databinding. There was too much mapping for me, although that could appeal to some people.
The book gives a high level view on a lot of topics, which you can work through, although I felt the sequence could have been better and the bias on technology areas balanced better. I also felt, perhaps in the rush to market, the opportunity to update the screens to the RTM version was missed and would be noticed.