My book about Advanced MVVM

I have been working tirelessly for weeks on what I consider to be my masterpiece.  I’ve published a book called Advanced MVVM.  It is a 52 page deep dive into some complex problems and solutions in an MVVM application I wrote, called BubbleBurst.

You can buy a hard copy, or a digital copy which can be read in the free Adobe Digital Editions e-book reader.  It is also possible to read the book on your Amazon Kindle, by purchasing it here.

The full source code is available on CodePlex: http://bubbleburst.codeplex.com/

The e-book’s Table of Contents is shown below:

Chapter 1 – Introduction
  • The Demo Application
  • The Source Code
Chapter 2 – Brief Overview of WPF and MVVM
  • WPF
  • Learn More about WPF
  • MVVM
  • Learn More about MVVM
Chapter 3 – View Architecture Overview
  • BubbleBurstView
  • BubbleMatrixView
  • BubbleCanvas
  • BubbleView
  • GameOverView
  • What Should a View Do?
Chapter 4 – ViewModel Architecture Overview
  • Core ViewModel Classes
  • BubbleBurstViewModel
  • BubbleMatrixViewModel
  • Creating Bubbles with BubbleFactory
  • Finding Bubble Groups
  • A ViewModel is a Model of a View
Chapter 5 – Animated Transitions
  • What is an Animated Transition?
  • Designing for Animated Transitions
  • Animated Transitions in BubbleBurst
  • Creating Animated Transitions in the ViewModel
  • Displaying Animated Transitions in the View
Chapter 6 – Unlimited Undo with Animated Transitions
  • Responding to User Input
  • Creating Undo Tasks
  • Managing Bubble Locations
  • Benefits of a Task-based Architecture
Chapter 7 – The Game-Over Dialog
  • Opening the GameOver Dialog
  • Closing the GameOver Dialog
Chapter 8 – Recap
  • Recap
Special Thanks
About the Author

If you are interested in learning more about my e-book, please click here.

Enjoy!

Advertisement

36 Responses to My book about Advanced MVVM

  1. Christian Schuster says:

    I really like the book but there is one thing that’s really bothering me: I don’t have an ebook-reader and therefore would prefer to print the book. However this nice “Adobe Digital Editions” Software that I was told I was required to even view the document doesn’t allow me to print it because it was disallowed by the publisher.

    Could you provide a printable version too?

    Thanks in advance!

  2. Josh Smith says:

    Thanks Christian! I don’t see a way to enable printing. I was reading about it, and it looks like Lulu (the e-book publisher) explicitly prohibits it.

    [EDIT] You can now purchase a hard copy (i.e. paperback) of Advanced MVVM here.

    Josh

  3. Pablo Alarcón says:

    Hey Josh, congratulations on finally publishing the book 🙂

    On the other hand I think that we don’t have the minimum info about the book published: ToC, number of pages, chapter excerpt… I expect you would sell more copies if you publish the ToC.

  4. Josh Smith says:

    Thanks Pablo. I was just about to finally go to bed, and then you go and drop that excellent suggestion in my lap! 😀

    I’ve added the ToC to this post.

    Thanks a lot!
    Josh

  5. Samuel Jack says:

    Josh,
    Excellent idea, and the sample application looks good. How about adding a chapter or two about testing MVVM applications? After all, that is one of the main reasons for using the architecture.

  6. Josh Smith says:

    Thanks for the feedback, Samuel. I wrote about testing ViewModels in my MVVM article in MSDN Magazine. Is there something that you’d like to know more about that was not covered in that article? Please let me know, if you get a chance.

    OK, I seriously need to go to sleep now…

    Josh

  7. I just bought it, it looks pretty good. Thanks for publishing this !

  8. Josh Smith says:

    Thank you, Thomas. I appreciate it!

  9. Awesome and timely. Looking forward very much to reading this!

  10. timheuer says:

    Hey Josh — congrats on this. I generally like Lulu myself, but since I don’t use Adobe Reader, I can’t use Digital Editions — is there a way to enable alternate formats? Perhaps could you publish to the Kindle format on Amazon as well?

  11. Brian says:

    Same issue as others, purchased e-book for reading on vacation. Wife says no laptops on vacation. I need a printable version ASAP. Even if I wasn’t going away reading old school paper is still the way to go.

  12. Brian Rogers says:

    I’ll second the call for a Kindle format, assuming you want to stay with something with DRM (understandable). I’d like to be able to read it on my iPhone or on the really slick Kindle software on my PDC tablet.

  13. Robin Hay says:

    Fine book, but what a pain in the neck getting the book. Lulu, Abode stink. A huge pile of s/w on my machine that I don’t want.
    Still a good book though.

  14. Raul Rangel says:

    Ohhh I’m excited!

  15. Josh Smith says:

    Thanks for all the feedback. I gather that this DRM-protected PDF format is universally loved. Sorry for the trouble…this is my first time publishing an e-book so I’m not sure yet how to best go about doing this.

    I’ve submitted my e-book to be available on the Amazon Kindle. I’m waiting for them to review and accept the e-book. I’ll let you know when they make it available in the Kindle Store.

    I’m also looking into how I can make hard-copies available for people who prefer reading the book on paper. I will keep you posted on this, too.

    I’m trying my best to give people other options. Hold tight!

    Thanks,
    Josh

  16. Bob says:

    Hey Josh, just bought the book also and I will echo the dissapointment that I can’t print the book out. On the flip side, its great to see someone thinking outside the proverbial box to create something for the community and still get renummerated for your efforts… If you figure out how to distribute a hard copy, let me know.

  17. Josh Smith says:

    Hey everybody. I have made ‘Advanced MVVM’ available for purchase as a hard copy, for those who prefer reading a book on paper. It’s more expensive than the digital version due to production costs, but it’s worth it if you don’t want to read the book from a computer screen. I cannot enable printing without losing my DRM protection, so this is the only viable alternative I could find.

    You can get the hard copy edition here: http://www.lulu.com/content/paperback-book/advanced-mvvm-(hard-copy)/8353355

    Thanks for all your input. I really appreciate it!

    Josh

  18. Bob says:

    Thanks Josh – For those of you trying to decide which version to buy, just as an FYI, copy & paste doesn’t work in the original version, nor can you click on links so it might be worth the extra $10…

  19. Josh Smith says:

    Thanks Bob, those are good points. I hope that this paper edition helps more people enjoy the book.

    Josh

  20. Robert says:

    This sounds great, I’ve been struggling with learning both WPF and MVVM at the same time.

    To be honest, I’m not so much concerned with transitions and all the fun graphics stuff as I am with the fundamental architecture; most MVVM applications I’ve seen on the web are extremely trivial. When I look in the web and see basic questions like, “How to open a window” the proper MVVM way everywhere, and the answers are all over the map, I can’t help but think that everyone is so busy rushing for all the “pretty” stuff, that the basics are ignored.

    I hope your book will cover subjects like using the Messenger and ViewManager classes. Again, answers on these questions are all over the map on the different forums.

    I do want to take the opportunity to thank you for all your hard work. It is greatly appreciated.

  21. Josh Smith says:

    Robert,

    Thanks for your feedback. I’m glad you took the time to share your thoughts with me about this.

    The book’s coverage of animated transitions is framed in the context of enhancing the user experience of a game, granted, but the general concepts and techniques it provides can be applied to any application. Many business apps can benefit from having transitions, such as bringing data forms into and out of view in an intuitive manner. Providing the user with input validation error messages in an appealing way (i.e. not jarring or inconspicuous) is another example.

    As the book explains, transitions are not something that you can easily just “tack on” later. If they are required in the UI, they become a significant aspect of the ViewModel architecture, as well.

    I hope you enjoy the book!

    Thanks,
    Josh

  22. Srikanth Kotagiri says:

    Hi Josh,

    I am not sure what to say. The game is so interesting that I usually forget why I started the debug session :(. Seriously neat read so fat.

  23. Dear Josh,

    I finally got a debit card to buy your Advanced MVVM ebook, however it was a such a hard task because my country(Iran) is located in the hell so every ordinary things that people can do around the world easily is a pain in my damn country(country leaders).

    But now I am very happy that I could finally bought your ebook and I started reading it.

    Thanks a lot.

  24. Josh Smith says:

    @Srikanth – I know what you mean, I’m addicted to the game! I justified the time spent on it as “testing” 🙂

    @Ali – I’m glad you were able to get the book. I hope you find it was worth the effort.

  25. John Lorenzen says:

    Hi Josh,

    When I saw that you wrote a book on Advanced MVVM i was very excited I am working on a very large application written entirely in WPF and we are starting to retrofit MVVM. My only complaint is I wish instead of a game you would have presented a more real world application. I hope you would consider this with any additions to your book or future books on MVVM.

  26. Josh Smith says:

    John,

    I chose to write about a game for a few reasons. There is already a lot of great content on the Web showing how to create line of business apps using MVVM, including my MVVM article in MSDN Magazine. I think using a game as the subject matter helps to show that MVVM is not just useful for creating business apps. Also, demo business apps need to be “real-world” in order for them to be relevant.

    Defining what constitutes “real-world” is open for interpretation. Explaining the business use cases to the reader is (a) boring and (b) time consuming. On the other hand, anyone can grok the “business rules” (to use the term loosely) of BubbleBurst. That simplicity helps the reader focus on what really matters: how difficult design problems were solved using MVVM.

    As I’ve mentioned in other replies to this same question, the techniques and concepts used in the book are transferable to other types of applications. The information delivery mechanism is largely irrelevant. However, I appreciate your feedback and will take it into account in the future.

    Thanks,
    Josh

  27. Joe says:

    Hi Josh,

    While I really appreciate your work (and I’ve purchased your e-book) I really want to harp on what you have in your intro:

    “The Model-View-ViewModel design pattern is a hot topic in the WPF and Silverlight community these days. There is a lot of great information available on the Web to help people learn the basics of the pattern, but eventually the free ride comes to an end. There are some common design problems inherent in most MVVM applications whose solutions are neither well known nor documented. This e-book exists to help fill that gap.

    By the time you have finished reading this e-book, you will have learned best practices for overcoming those common hurdles. I have successfully used all of the techniques presented here in production applications and know from experience what works and what does not. In addition to tackling some specific MVVM design problems, we will also review the high-level architecture of a WPF/MVVM application and discuss the decision that went into creating it.”

    Now, considering you are now releasing this book in 2010, while your first article MSDN article was in early 2009, the statement ‘the free ride comes to an end’ really leaves a bad impression for one who still has question implementing this within an enterprise application and chooses to purchase this e-book (only to find such an introduction).

    While it’s nice you choose a very simple point and ‘click’ example for a game –why not choose a game or example in which its user-interface is not so simple?

    For example, complex user interactions, such as dragging and dropping, scaling, rotating and translating objects through mouse movements separating the UI from the ViewModel while still being able to easily ‘data-bind’ all of these properties and commands. (…and please tell me that you don’t expect 100% zero code-behind in any of these views…)

    Now, not only do I have to deal with complex UI with this ‘MVVM’ method, but I have to throw it all into the big ‘Prism’ salad. (Yes, I love not knowing where to find any of the pieces when I debug and they fail.)

    Perhaps I’m naive and just don’t see the same gestalt you do, but from what I have seen in over the past year, my attempt at MVVM is a slightly steaming pile of fail.

    Thanks for the insight; thumbs up for the extra insight, thumbs down for the extra insight in the intro.

    – Joe

  28. Josh Smith says:

    Joe,

    My book answers questions that I’ve seen a lot of people ask on forums over the past year or so. That was my goal, but of course I can’t please everyone and answer all the important questions people have about MVVM. I hope you find my book helpful, at least in some ways. Thanks for your feedback.

    Thanks,
    Josh

  29. Joe says:

    Hi Josh,

    I apologize if I came off a little harsh, but it was just that MVVM has been a source of frustration when trying to apply it to a rather complex application.

    In fact, having read your MSDN article early last year, I purchased the book with the hope that it would help fill in some of the gaps –in fact, I do not doubt that there is good information in there (in all fairness, I’ve only looked over the index and have not yet started to read it).

    I think the main gripe I’ve had with MVVM is the lack of standardization, tools, etc. At least now with the MVVM Toolkit, XAML Powertoys and other contributions, it is starting to solidify. However, it seems there are still many different techniques out there and no one “silver bullet”. Hopefully that will change soon.

    On that note, thank you for your contribution in helping others like me try to find the “best practices” to use this pattern. We really do need more literature out there on this pattern in book form.

    Regards,

    Joe

  30. Josh Smith says:

    Joe,

    Thanks for the positive feedback. I must disagree with the “silver bullet” comment, though. There will never be a “silver bullet.” Software is complicated and specific, while design patterns are simple and generic. There is always room for interpretation and adaptation.

    Josh

  31. Joe says:

    Josh,

    Ok, after reading your book, I have to say “Wow!” Not only have you managed to help me understand some of the frustrations I had with MVVM development, but your book also made some good points (which I shared with my development manager) and reinforced with real examples of issues I faced working on a project using that pattern.

    I was very (pleasantly) surprised reading your take on the code-behind vs. NO code-behind mentality. I myself prefer the middle ground, but for some time was forced to do the latter. Yes, it did create several layers of very difficult to follow, understand and maintain code; from your notes and my examples, I was able to reach a compromise on how we should utilize ‘code-behind’.

    Now, an interesting story –our architect chose the MVVM pattern after reading your article in MSDN in 2009. However, they chose to enforce “no code-behind” at all for the sake of testability.

    The book is awesome; if you can mix MVVM with Prism and come up with a nice 300+ page book with some nice distilled information like that, I’d a) like to help write it; and b) shell out at least $50.00.

    Cheers!

    Joe

    P.S. you’re right, there is no “Silver Bullet”; however, it would be nice to have some guide or set of documentation as to what works well when and where, especially when certain design patterns are applied to solve a problem.

  32. Josh Smith says:

    Wow! Thanks a lot for the thoughtful, positive feedback, Joe. I really appreciate it!!

    Josh

  33. […]  After Joe read the book his apprehensions about it disappeared, and kindly he left me this comment about it: […]

%d bloggers like this: