I am looking for a good book on Silverlight 3, for myself and my development team. We are all experienced .NET developers, but with virtually no exposure to Silverlight.
This site on Silverlight.Net lists the following books on Silverlight 3 development -
Silverlight 3 Programmer's Reference by J. Ambrose Little, Jason Beres, Grant Hinkson, and Devin Rader
Beginning Silverlight 3 by Robert Lair
Silverlight 3 Jumpstart by David Yack
Game Programming wi开发者_如何学JAVAth Silverlight by Michael Snow
Introducing Microsoft Silverlight 3 by Laurence Moroney
Pro Silverlight 3 in C# by Matthew MacDonald
Accelerated Silverlight 3 by Jeff Scanlon and Ashish Ghoda
Essential Silverlight 3 by Ashraf Michail
I was hoping to get a few comments on each, and some overall recommendations.
Note that previous SO questions on Silverlight books have all been about Silverlight 2.
I've just started working my way through Pro Silverlight 3 in C# by Matthew MacDonald having been dabbling with SL3 for a month or two.
First, the book itself: there are 792 pages to it: the index starts at p. 727 so hopefully that'll help it be a useful reference as well. It's printed in colour which makes reading the code and XAML much easier. There's plenty of sample code but he concentrates on showing the pertinent bits, not the whole thing - full code is downloadable.
Despite its title, it does cover the basics but from the pov of being thorough rather than treating you like a novice. The book is pretty much all about the client. From flicking through the whole book and working my way through the contents pages, there're only a couple of chapters devoted to the server end: chapter 15 deals with ASP.NET Web Services and Chapter 20 with general Networking (cross domain, REST, JSON, sockets and local connections). There's a brief mention of WCF RIA Services in Ch.15 - this is something you probably should look at (even though it's still in beta) as it can change the way you do things quite a lot.
Here are the Chapters: Introduction; XAML; Layout; Dependency Properties and Routed Events; Elements; The Application Model; Navigation; Shapes and Geometries; Brushes; Transforms and Bitmaps; Animation; Sound, Video and Deep Zoom; Styles and Behaviours; Templates and Custom Controls; Browser Integration; ASP.NET Web Services; Data Binding, Data Controls, Isolated Storage; Multithreading; Networking.
It seems to cover everything but I'm not convinced about the order of chapters. I plan to skip the chapters that are focussed on presentation and do them after I've done the rest as somebody else will probably be doing the twiddly bits.
If it'll prove useful to you, I'll update this post with other observations as I progress through the book.
Update
Ch.1 - Introduction - what SL is, what it can do, what you need to use the book
Ch.2 - XAML - XAML Namespaces and relationship with SL Namespaces; code-behind; properties (simple, complex, Attached) and events; resources; binding (element-to-element)
Ch.3 - Layout - this chapter covers the built-in SL containers (Grid, StackPanel, Canvas). It also covers WrapPanel and DockPanel from the Silverlight Toolkit and walks you through adding these to your page, both manually and using VS, which is useful - it took me a while to work out that VS would do the fiddly bits for me. It goes through the basics of layout, using Rows and Columns, nesting, GridSplitter, Margins, the various Size mechanisms and also walks you through the process of creating a custom layout container (creating a simple UniformGrid (a la WPF) in the process). It talks about sizing, scrolling, scaling and full screen (don't get excited - this last will be of minimal use to most). I read a WPF book a while back and those topics were covered in different chapters; this seems a much more sensible organisation.
Ch.4 - Dependency Properties and Routed Events - a shorter chapter: I'm always glad to see that an author/editor accepts that something is important enough to deserve its own chapter whilst accepting that it might not be that big a topic. It explains how to create your own DPs, about property providers and precedence and about attached properties and then walks you through using both in a WrapBreakPanel example. The Routed Events section walks you through SL's bubbling events, key presses, mouse buttons and movement and the scroll wheel. There is a section on Focus but it's more about tabbing and doesn't address some of the issues people seem to have with setting Focus in code.
Aside: Microsoft have said Silverlight is a subset of WPF. In the Routed Events section (and elsewhere) the author highlights major architectural differences between SL and WPF but avoids getting into the nitty-gritty of which methods, properties, events and such differ and how. I think he gets the balance right: it won't be intrusive for those who've never seen WPF but will be informative enough for those who have.
Ch.5 - Elements - a look at TextBlocks and their properties, Images, Content Controls, Buttons, ToolTips and Popups, ItemsControls (ListBox, ComboBox, TabControl) TextBox, PasswordBox, AutoCompleteBox (6 pages), Slider, ProgressBar, Calendar, DatePicker. The Last Word section (each ch. ends with one) says that the focus of the book shifts to the technoloyg of SL and holds some interesting surprises - sounds fun!
One thing I haven't mentioned, so far: the author insists on using Hungarian notation in his sample code. I find irritating - it makes the code difficult to read. I accept that in a short code sample, it allows the author to skip providing everything but how is lblError easier to read and understand than errorLabel?
Ch.6 - The Application Model - a walk-through of startup and shutdown events, unhandled exceptions, custom splash screens, out-of-browser applications, binary resources, class library assemblies, assembly caching and on-demand downloading.
Ch.7 - Navigation - covers how to do navigation yourself (a la SL 2) and how to use the built-in stuff from SL3. It's still useful seeing the DIY approach as there are things that are difficult with the built-in stuff. He introduces the navigation template at the end of this chapter. Also covers ChildWindows.
Aside: I have noticed a few oddities and mismatches between images and text, here and there. It feels like this book, or parts of it, were updates to a previous version.
General summary, so far: it's easy to read. Grammar and punctuation are good. There are few typos, which is nice. Also, you don't need to be sat in front of a computer to use the book. At this point, I'd have no hesitation in buying another book by this author.
Pro Silverlight 3 in C# by Matthew MacDonald is very nice for developers
Foundation Blend 3 with Silverlight by Victor Gaudioso is very nice for designers
I have no experience with other books. So cant comment on them. Hope this helps.
精彩评论