Presentation is loading. Please wait.

Presentation is loading. Please wait.

Design Patterns for Connected Specialized Devices

Similar presentations


Presentation on theme: "Design Patterns for Connected Specialized Devices"— Presentation transcript:

1 Design Patterns for Connected Specialized Devices
George Roussos Program manager

2 Agenda What is a Specialized Device?
Connected Specialized Device scenarios Acquisitions Scenarios Building a Metro style app for a Connected Specialized Device Specialized Device design patterns Choosing the right design pattern for your device Takeaways

3 What is a Specialized Device??
Devices with Extensible Built-in Experiences Printers Webcam MB SIM Specialized Devices Portable Storage Networked Other

4 Connected Specialized Device Scenarios
Target Scenarios An app for a digital video recorder (DVR) that a user can use to remotely schedule recording shows.   An app for home automation system which controls the lighting in your house and is automatically acquired when it is paired with your PC. An app that looks for new images on a camera and uploads to local storage or photo service in the cloud. A phone app that allows user to synchronize calendar, contacts, tasks, and manage media content on phone. The app may also connect to provider service to provide billing information, data rates, and remaining minutes/texts. A blood pressure monitor app that uploads information to a website so users can track their blood pressure over time and share that information with their family or health care provider. A payment authorization app for a USB credit-card reader that is automatically acquired when a user attaches the reader to a USB port.

5 Acquisition Scenarios
User’s view Automatic Acquisition Physically connected: When the user attaches a USB device to the PC, all device software is automatically acquired, including the Metro style device app that is installed on the Start screen. -- OR -- Wirelessly connected: When the user joins a UPnP device to a home network, the device is either discovered automatically and directly paired to the PC, or the user goes to the Devices page of PC Settings and clicks on  “Add a device”. All device software is automatically acquired including the Metro style device app that is installed on the Start screen. Windows Store Download User goes to Windows Store, manually searches for app, and installs it.

6 Building a Metro style app for a Connected Specialized Device

7 Create your own experience
Approach to building a metro style device app for your connected specialized device 1) Re-imagine your device experience as a Metro style device app Be consistent with the philosophy and principles of Metro style apps Be inspired by smartphone and tablet apps Identify appropriate Metro style scenarios for your device 2) Research if there are sufficient Metro style APIs to implement your scenarios Research the Metro SDK to see if there are sufficient APIs to achieve your scenarios. Do not plan to port your Desktop app – the Metro style platform is very different. See Primer for current Windows developers 3) Identify the right “design pattern” for your app to communicate with your device

8 Components of a Specialized Device App
Device driver Device metadata Metro style app meta + app

9 Specialized Device Design Patterns
A Design Pattern represents the programming model a Metro style app can use to communicate with a Specialized Connected Device. Choose the best Design Pattern for your device based upon the underlying protocol you use to communicate with it. Design Pattern Connectivity Description API Networked Connected over a Wi-Fi network. Sends and receives data over TCP-IP. Windows.Networking Removable Storage Externally connected over USB. Can send and receive files from a device. Windows.Storage Portable Device Externally connected over USB Connected over a Wi-Fi or Bluetooth network. Intelligent device that transfers objects with properties and methods. Windows Portable Device WDF Custom Driver Access Externally connected over USB. Or connected over a Bluetooth network. Transfers commands and data using device IO control. Device Access IDeviceIoContrlol

10 Networked Patterns: UPnP
A networked device with UPnP that presents its functionality on a home or work network behind a firewall. Services presented using XML and information transferred to and from Windows using TCP/IP sockets. Protocols: UPnP, PnP-X, TCP-IP Transport: TCP-IP API: Windows.Networking Advantages Disadvantages Supports ‘Automatically acquired’ scenario Requires PnP-X support in hardware Certain networked device classes are automatically paired by Windows. No user interactions are required. Can’t programmatically pair a networked device from a Metro style app Supported on ‘Windows RT’ Can’t easily enumerate a networked device before it is paired.

11 Networked Patterns: UPnP
Example A network connected home automation controller used to program and manage home lighting. Acquisition Scenarios: Automatic Acquisition, Windows Store Download Device may be automatically paired depending on Category in Device Metadata App will be automatically acquired Device Discovery: Devices.Enumeration + UPnP/SSDP Device Access: Windows.Networking . Device Device metadata Metro style app + meta app

12 Networked Patterns: Private Discovery
Networked device with its own rendezvous mechanism that is Internet-accessible by an online service – such as a DVR programmable over the internet. Information is transferred to and from Windows using TCP/IP sockets Protocols: TCP-IP Transport: TCP-IP API: Windows.Networking Advantages Disadvantages Easy to implement for existing device ‘Automatic Acquisition’ not supported Supported on ‘Windows RT’

13 Networked Patterns: Private Discovery
Example An app for pre-existing digital video recorder (DVR) that a user can use to remotely schedule recording shows. Acquisition Scenarios: Windows Store Download Device Discovery: Your own private mechanism – e.g. user logs into account on device Device Access: Windows.Networking Device Metro style app + app

14 Removable Storage Pattern
Functionality presented as files in a file system Information transferred to and from Windows with simple file access. Protocols: USB Mass Storage Class Transport: USB API: Windows.Storage Advantages Disadvantages Low cost, standard hardware Vendor can’t control which apps access device Supported on ‘Windows RT’ Supports AutoPlay

15 Removable Storage Pattern
Example Navigation Device:  Device with maps and trails data that can be updated from the cloud by PC and app uploads hike metrics to the cloud Acquisition Scenarios: Automatic Acquisition, Windows Store Download Device Discovery: Devices.Enumeration Device Access: Windows.Storage Device Device metadata Metro style app + meta app

16 Portable Device Patterns: MTP
Device content is represented as a virtual storage managed by the device. Object exchange is handled in Windows by WMP, Windows Explorer, and other 3rd party applications that are written on top of the WPD APIs. Protocol: Media Transport Protocol (MTP), Picture Transport Protocol (PTP) ver(s) 1.0, 2.0 Transports: USB, Bluetooth, TCP-IP Restricted Interface API: Windows Portable Device Advantages Disadvantages Existing MTP devices can immediately use. Implementing MTP in device firmware from scratch can be costly Supported on ‘Windows RT’ Protocol is not ideal for devices that primarily stream media to other devices Supports AutoPlay C# requires WinRT Component DLL

17 Portable Device Patterns: MTP
Example A phone app that allows user to synchronize calendar, contacts, and tasks. Acquisition Scenarios: Automatic Acquisition, Windows Store Download Device Discovery: Devices.Enumeration Device Access: Windows Portable Device APIs Device Device metadata Metro style app + meta app

18 Portable Device Patterns: WPD Custom Driver
Intelligent device with functionality that fits into a well-defined object model with properties. Device functionality can be represented as collection of hierarchical storage and/or device services. Protocols: Needs additional protocol layers beyond what is included in Windows 8. Restricted Interface Advantages Disadvantages Low cost, standard hardware Requires a custom driver Supports AutoPlay C# requires WinRT Component DLL

19 Portable Device Patterns: WPD Custom Driver
Example Custom Fitness Device : Bluetooth LE Heart Rate Monitor Acquisition Scenarios: Automatic Acquisition, Windows Store Download Device Discovery: Devices.Enumeration Device Access: Windows Portable Device Device Device driver Device metadata Metro style app + meta app

20 WDF Custom Driver Pattern
A device, such as a USB attached device, that doesn't fit into any of the prior patterns. A custom device driver is required and a privileged application transfers information to and from the hardware via that device driver by sending IOCTL commands and receiving data.. Protocols: Other Restricted Interface API: Device Access: (CreateDeviceAccessInstance(), IDeviceIoControl()) Advantages Disadvantages Can meet needs of the broadest range of devices Costly Requires development and maintenance of a custom 3rd party driver For devices which already have Windows support, the corresponding custom device drivers are most easily adapted to this pattern Limited Only vertical solutions are supported, and only a small # of apps can have privileged access to the device Only designed for custom drivers installed against a specific physical hardware device. Vendor controls which Metro style apps access their device Complex This is the most complicated pattern with the most components and moving parts.

21 WDF Custom Driver Pattern
Example A payment authorization app for a USB credit-card reader that is automatically acquired when a user attaches the reader to a USB port. Acquisition Scenarios: Automatic Acquisition, Windows Store Download Device Discovery: Devices.Enumeration Device Access: CreateDeviceAccessInstance(), IDeviceIoControl Device Device driver Device metadata Metro style app + meta app

22 Choosing design patterns
Choose the design pattern best naturally suited to the protocol and transport your device uses. See handout for help selecting design patterns based upon technology

23 Resources API Samples Networked Private Discovery <none>
Network UPnP UPnP Removable Storage removable Storage Custom Storage Portable Device MTP Portable Device API WPD Custom Driver Bluetooth Low Energy Health Profiles sample Bluetooth Low Energy (LE) Generic Attribute (GATT) Profile Drivers sample WDF Custom Driver Custom Device Access samples

24 Resources Watch 8 traits of great Metro style apps and Platform for Metro style apps Specialized Devices Sessions this week UPnP Removable Storage WDF Custom Drivers Whitepapers Connected Devices Whitepaper in progress: Metro style Device App Design Guide for Connected Specialized Devices PC Internal Devices Metro style Device App Design Guide for Specialized Devices Internal to the PC

25 Take-aways Re-imagine what your app should be for the Metro environment - in a fashion that is consistent with the philosophy and principles of Metro style apps. Be inspired by smartphone and tablet apps Don’t think about just porting your desktop apps Evaluate your scenarios to see if there are sufficient Metro APIs to accomplish them. Choose the right design pattern for your device based upon protocol you use to communicate with it. See follow-on talks for details about design patterns, samples, and whitepapers

26 Thank you.

27 11/15/ :10 AM © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

28 11/15/ :10 AM © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Download ppt "Design Patterns for Connected Specialized Devices"

Similar presentations


Ads by Google