Windows 8 MVVM Patterns Revealed

Author: Ashish Ghoda
Publisher: Apress
Pages: 148
ISBN: 978-1430249085
Audience: Existing C# programmers
Rating: 3.5
Reviewer: Ian Elliot

Windows 8 or specifically WinRT apps are ideal candidates for MVVM because, using XAML or HTML allows you to separate View from everything else very easily. This book offers to reveal the pattern for you. 

The subtitle is "Covers both C# and JavaScript" and the first four chapters are about C# with two final chapters discussing JavaScript.

Chapter 1 is an introduction to Windows Store app development using Visual Studio. There is a very short introduction to the View, ViewModel, Model class, but don't blink because you might miss it as it's just page and a half. The chapter also introduces the single example that runs through the entire book. In fact the best way to describe the book is to say that it is an explanation of this example and its development using the MVVM pattern. 

 

Banner

 

Chatper 2 explains the process of implementing the View and you will see a lot of XAML code. No drag-and-drop designer for this UI its all hand coded. It is all very detailed and it is difficult to see any general ideas. 

Chapter 3 moves on logically to developing the Model. No database was harmed in the making of this data retrieval system only the Windows local storage classes and serialization are used. 

Finally we reach the ViewModel in chapter 4. This introduces the idea of inversion of control using the Metroloc container from CodePlex. Be prepared for lots of C# code and more XAML. At the end I couldn't help think that coding such a simple app shouldn't be this complicated but the benefits of using a pattern like MVVM really only start to be felt when the application gets a bit bigger. With this example you can't but help notice the overhead involved in structuring things in this way. The book really doesn't go in for discussing the philosophy of the approach, so if you aren't already sold on the idea you might be left wondering why it's all so complicated. 

Chapter 5 moves us into the JavaScript HTML area of the book. It starts off with an overview of JavaScript development under Windows 8 and provides some basic details of programming in JavaScript. It reads like a conversion course for a C# programmer. If you are in need of such a conversion then this will be quite insufficient and leave you wondering what JavaScript is all about. The project used to illustrate the MVVM pattern is based on the use of the Knockout MVVM library. 

 

 

Windows8mvvmpatternsrevealed

 

The final chapter is basically a reimplementation of the project developed earlier but in JavaScript and Knockout. It is basically a presentation of the code with explanations. The pace is much faster because is covers what takes three chapters in C#. Again there are a lot of long listings.

The JavaScript part of the book is more or less tagged on and really only serves to let the C# programmer see how it would be done in JavaScript. If your main interest is developing JavaScript apps this probably isn't going to help you unless you are prepared to read the C# chapters. 

If you are a C# programmer then it is a reasonable example of creating an app using XAML, but only if you are prepared to work through the example for real. This book doesn't have a lot of value if you plan to just read it, especially if you are going to just skim read the code. It is a detailed rather than overview sort of book and won't suit anyone who wants to have things mostly explained rather than just shown. 

 

Banner


Computer Architecture (No Starch Press)

Author: Charles Fox
Publisher: No Starch Press
Date: May 2024
Pages: 560
ISBN: 978-1718502864
Print: 1718502869
Kindle: B0BZH1LB1F
Audience: General
Rating: 4
Reviewer: Harry Fairhead
No, not architecture via a computer - the architecture OF computers.



Math for Programmers (Manning)

Author: Paul Orland
Publisher: Manning Publications
Date: January 2021
Pages: 688
ISBN: 978-1617295355
Print: 1617295353
Audience: Python developers interested in math
Rating: 4
Reviewer: Mike James
Of course you need to learn math, don't you?


More Reviews

Last Updated ( Wednesday, 20 November 2013 )