Creating Windows Store Apps Using Visual Basic Bill Burrows | UW Faculty Member & VB MVP Anthony D. Green | Program Manager, Microsoft
Meet Bill Burrows Senior Lecturer Emeritus – Foster Business School University of Washington 30+ years teaching a variety of IT courses Published college textbooks on introductory programming concepts using Visual Basic Creator of myVBProf.com tutorial web site Microsoft MVP (Visual Basic) Academic MVP 2001 - 2004 VB MVP 2008-2014
Meet Anthony D Green Program Manager, Managed Languages (VB/C#/F#) team at Microsoft Currently Roslyn Project Visual Basic Team Member Software Consultant in Chicago WinForms, ASP.NET, WPF, Office, SQL Server, and Dynamics CRM Programming in various BASIC programming languages since age 14
Creating Windows Store Apps Using Visual Basic Course Topics Creating Windows Store Apps Using Visual Basic 01 | Modern Design – Focus on Fast & Fluid 04 | State Management 02 | Visual Studio & Windows Store Apps 05 | Client Storage Options 03 | Building AdventureWorks Sample 06 | App Bars, Flyouts & Other UI Considerations
Setting Expectations Target Audience VB Developers looking toward Windows Store Apps Suggested Prerequisites/Supporting Material Windows 8.1 Product Guide: What's new for developers http://msdn.microsoft.com/en-us/windows/apps/bg184615.aspx Windows 8.1 Feature Guide http://msdn.microsoft.com/en-us/library/windows/apps/bg182410 Modern Design http://msdn.microsoft.com/library/windows/apps/hh781237
Course Material www.myVBProf.com PowerPoint Slides Demonstration Code Demonstration Code Comments www.myVBProf.com
Join the MVA Community! Microsoft Virtual Academy Free online learning tailored for IT Pros and Developers Over 1M registered users Up-to-date, relevant training on variety of Microsoft products
01 | Modern Design – Focus on Fast & Fluid Bill Burrows | UW Faculty Member & VB MVP Anthony D. Green | Program Manager, Microsoft
Module Overview Modern Design Overview Blocking the UI Thread Modern Design – Screen Layout
Modern Design Overview
Modern design Pride in craftsmanship Fast and fluid Authentically digital Do more with less Win as one
Fast and fluid – the 50 millisecond rule “Keeping apps fast and fluid with asynchrony in the Windows Runtime” * To achieve those goals, we made many potentially I/O-bound APIs asynchronous in the Windows Runtime. These are the most likely candidates to visibly degrade performance if written synchronously (e.g. could likely take longer than 50 milliseconds to execute). * blog post from Jason Olson, Program Manager, Windows, March 20, 2012
Fast and fluid – WinRT asynchronous API Displaying a message dialog. Working with the file system, including displaying a file picker. Sending and receiving data to and from the Internet Sockets, streams, connectivity Appointments, contacts, calendar Working with file types, such as opening Portable Document Format (PDF) files or decoding image or media formats Interacting with a device or a service
Blocking the UI Thread
Blocking the UI Thread
Important Concepts - Threads An await expression in an async method does not block the current thread while the awaited task is running. The async and await keywords don't cause additional threads to be created. Async methods don't require multithreading and are not the same as parallel programming.
Important Concepts – A Promise An async function gives back a Task immediately, but that Task is just a placeholder: The real result is delivered sometime later. When the async method eventually completes its work, the task is marked as completed and the result, if any, is stored in the task.
Important Concepts – Really Important A method modified by the Async keyword contains at least one Await expression or statement. The method runs synchronously until it reaches the first Await, at which point it suspends until the awaited task completes. In the meantime, control is returned to the caller of the method, e.g., a Click event returns control to the UI thread (that called it) allowing the UI thread to remain responsive.
Blocking the UI Thread – Synchronous Approach Click
Blocking the UI Thread – Synchronous Approach Click
Blocking the UI Thread – Synchronous Approach Click
Blocking the UI Thread – Synchronous Approach Thread is blocked Click
Blocking the UI Thread – Asynchronous Approach Click Thread is blocked
Blocking the UI Thread – Asynchronous Approach Click Thread is blocked
Blocking the UI Thread – Asynchronous Approach Click Thread is blocked
Blocking the UI Thread – Asynchronous Approach Click Thread is blocked
Summary – Asynchronous Advantage Blocking the UI Thread – Synchronous Approach UI Thread Blocking the UI Thread – Asynchronous Approach UI Thread
Modern Design – Screen Layout
Modern Design - Edges ❶Top app bar – used for navigation. ❷Bottom app bar used for commands.
Modern Design - Charms The charms initiate system interactions.
Modern Design – Left edge The left edge is the user's command center for viewing recently used apps, switching apps, and placing multiple apps on the screen side by side.
Module 1 Review Modern Design Overview Blocking the UI Thread Modern Design – Screen Layout