Windows Runtime via C#

Authors: Jeffrey Richter and Maarten van de Bospoort
Publisher: Microsoft Press, 2013
Pages: 320

ISBN: 978-0735679274
Print: 0735679274
Kindle: B00JDMQK2I

Audience: C# programmers
Rating: 4
Reviewer: Ian Elliot

With Windows 10 on the horizon Windows Runtime might become more important. Does help you find out the inner details?

The Windows Runtime via C# is not really a look at the way the system works. Rather it's an advanced look at the API through the managed wrappers that .NET puts around the extended COM objects that make it up. If you are looking for a book that takes you inside COM objects and the whole new system of  dynamic runtime objects. you need an alternative book. The fact that we are using COM objects with .NET style metadata is referred to a few times on the way to describing how managed code works with WinRT, but not enough to enlighten. You also get a number of asides about how the system is made to work with other languages, but these die away as the book progresses and it settles down into just being about using WinRT from C#.

 

Banner

 

The first part of the book, Core Concepts, has three chapters that covers general topics. The first chapter explains what the Windows Runtime is. It explains that it is COM with metadata, but you don't find out too much that is practically useful about either. You also get a high level view of the type system and how this is packaged by managed code. The important topic of using WinRT's asynchronous methods is also described in detail. 

Chapter 2 is about the relatively tedious but important topic of packaging and deployment. It is a mark of how things have changed that manifests and certificates play such a role in creating apps. It is also a shock to read a full account of how you can deploy such apps. Usually the documentation just tells you how lucky you are to be able to sell your app in the Windows Store. If you want to know about enterprise deployment then you have to look quite hard to find the info.

The book states clearly that there are only three ways to deploy an app. You can deploy as a developer using a developer certificate. These have to be obtained from Microsoft and while they are free they expire every 12 months and have to be renewed. If you are trying to create an app for use by friends and family this is the way to do it but it isn't fun or rewarding. Alternatively you can use an Enterprise deployment but the client machines have to be on a domain and they have to have professional grade Windows. Finally you can submit your app to the Windows Store. 

Given that Windows 10 will allow WinRT apps to run on the desktop, they suddenly become attractive to many more programmers. However, given the difficulties of actually deploying such apps it still isn't going to be acceptable to every one. It makes you wish for the simpler days when you wrote an app and it was up to the users to decide what ran on their computers. 

 

windowsruntimeviaCsharp

 

Chapter 3 is about the process model - which will also come as something of a shock if you are used to desktop apps which just get loaded and run until they finish. WinRT apps can be unloaded by the OS anytime the space is needed. The account of the app lifecycle is detailed but not more so than you can find in other books. 

Part II is called Core Windows Facilities and it works its way through the OS services provided by WinRT. Some of these will be familiar to a desktop programmer, but some are required because of the sort of devices WinRT apps will be running on. Its first three chapters are all about data in one form or another - package data, roaming, files and folders and stream I/O. Chapter 7 is about networking including sockets. Chapter 8 moves on to non-XAML based UI features, i.e. tiles and toast notification. Chapter 9 is about background tasks, Chapter 10 deals with sharing data and the book rounds off with a deeper look at the Windows Store. 

This is a difficult book to categorize. It misses out on all of the XAML UI construction techniques and hence all of the controls and widgets that make up the UI. It is a very code-oriented book and so you don't get any info on the use of the drag-and-drop designer or anything much about using Visual Studio. You also get lots of large code blocks in the text and quite a few detailed tables. It is well written, but because of its approach and the subject matter it isn't an easy read. 

This is trying to be an advanced book introducing you to WinRT via C#, but it doesn't work as well as, say, explaining Win32 via C++ because C# and the managed wrappers put quite a bit of distance between you and the underlying API. In other words, it isn't really "Windows Runtime via C#" but "Windows Runtime In C#" in the sense that you are learning a specific approach to WinRT and not the inner workings of the system.

Does this matter?

Probably not as, if you are working in C#, it is the managed wrappers you see and work with. However, this also means that the need for a book of this sort is much less. You can learn just as much from an easier to read guide to building WinRT apps that uses Visual Studio and goes into the UI in more depth and explains WinRT as the need arises. 

Read this book if you want a technical guide to WinRT that supplies background material and focuses on specific subsystems. It isn't a practical advanced guide to creating WinRT apps and it certainly isn't essential reading.

 

Banner


Street Coder (Manning)

Author: Sedat Kapanoglu
Publisher: Manning
Date: February 2022
Pages: 272
ISBN: 978-1617298370
Print: 1617298379
Kindle: B09Q3PJQC5
Audience: General
Rating: 4
Reviewer: Ian Elliot
Street Coder - sounds sort of tough but messy at the same time.



Android Programming: The Big Nerd Ranch Guide (5e)

Authors: Bryan Sills, Brian Gardner, Brian Hardy and Kristin Marsicano
Publisher: Addison-Wesley
Pages: 688
ISBN: 978-0137645541
Print: 0137645546
Kindle: B09WLF84W7
Audience: Kotlin programmers
Rating: 4.5
Reviewer: Mike James  

The Big Nerd Ranch Guide to Android is bac [ ... ]


More Reviews

 

 

Last Updated ( Saturday, 18 October 2014 )