I’m happy to announce that my book Pro Business Applications with Silverlight 5 has now been released. Preparation of this edition has been an enormous task, and I’m so glad to see it finally make it out into the wild. What I had planned to be a short task of simply updating the Silverlight 4 edition of the book with the new features available in Silverlight 5 blew out to become a huge endeavour. Not only did I update the book for Silverlight 5, but I also rewrote much of the existing content to make it easier to read, and expanded upon the concepts I had covered in the previous edition (the chapter on MVVM got a huge update, as did discussion of collection views, along with many other topics). In addition, I also covered many new concepts too (such as MEF, and modularising your application). All this new content has added another 200 pages or so to the book from the previous edition.
Most importantly, I have peppered the book with workshops, that walk you through the steps involved in implementing the topics covered in the book. All the steps you need to follow are listed right there in the book, saving you the need to read a mass of text and interpret it in order to apply it to your project. This makes it easy for you to apply the principles being covered without fumbling about and having to rely on any prerequisite knowledge.
If you’re not familiar with the Silverlight 4 edition, I took what I believe to be a rather unique approach, in that I attacked the subject of how you build business applications in Silverlight in a somewhat linear fashion. Many (most?) technology books tend to be focused on the technology itself, with the topics not organised in order of how you would use them. As a reader of these sorts of books, you’re required to apply the technology to your problem. With my book, I took a problem-centric approach. The problem being that you’re building a business application, and the book showing you how the technology can help you reach a solution, from beginning to end. Ideally you’ll read and follow this book from start to finish. That said, it is still usable as a reference book if you so wish.
To demonstrate the process that the book follows, here’s the table of contents:
- Getting Started with Silverlight
- An Introduction to XAML
- The Navigation Framework
- Exposing Data from the Server
- Consuming Data from the Server
- Implementing Summary Lists
- Building Data Entry Forms
- Securing Your Application
- Styling Your Application
- Advanced XAML
- Advanced Data Binding
- Creating Custom Controls
- The Model-View-View Model (MVVM) Design Pattern
- The Managed Extensibility Framework
- Printing and Reporting
- Out of Browser Mode and Interacting with the Operating System
- Application Deployment
The benefit of this linear approach is that the workshops actually guide through the process of building a business application in Silverlight step-by-step. You can follow through the workshops in order, and have a fully functional application at the end.
All in all, I’m actually really proud of this edition of the book. I put a lot of work into it, and it’s become the book that if I were building business applications in Silverlight, I would want to have it by my side.
It saddens me greatly that Microsoft have let the “Silverlight is dead” rumour get out of hand, and depresses me that many people have been turned away from using Silverlight, and will not buy my book because of it. I strongly believe that Silverlight is one of the best technologies available for building line of business applications, and I see it being so for quite some time yet. It’s a mature platform, with a strong community around it. Sure, Silverlight can’t beat HTML5′s reach, but you’ll no doubt find it quicker and easier to develop applications in Silverlight when there’s no need for your application to run on an tablet or phone.
If you are planning to buy the book from Amazon, please consider clicking on the cover of the book above, which will use my affiliate link to take you there. And once you do have it and have been reading it, it’d be great if you could leave a review!
Now that the book is done, I’ll be doing some more blogging now. Not everything I wanted to write about made it to the book, so I’ll be covering some of those topics. Feel free, however, to suggest a topic in the comments below, and I’ll see what I can do!



I’ve been waiting for this version and just got the book on Amazon.
I’m looking for info on connecting my SL app to a third-party RESTful service. Do you cover this scenario? if not, can you point me to some up to date resources? some info on OAuth consumer would also be great.
Thank you
Hi Slyvain
Unfortunately, that topic was something I wanted to cover, but didn’t make it to the book. I already had it down to blog about sometime in the future. In the meantime, try this tutorial on the silverlight.net website:
http://www.silverlight.net/learn/data-networking/network-services-(soap,-rest-and-more)/rest-services-(silverlight-quickstart)
You might also find this library of interest (note: I haven’t tried it myself):
http://www.hardcodet.net/2010/02/wcf-rest-starter-kit-for-silverlight
Hope this helps…
Chris
I purchased the book,but the source code package is useless, because it could not be opened, invalid archive file.
http://www.apress.com/downloadable/download/sample/sample_id/1265/
Could not understand why ?
Hi Deminhu
I just downloaded it, and it opened fine. The file you should end up with is 14,428kb. What program are you trying to open it with?
Chris
Hi Deminhu
I just downloaded it, and it opened fine. The file you should end up with is 14,428kb. What program are you trying to open it with?
Chris
Hi,
I successfully opened the package in my home computer, for some unknown reasons, I just could not open with WinZip in my office.
Hi Chris,
I have read your book Pro Business Applications with Silverlight 4 and I have a question about the presentation model contains a collection of another presentation model.
I have no idea on CRUD in this case, since you do not have mentioned details in your book. Pro Business Applications with Silverlight 5 – Pg 134
Appreciated if you could provide more details / example.
http://stackoverflow.com/questions/9656022/silverlight-presentationmodel-contains-a-collection-of-another-presentationmodel
Thank You!
Hi Calven
Thanks for leaving your question on StackOverflow. I’ll answer it over there.
Chris
Thanks for your reply, I have posted my project file at StackOverFlow.
Hi Chris,
Just wondering why sometimes we have to write Context.SaveChanges() after we have added a new object into the context? But it is still working without the SaveChanges().
Thanks.
Hi Calven
It really depends on the scenario. If things work without calling SaveChanges() then don’t. As you’ll note in my final solution on the StackOverflow thread, I don’t call that method because it’s not needed. Previously I did because I wanted the database generated primary key back immediately, but with my later solution it was no longer required.
Chris
Hi Chris,
Thanks for your input.
Your book got a topic is “Securing your application”,
it is like about securing WCF RIA service only.
How about WCF Service? Lets say I have two services,
1 is WCF RIA service for exposing data from server to client,
another is WCF Service for send email operation or something else. So my WCF Service could be secured similiar like the WCF RIA service? Just simply decorate the operations with “RequiresAuthentication”?
Thanks.
Hi Calven
The RequiresAuthentication attribute is for RIA Services only (AFAIK). Check out this old article I wrote back in the pre RIA Services days. I talk about implementing security with WCF Services there: http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx. Hope this helps…
Chris
Hi Chris,
I’m trying to exposing PM from server, but this time in code approach instead of using DomainDataSource. But I’m facing an issue with the code approach. I have updated my post at StackOverFlow same link, if you are free, please have a look.
Thanks.
Hi Chris,
Thanks for your reply, I have difficult while trying to use the domaincollectionview in VB.NET. I have updated my post.
Thanks.
Hi Chris,
Sorry, this time I’m having trouble when performing delete ProductInventoryPM. I have updated my question on StackOverFlow.
Appreciated if you could provide details or example on this part.
Thanks.
Hi Chris,
Are you busy for this few days?
Thanks.
Hi Chris,
Is this book available in VB.NET language?
Actually I wish to have this book in VB.NET language,
it is very hard to find this kind of book in VB.NET at the market.
Thank you
Hi Calven
Sorry, no, it’s only available in a C# edition.
Chris
Hi Chris
Great book, I am really enjoying it! Trying to get through it so I can implement.
I have been following your workshops throughout successfully. Today I thought I would use one of my databases to replicate the Adventure Works sample. However on the retrieving of the list I am unable to get this query and am getting a “The remote server returned an error. NotFound”. I have tried to use this from within the Adventure Works sample app I have build that is working and I get the same error.
All databased on in the same instance of SQL Server.
Can you think of anything off the top of your head that i might be missing?
Thanks
David
Hi David
Glad you’re enjoying the book, and nice to hear you’re running through the workshops
. The first thing that comes to mind is whether your Web project set as the startup project, or the Silverlight project. The Web project should be set as the startup project. If when you run your application you get a file path an the address bar of the browser, then your Silverlight application is being loaded from a file rather than a URL, meaning that it wouldn’t be able to find the services it needs, leading to this error. Check that out, and let me know how you go.
Hope this helps…
Chris
Hi Chris
Thanks for your prompt response. It turns out that i should have waited for the workshop on paging as the error was actually too much data being passed
.
I was trying to load 12000 records into the datagrid!
I will carrying on now enjoying your book.
Thanks
David
Ah, interesting! The error’s not too helpful, is it?
Yip. Silverlight errors never seem to tell us much…
Hi Chris
Thanks for an exellent book. I have just finished my first reading. It clarifies many details I have thought I knew
Srečo
Always nice to hear stories like this. Thanks Srečo!
Hi Chris
I have revisited the Chapter15 again with the focus on printing, usig rdlc. The problem I have is, that I get white screen for Product Catalog when testing in VS2010 and IE9. In Firefox I get the catalog but without Adobe Chrome. Would you give me some suggestions.
Thanks
Srečo
Hi Srečo
Sorry, I’m not really sure. What do you mean by “Adobe Chrome”? Do you mean Adobe Reader? It worked in IE9 for me fine. Are you running the sample in the downloadable code from here? http://www.apress.com/9781430235002
Chris
Hi Chris
I have a similar experience in IE9. I have a factory installed DELL Vostro Laptop and for some reason when I set windowless mode to true i get a white screen in IE9. I have Windows 7 Pro 64 Bit with all latest updates. It works perfectly in Chrome. Strange??
When I set Windowless mode to false IE seems fine though.
David
Hi Chris
Thank you for the answer. I found the reason. The problem was with plugin. A few days ago I have installed Nitro Reader and Primo pdf and one of this disabled Adobe plugin in IE. I have not seen anything unusual in IE but after reinstallation of Adobe reader everything works ok. With Adobe Chrome I thougt, Adobe menu toolbar. I did not know how to switch it on.
Thanks
Srečo
Good to hear you solved your problem Srečo!
David: I’ve not heard of this before, but the same issue has been reported to Microsoft Connect here: http://connect.microsoft.com/VisualStudio/feedback/details/674550/silverlight-forum-silverlight-4-and-windowless-true-has-display-problem-on-computer-with-intel-g45-43-express-chipset-using-ie9. Maybe the workarounds there might help?
Chris
Hi Chris,
I’m using DomainCollectionView Approach to fetch list of records to ListView, and allows to perform search on client side. One problem is, if I have updated my records from my database, but on my client side is still having the old version of records when searching. How can I get the latest version of data from database every time when performing search?
Thanks.
Hi Calven.
Sorry, I’m not sure, especially not seeing the code, I’ve not seen this problem before. Are you sure that the data being returned from the server is correct and up to date?
Chris
Hi Chris,
I have posted my question on StackOverFlow with the URL; http://stackoverflow.com/questions/11541942/silverlight-fetching-latest-version-of-data-from-database-using-wcf-ria-service
Thanks.
Hi Chris,
I’m working on the Paging with the DomainCollectionView approach, I have set the PageSize to 10, but it still fetching all the items from Database and display it on ListBox, the DataPager can see total pages and the current page count, but not working well. I have posted my question and source file at http://stackoverflow.com/questions/12704421/silverlight-paging-using-domaincollectionview
Thanks.
Hi Chris,
I have solved it, did a very small mistake.
Thanks.
Hi Chris,
BTW, I have another question about the DomainCollectionView.
How can the DomainCollectionView deal with multiple LoadOperation? Meaning from one LoadOperation to another. Example, by default load all products, if I want to search product, the search results will display.
Thanks.
Sorry Calven, I don’t quite understand your question. If you pass the DomainCollectionView no filter criteria, then it will load all the data.
Hi Chris,
Sorry, I try to explain it more details here.
If I would like to have two commands, one command is LoadAllProduct, while another is SearchProduct? My ListBox is binding to the DomainCollectionView. Meaning my DomainCollectionViewLoader can switch from one LoadOperation to another LoadOperation?
Thanks
Hi Calven
I don’t think switching between load operations is the right solution. There’s several alternate ways you could implement this behaviour.
1. Firstly, I don’t think you really need two separate methods for LoadAll and Search. One method should suffice, as demonstrated in the book and the demo code. If you pass an empty string as the filter criteria, then a StartsWith/Contains filter will match all records, returning them all. When a value is provided to search by, the filter will be applied, and the matching subset returned from the server.
2. You can pass the DomainCollectionView a method that then determines which actual method should be called: LoadAll or Search.
3. You could write your own DomainCollectionViewLoader that contains more logic, as described by Kyle McClellan here: http://blogs.msdn.com/b/kylemc/archive/2011/05/13/writing-a-custom-collectionviewloader-for-the-domaincollectionview-and-mvvm.aspx
That’s a few possible solutions. Hope this helps…
Chris