Don’t store this for too long

Windows Store App Development: C# and XAML by Pete Brown

It would be really hard not to give this 600 page book a solid five out of five stars. Previously I’d read the author’s Silverlight book that provided a very practical guide to writing Silverlight applications. In this book he continues the theme with a book full of practical information which answers all of the questions I had about Windows Store App development using C# and XAML.

The book has some great chapters. It starts by getting the reader to write a simple hello world in chapter one. Chapter two discusses Modern UI (Metro), covering the history and influences, typography and the importance of the grid layout. There is a brief discussion of the Windows 8 UI elements such as the app bar, the charms bar and the use of tiles for giving the user a head-up display on the state of the application. Chapter three covers the Windows Runtime and its relationship to .NET, discussing the modifications to old style COM and how interaction with .NET is very straightforward.

Chapter four starts a series of chapters on the UI with a great (and short) introduction to XAML. This chapters is followed (very logically) by a chapter on the multipass layout algorithm, and then chapters on panels, brushes and graphics, styles and resources and a chapter on displaying beautiful text.

XAML is designed to work against MVVM and so the book next has a chapter on controls, binding and MVVM. There are examples which use the MVVM Light toolkit which makes it easy to separate out the UI from the model, making it easy to use binding to flow information in one direction, and commands to flow events in the other. The next chapter covers view controls, semantic zoom and navigation.

Making the application work well on Windows 8 is the theme for the next few chapters. First a chapter on the app bar, and then a chapter the splash screen, app tile and tile notifications, followed by a chapter on app states which allow LayoutAwarePages to change their layout as the size of the client area changes. Two chapters follow on contracts (for interacting with other applications) and accessing the file system.

The Windows 8 model requires very little blocking of the UI thread in order to keep the UI responsive and chapter 16 discusses the IAsync* interfaces of the Windows Runtime and how they can be made to work well with C# Tasks.

What we have learned so far is demonstrated using a small chat application that is written over the next few chapters. Along the way we find out about networking and sockets, user controls and more information about handling input from the user. The author explains the code really well and discusses many issues along the way.

Windows 8 applications need to appear to be running all of the time when they are in fact suspended by the OS in order to conserve the battery. The penultimate chapter of the book covers the suspend and activation events that the application needs to handle, as well as the points at which state needs to be saved.

The final chapter discusses the Windows Store and the kinds of tests that the application needs to pass to be a valid Windows Store application. The chapter explains how you can run the verification utilities locally and how you make an application that can be side loaded for testing.

The book is really good. Whenever I had a question, the author invariably got around to answering it, and it appears that he has spent a fair amount of times developing Windows Store applications. Now to put it all into practice.

Advertisements
This entry was posted in Books. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s