The complete name of the book is Building Enterprise Applications with Windows Presentation Foundation and the Model View ViewModel Pattern by Raffaele Garofalo and published by Microsoft Press (2011). This is really short book (225 pages) and has a very promising title, I got it in the OReilly stand in the MIX11 Conference a few weeks ago and took me just a few hours for reading (long trip from LAX to MEL!).
As I said before the title looks promising and has the “Enterprise Application” slogan as a very important thing (whatever enterprise application means in those days). The book promises some very ambitious points like:
- Dive deep into MVVM
- Build a simple Customer Relationship Management application
- Create a Domain Model
- Write dynamic code for data access with the Entity Framework
- Enforce complex data and validation scenarios with Workflow Foundation 4
- Implement MVVM using Prism
The book started tyring to explain what is the MVVM pattern and its relation with Line of Business Applications (LOBs) and how MVVM and Composite Application patterns relate themselves to solve LOB’s problems… For some reason in this chapter the author starts telling you now about separation of concerns and three tiering and layering… (you know I don’t like how people uses the term “layered application”). For some reason in this chapter also introduce Expression Blend and how a LOB is composed (in things like Menu, Toolbar, Ribbon, etc…) weird… I know…
In the chapter two we read about what is a pattern, mention common patterns and try to explain the different Presentation Patterns (MVC, MVVM, MVP). In this chapter the author introduce concepts like IoC using Unity and differences between Unity and MEF (well, good to know). After this is never late to talk about Fluent Interfaces and DSLs and how to do unit testing… Yeah…
After all of this the author start talking about Domain Modeling, and Domain Driven Design… yeah, but wait a minute… why he started talking about the relation between DDD Domains and Layering? what? if you are a DDD fan like me beware of this chapter, the author is just confused about DDD/Layering (damn, I don’t like that word!) and how to represent an object in a pure domain approach.
Later chapters are about Data Access Layer (and how the author relate it with DDD and the domain logic), the Business Layer (and how to represent domain validation rules in Workflow Foundation 4) and the book end with a chapter about creating an UI layer with all those concepts toghether. Something really bothered me was the sample code for the UI Layer with MVVM chapter, you just learn about the existence for the WPF Ribbon Control from Codeplex, that’s all…
Personally the only chapter I liked was the last chapter about MVVM frameworks and toolkits, he just mention those frameworks but some of them were totally new to my knowledge.
I must say the true, I will give only one start to this book, if you like code, this is not a book for you, if you like a good set of samples and the reason behind the facts, this book is not for you, if you want to learn how to use Prism and MVVM, this book is not for you either (it only mentions Prism and how it relates to MVVM), if you want to learn how to implement your applications using MVVM pattern, this book is not for you… really…
If you want to know what is MVVM and in some way how it relates with some other concepts (sometimes not really related at all but well, what do I know?) maybe this book is for you (but anyway you can get those concepts for free in the internet too) or if you have some hours to spare and someone give you that book for free maybe this book would be a choice.
I know talk about MVVM in just 200 pages must be a hard work, so nice trying…
