Notes from “The New Era of Work” Microsoft Launch Event
November 27, 2012 2 Comments
On Tuesday, November 27, 2012, Microsoft held a launch event at the Chase Park Plaza hotel in St. Louis. This even focused on Windows 8 and Microsoft Office 2013. I attended the Developer track, which included sessions on Windows 8, Windows Phone, and Microsoft Azure. Following are my notes from the event.
Session 1: Building Modern Apps
“Modern Apps” means “Windows Store Apps”
Side-loading is allowed within corporations. This is accomplished with a "Push" model via enterprise infrastructure (desktop management services). Side-loaded apps are not placed into the Windows Store.
The app package that is loaded to the store or used for side-loading is a ZIP file containing specific information (including the app manifest).
It is possible to create "background tasks" that get CPU resources at all times. This is distinct from regular apps, which are suspended (NO resources are allocated to them) when moved to the background.
Suspended apps are placed onto the heap as-is, and receive no more resources unless "re-started". They might eventually be terminated (without regaining focus). As a developer, you have 5 CPU seconds to save your application’s state when it enters a suspended state.
Session 2: Designing Modern Apps
http://design.windows.com – 300 pages of design documentation
Windows Store apps should not have "chrome" (min/max buttons, navigation bars, buttons, etc)
Build a great Windows 8 Store app in 5 steps
1) Create a "best at" statement
- One sentence
- Be specific
- Answer this: How is the app different from others in the same category?
2) Choose the right scenarios
- Brainstorm a bunch of scenarios for use of the app
- Remove scenarios that don’t directly line up with the "best at" statement
- Find 3-5 key scenarios
3) Pick a navigation pattern
- Hierarchical – Selecting GUI elements drills down into more details.
- Flat – Scroll right and left to view more information. Top bar can be used for additional navigation (to show a new set of information, which also scrolls right/left).
4) Layout the content
- Use fonts consistent with recommended styles
- Align elements to a grid. Leave space on sides and at top/bottom to give room for native Windows 8 navigation elements.
- The "Hub page" of the app should reflect the "best at" statement and key scenarios.
- Let Visual Studio help (templates)
5) Create app bars
- Brainstorm features for the application
- Remove features that don’t related to the app’s key scenarios
- Remove features that leverage Windows 8 charms (Example: search should be implemented via the Windows Search contract, rather than natively within the app. Implementing search via the Search contract allows users to search your app’s content from anywhere in their system at any time)
- Sort remaining features by scenario
- Group commands into related sets
- Place global commands at left of the app bar (bottom of screen)
- Place contextual commands at right of the app bar (bottom of screen)
- Keep command sets in consistent positions throughout the app
Session 3: Introducing Windows Phone 8
Three phone APIs (project types for each in VS 2012):
- .NET API for Windows Phone – Managed
- Windows Phone Runtime – Managed and Native
- WIN32 & COM – Native
Windows Phone Runtime is subset of full WinRT, with some phone-specific extensions
Development machine requirements for created Windows Phone apps:
- 4GB memory
- Windows 8 Pro
- CPU must support SLAT (more info here)
Most Windows Phone 7 apps will run unchanged on Windows Phone 8.
Session 4: Everything Web Developers Must Known to Build Modern Apps
Most any web app that runs on IE10 will run unchanged (or minimally changed) on Windows 8.
Host (Windows 8) checks and prevents potentially harmful HTML from being inserted into a page (via innerHTML, outerHTML). There are code workarounds (ways of telling the OS to allow the "dangerous" action).
- Appears to provide much of what jQuery provides
- Also provides many Windows-specific hooks, including hooks to OS events like "app starting" (including info about origination event) and "app suspending".
- Apps are not required to use WinJS
Session 5: Building Windows Store Applications With XAML
Asynchronous programming is becoming the norm, and Windows 8 apps should embrace the asynchronous model.
Asynchronous programming models on Windows
- Windows Runtime: IAsyncOperation<T>
- .NET Framework: Task<T>
- Are marked with the "async" modifier
- Return void or Task<T>. Task<T> was introduced in .NET 4.0 as part of the Task Parallel Library, which is the .NET Framework preferred way of writing multi-threaded, asynchronous, and parallel code.
- Use "await" operator to yield control (apps are resumed when awaited operation completes)
- Allow composition using regular programming constructs
Example async method:
No native SQL Client APIs within WinRT. To access a database, it needs to be fronted with a service.
The open source SQLite project has created a version of their product that runs on Windows Phone 8 and Windows Runtime. There is no version of SQL Server that runs on those platforms.
Session 6: Building Windows 8 Apps with Windows Azure Mobile Services
Mobile Services provides data storage, notifications, authentication, diagnostics, logging, compute scaling, and storage scaling.
When you create a new mobile service, "Getting Started" code is provided for Windows 8, Windows Phone 8, and iOS.
Azure Channel URIs allocated to an application for Push Notifications will become invalid (reclaimed by Azure) if not used for 30 days.