What Ive tried to do with writing this book is to tell a story that takes you, the reader, through the process of moving from .NET development over to Windows Store app development. There is a slight bias in the book in that Im assuming most developers have day jobs developing web applications and have been asked to look into development tablet apps that run on Microsofts tablet operating systems.
Some of you will also have done quite a bit of desktop development on Windows, particularly using Silverlight and/or Windows Presentation Foundation (WPF). This book isnt a primer on developing XAML, although you will see and work with enough examples that use XAML to become proficient.
Ill also tell you a bit more about the app well be discussing so you can judge if this is the right book for you. The app has within it the common sorts of functionality that you find in line-of-business apps (LOB) generally. At the time of writing, the Windows tablet story is not established, so the elements that well go through are those that apply to real applications on Windows Mobile, Android, and iOS that Ive built over the past 10 years or so.
Although the application that well build is a LOB app, everything youll see and do in this book applies equally well to a normal retail app that you might sell in a business-to-consumer fashion.
The Application
As I mentioned, were going to build a line-of-business app, rather than a retail app. The way that I distinguish between these two is that in a retail app, the software vendor typically doesnt have a strong relationship with the end customer. In retail, the end customer finds the app through indirect recommendations and/or through the app store catalog. In a LOB app, proactive marketing and relationship-building activities look to tie a client and vendor together through some sort of commercial offering. Technically, however, there isnt a big difference between retail apps and LOB apps.
The specific example Im going to show you is a field service app. This type of app is a classic mobile working application. In field service you have a number of operatives whose operational control is within your remit. You send them out into the field to do somethingeither something specific (go here, fix this), or something reactive (e.g., someone patrols an area and reports back on problems).
The app we will build will be called StreetFoo, and its a blend of those last two examples. I have created a simple server that is hosted on AppHarbor that will serve as the backend service for the app. When the user logs in to the app, it will download a set of problem reports. Each report will be something that needs fixingthe sample data happens to show graffiti, but it could be anything. The concept of the app is that the user would then either fix the problem or could report new problems into the app. Updates to problems or new problems are then updated to the server.
Thats the basic functionality. There are additional things that well look at, such as capturing photos and location information, as well as all of the various special user experience features in Windows 8.1/Windows 8.1.1 RTsharing, snapped view, search, and so on.
The Chapters
Well start in Chapters with a primer designed to get you up and running in terms of moving from .NET into this new world.
Starts by explaining the break between .NET and associated technologies (specifically WPF) over to Windows Runtime (WinRT). Youll then build a basic user interface and implement a Model/View/View-Model (MVVM) pattern.
Walks you through making the UI you built in do somethingspecifically, calling up to the server to register a new user account. This chapter also has a detailed look at asynchrony probably the most important thing that you will learn during your time with Windows Store app development.
The remaining chapters in this book each focus on a specific API feature area.
Explores SQLite. The reason Ive brought up this topic so early in the book is that you cant build a practically useful application without having some sort of persistent store. Although you can store information on disk easily enough using the Windows Store APIs, SQLite is the de facto relational database used in mobile solutions, and so well use it in our app.
Introduces the first of the special Windows 8.1 user experience (UX) features: the app bar. App bars are the small panels that pop in from the top and bottom of the screen and provide access to options and tabs. (The app bar is essentially analogous to toolbars.) Well look at how to build an app bar and how to make up our own images for use on the buttons.
Discusses notifications. Notifications in Windows Store apps can be used to update the tile on the Start screen, add badges to the tile, and display toast (the notifications that wind in from the top-right side of the screen). Notifications can be created locally and shown locally, or alternatively, created on the server and pushed out to all connected devices using Windows Push Notification Services (WNS). In this chapter well look at both routes.
Looks in detail at working with files. To be honest, when I first planned this book I didnt intend to include a chapter on files, as this tends to be a topic well served by the community whenever a new platform is introduced. However, I ended up adding this chapter to handle images. Each report that we track in the app will have exactly one image. Rather than storing these images in SQLite, which is impractical, well store them on disk.
Focuses on the Windows 8.1 sharing feature. Sharing is one of the key differentiators between Microsofts tablet strategy and other platforms. Most platforms silo off apps and make it hard to share data. Windows 8.1 has a declarative model for sharing where apps indicate they can serve up certain types of data. That data can then be read in by another app that supports consumption of shared data. In this chapter well look at both sharing data from our app and consuming data from other apps.