Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Windows 8, Windows Phone 8 und überhaupt...

Windows 8, Windows Phone 8 und überhaupt...

Slides zum .NET Usergroup Meeting Ulm am 10.04.2013

Dariusz Parys

April 09, 2013
Tweet

More Decks by Dariusz Parys

Other Decks in Programming

Transcript

  1. Dariusz Parys
    Daniel Meixner
    Windows 8
    Windows Phone 8
    ...und überhaupt
    http://bit.ly/myWindowsApp
    http://bit.ly/myCloud
    http://bit.ly/myTools
    #UGWindows

    View full-size slide

  2. Agenda
    • Wo stehen wir?
    • W8 App Dev Basics
    • Vote!
    • W8 Runtime Environment
    • WP8 new Features
    • W8/WP8 Cross Platform Development
    • .Net App Development & WinRT
    • App Backend (WAMS)
    • Windows App Deployment & Store
    • Dauerbrenner
    • Q&A

    View full-size slide

  3. Wo stehen wir?

    View full-size slide

  4. Input
    Keyboard Mouse
    Pen Voice Gesture
    Eye
    Face
    Touch

    View full-size slide

  5. Windows 8 and Windows Phone 8

    View full-size slide

  6. W8 App Dev Basics

    View full-size slide

  7. 1700+ Devices
    3 Types of Applications
    One Core
    Windows Store
    WP8 Desktop

    View full-size slide

  8. Wann ist ne App ne App?
    • Purpose
    • Runtime Environment
    • Deployment via Store

    View full-size slide

  9. Programmiermodell Windows 8

    View full-size slide

  10. Programmiermodell Windows Phone 8
    .NET API for
    Windows
    Phone
    Windows
    Phone
    Runtime
    Win32 &
    COM
    Managed Native
    WP7.1 XAML & C#/VB
    WP8.0 XAML & C#/VB
    WP8.0 Games DirectX/Direct 3D & C++
    WP7.1 XNA & C#/VB
    WP8.0 XAML & C#/VB with Direct3D Graphics
    + C++
    + C++

    View full-size slide

  11. • W8 Runtime Environment & PLM
    • WP8 new Features
    • W8/WP8 Cross Platform Development
    • .Net App Development & WinRT
    • App Backend (WAMS)
    • Dauerbrenner
    VOTE!!!

    View full-size slide

  12. Tile Templates and Tile Sizes
    •Windows Phone 8 supports three Tile
    templates
    • Flip – flips from front to back (similar to the
    WP 7.1 Tile template)
    • Iconic – clean iconic layout designed to reflect
    Windows Phone design principles
    • Cycle – cycles through up to nine images
    16

    View full-size slide

  13. • You can register your app as a lock screen
    provider, which enables:
    • User can select your app to show
    detailed status on the lock screen
    • Can select your app as one of the five
    apps to show quick status (icon and
    count)
    • Can select your app as the lock screen
    background image provider
    4/10/2013
    17
    Lock Screen on Windows Phone 8

    View full-size slide

  14. • Launchers are APIs that help a user perform common tasks
    • Invoke part of the phones’ built-in capabilities to perform tasks such as
    • Take a photo
    • Add a contact
    • Send an email or SMS message
    • Etc…
    • New Launchers in Windows Phone 8:
    • SaveAppointmentTask
    • ShareMediaTask
    • MapDownloaderTask
    • MapUpdaterTask
    • MapsTask
    • MapsDirectionsTask
    New Launchers
    4/10/2013
    Microsoft confidential
    18

    View full-size slide

  15. • Windows Phone 8 has new Maps controls
    • Bing Maps control from Windows Phone OS 7.1 is still supported, but deprecated
    • The new Maps controls use technology supplied by Nokia
    • New features:
    • Vector-based for faster rendering
    • Four cartographic map modes
    • Light and dark color modes
    • Display landmark and pedestrian features
    Maps
    4/10/2013
    Microsoft confidential
    19

    View full-size slide

  16. • New Location API in the Windows Phone Runtime API set
    • Similar to Windows 8 Location API
    • Windows Phone OS 7.1 .NET Location API still supported
    • Background location-tracking apps
    • Run continuously in the background when the user
    navigates away from the app
    • Enables scenarios such as Run Trackers, turn-by-turn
    navigation
    Location and Location Tracking
    4/10/2013
    Microsoft confidential
    20

    View full-size slide

  17. • Windows Phone 8 allows you to enable users to
    robustly interact with your app using their voice
    • Two types of voice interaction are new:
    • Voice Commands - Allows users to deep-link into your
    app by holding down the Start button and speaking a
    prefix you specify for your app, followed by a command
    that you define.
    • Speech Recognition and Text-to-Speech APIs - While
    in the context of your app, allow users to provide input
    using their voice, and readout text to users via text-to-
    speech
    Speech
    4/10/2013
    Microsoft confidential
    21

    View full-size slide

  18. Wallet
    Credit & Debit Cards
    Loyalty & Membership Cards
    Access Saved Deals
    Supports NFC ‘Tap to Pay’

    View full-size slide

  19. • LongListSelector
    • Flat lists
    • Grouped lists – with headers
    • Jump List
    • Formerly in the Silverlight Toolkit
    • Pivot and Panorama now in ROM
    • WebBrowser control now based on
    Internet Explorer 10
    UI Controls
    New Controls in Windows Phone 8 SDK

    View full-size slide

  20. • Incoming VoIP calls work like any other call
    • Integrates with built-in phone features
    • VoIP apps continue to run in the background
    • Available to all developers
    VoIP and Video Chat

    View full-size slide

  21. • Create apps that communicate with other phones using Bluetooth technology
    • Bluetooth API enables the following scenarios for Windows Phone 8:
    • App-to-app communication
    • App-to-device communication
    • Proximity API enables:
    • App-to-app connection using Bluetooth technology
    • Establish a Wi-Fi, Bluetooth, or Wi-Fi Direct connection between your app and an instance of your
    app on a proximate device
    • Send data between devices using NFC.
    • Use a phone to interact with NFC tags
    Bluetooth and NFC
    4/10/2013
    Microsoft confidential
    28

    View full-size slide

  22. Better Sharing with NFC

    View full-size slide

  23. • Apps can use the
    Microsoft.Phone.Storage API to read
    files from an SD card
    • User can also use SD card to extend
    device storage for their personal files
    and media
    • Store photos, music, videos
    • Can install apps from a MicroSD store
    Storage – Read from SD Card
    4/10/2013
    Microsoft confidential
    31
    MicroSD Support

    View full-size slide

  24. • Create a set of contacts owned exclusively by the app, though visible through the phones
    built-in Contacts app
    • APIs are provided to create, update, delete, and query the app’s contacts
    • Sync the app’s contact list with a remote list maintained by the app’s cloud service
    Custom Contact Store
    4/10/2013
    Microsoft confidential
    32

    View full-size slide

  25. • App can register a File Association
    • Automatically launch your app when a file of the registered type is
    received as an email attachment or opened in the browser, or through
    Sharepoint
    • One app can launch another by sending it a file of the registered type
    • App can register a protocol
    • Allows your app to automatically launch when another app ‘opens’ a
    special URI
    • Protocol is the first part of a URI, e.g.
    myprotocol:/ShowProducts?CategoryID=aea6ae1f
    • App launches another and passes it data in the remainder of the
    launch URI
    File and Protocol Associations
    Enables App to App Communication
    4/10/2013
    Microsoft confidential
    33

    View full-size slide

  26. • Managed Apps are NGEN’d for you (compiled to native) in the Windows Phone Store in
    Windows Phone 8, so typically start and run faster 
    • When you build your app in Visual Studio, the code is not compiled into a native image,
    but into a machine-independent Common Intermediate Language (CIL) binary file
    (formerly known as Microsoft Intermediate Language, or MSIL)
    • When you submit your app to the Windows Phone Store, you submit the CIL file
    • On submission, CIL file is converted to optimized Machine Dependent Intermediate
    Language, or MDIL
    • When a user downloads your app to a device, it is pre-jitted to a native image

    Windows Phone 8 Apps Run Faster 
    4/10/2013
    Microsoft confidential
    35

    View full-size slide

  27. • In general, the Windows Phone app
    platform enables apps that target
    Windows Phone OS 7.1 to run without
    modification or recompilation on
    Windows Phone 8
    • Same APIs may exhibit slightly different
    behaviour in WP 8.0 compared to WP
    7.1
    • Feature improvements or
    behaviour changes
    Windows Phone OS 7.1 Apps on Windows Phone 8
    4/10/2013
    Microsoft confidential
    36
    WP OS
    7.1
    app
    WP 8.0
    Runtime/
    Libraries
    No recompilation
    WP
    OS
    7.1
    app

    View full-size slide

  28. • Instead of breaking WP 7.1 apps
    running with the WP 8.0 runtime, quirks
    mode is applied to retain WP 7.1
    behaviour
    • Apps that are upgraded to WP 8.0 and
    recompiled run on the phone without
    quirks mode being applied
    Windows Phone OS 7.1 Apps on Windows Phone 8
    4/10/2013
    Microsoft confidential
    37
    WP OS
    7.1
    app
    WP 8.0
    Runtime/
    Libraries
    No recompilation
    WP
    OS
    7.1
    app
    +Quirks
    WP OS
    8.0
    app
    WP
    OS
    8.0
    app

    View full-size slide

  29. Apps do not get notified when
    they are getting terminated

    View full-size slide

  30. Scenario You should….

    View full-size slide

  31. http://blogs.msdn.com/b/b8/archive/2012/04/19/managing-quot-byo-quot-pcs-in-the-enterprise-including-woa.aspx

    View full-size slide

  32. Programmiermodell Windows 8

    View full-size slide

  33. Programmiermodell Windows Phone 8
    .NET API for
    Windows
    Phone
    Windows
    Phone
    Runtime
    Win32 &
    COM
    Managed Native
    WP7.1 XAML & C#/VB
    WP8.0 XAML & C#/VB
    WP8.0 Games DirectX/Direct 3D & C++
    WP7.1 XNA & C#/VB
    WP8.0 XAML & C#/VB with Direct3D Graphics
    + C++
    + C++

    View full-size slide

  34. DllImport "avicap32.dll" "capCreateCaptureWindow"
    static extern int
    string int
    int int int int
    int int
    DllImport "avicap32.dll"
    static extern bool
    int
    MarshalAs UnmanagedType ref string
    int
    MarshalAs UnmanagedType ref string
    int
    // more and more of the same

    View full-size slide

  35. Windows Phone 7
    Silverlight 5
    .NET Framework
    4.5
    .NET Profile for
    Windows Store
    apps

    View full-size slide

  36. .NET for
    Windows Store apps
    Windows Phone 7.1 .NET Framework 4.5
    Namespace 72 95 447
    Type 1,246 1,788 14,936
    Member 15,674 20,291 217,166

    View full-size slide

  37. Windows 8
    Windows Phone 8
    Cross Plattform Development

    View full-size slide

  38. Programmiermodell Windows 8

    View full-size slide

  39. Programmiermodell Windows Phone 8
    .NET API for
    Windows
    Phone
    Windows
    Phone
    Runtime
    Win32 &
    COM
    Managed Native
    WP7.1 XAML & C#/VB
    WP8.0 XAML & C#/VB
    WP8.0 Games DirectX/Direct 3D & C++
    WP7.1 XNA & C#/VB
    WP8.0 XAML & C#/VB with Direct3D Graphics
    + C++
    + C++

    View full-size slide

  40. Shared core
    Full WinRT
    11,000 members
    Windows Phone Runtime
    2,800 shared members
    600 new members

    View full-size slide

  41. Gemeinsamkeiten & Unterschiede
    4/10/2013
    Screen Size
    Windows Phone
    • 800x480, 1280x720,
    1280x768
    Portrait, Landscape
    Windows
    • 1024x768 
    Portrait, Landscape,
    Snapped
    Controls
    Windows Phone
    • Panorama, Pivot,
    ListPicker
    LongListSelector
    Windows
    • GridView, ListView,
    Semantic Zoom,
    FlipView
    Lifecycle
    Windows Phone
    • Launched from
    start/apps list.
    Tombstones apps
    Windows
    • Resumes existing
    apps
    No tombstoning

    View full-size slide

  42. Cross Plattform Strategien (XAML/C#)

    View full-size slide

  43. Reuse: Portable Class Library
    Reusing pre-built components or libraries
    4/10/2013
    Microsoft
    confidential
    8
    1
    • Portable Class Library
    • Managed Code
    • Reusable library
    • One codebase with no conditional
    compilation

    View full-size slide

  44. Shared Code: File-Level (Add as Link)
    • App logic common to both apps, but not
    portable
    • Code containing Windows Runtime API calls
    • User controls with no platform
    dependencies

    View full-size slide

  45. Shared Code: Classpart-Level
    (Partial Classes)
    public partial class MyClass
    {
    public void CommonMethodA()
    {
    // code that is common
    }
    public int CommonMethodB()
    {
    int result = 0;
    // code that is common
    return result;
    }
    }
    public partial class MyClass
    {
    public void PlatformSpecificMethod()
    {
    // specific code for platform Á
    }
    }
    }
    public partial class MyClass
    {
    public void PlatformSpecificMethod()
    {
    // specific code for platform B
    }
    }

    View full-size slide

  46. Shared Code: Classpart-Level
    (Partial Classes)
    • Very useful if amount of common code is large relative to the amount of
    platform-specific code
    • I cannot specify what each platform-specific partial class should implement

    View full-size slide

  47. Shared Code: Line Level (Conditional Compilation)
    • can’t be shared in a Portable
    Class Library
    • simple way to share code
    • Complexity!
    public class MyClass
    {
    public void CommonMethodA()
    {
    // code that is common to Windows Phone 8 and Windows 8
    }
    public int CommonMethodB()
    {
    int result = 0;
    // code that is common to Windows Phone 8 and Windows 8
    return result;
    }
    public void PlatformSpecificMethod()
    {
    #if NETFX_CORE
    // code for Windows 8
    #else
    // code for Windows Phone 8
    #endif
    }
    }

    View full-size slide

  48. public class MyWin8Class : MyBaseClass
    {
    public override void PlatformSpecificMethod()
    {
    // Implement this method specific to Win 8
    }
    } }
    Patterns: Abstract Base Class
    public abstract class MyBaseClass
    {
    public void CommonMethodA()
    {
    // code that is common
    }
    public int CommonMethodB()
    {
    int result = 0;
    // code that is common
    return result;
    }
    public abstract void PlatformSpecificMethod();
    }
    Add as Link
    Portable Class Library
    public class MyWP8Class : MyBaseClass
    {
    public override void PlatformSpecificMethod()
    {
    // Implement this method specific to WP8
    }
    }

    View full-size slide

  49. public class MyClass
    {
    private IPlatformSpecificCode _platformImpl;
    public MyClass(IPlatformSpecificCode platformImpl)
    {
    _platformImpl = platformImpl;
    }
    public void CommonMethodA()
    { ... }
    public int CommonMethodB()
    { ... }
    public void PlatformSpecificMethod()
    {
    _platformImpl.PlatformSpecificMethodImpl();
    }
    }
    public interface IPlatformSpecificCode
    {
    void PlatformSpecificMethodImpl();
    }
    // Windows 8 app project
    public class MyWin8Implementation : IPlatformSpecificCode
    {
    public void PlatformSpecificMethod()
    {
    // Implemented for Windows 8
    }
    }
    Patterns: Interfaces
    // Windows Phone app project
    public class MyWinPhone 8Implementation : IPlatformSpecificCode
    {
    public void PlatformSpecificMethod()
    {
    // Implemented for Windows Phone 8
    }
    }

    View full-size slide

  50. Windows Azure Mobile Services

    View full-size slide

  51. Dauerbrenner

    View full-size slide

  52. „Wo zum Henker ist der
    Startbutton?“

    View full-size slide

  53. „Windows 8 ist nicht
    intuitiv!?“

    View full-size slide

  54. „Metro Apps sind auf
    einem Desktop-PC ohne
    Touch überflüssig.“

    View full-size slide

  55. „Gibt‘s außer Touch sonst
    noch was Neues?“

    View full-size slide

  56. Windows 8 – New Features
    UEFI
    Connecte
    d Standby
    File
    Histor
    y
    Performance
    .iso
    Mount
    Metered
    Connection
    s
    Multi
    Monit
    or
    Supp
    ort
    Window
    s To Go
    Storage
    Spaces
    Hy

    View full-size slide

  57. „Muss ich jetzt meine
    Desktop App umbauen?“

    View full-size slide

  58. „Werde ich als .NET
    Entwickler nicht mehr
    gebraucht?“

    View full-size slide

  59. „Wie kann ich loslegen?“
    http://bit.ly/myWindowsApp
    http://bit.ly/myCloud
    http://bit.ly/myTools

    View full-size slide

  60. Was bewegt Euch?

    View full-size slide

  61. Vielen Dank!
    http://bit.ly/myWindowsApp
    http://bit.ly/myCloud
    http://bit.ly/myTools
    Dariusz Parys
    Daniel Meixner
    #UGWindows

    View full-size slide

  62. Daniel Meixner
    [email protected]
    • http://developersdevelopersdev
    elopersdevelopers.net
    Dariusz Parys
    [email protected]
    • http://kouder.net
    • http://writeline.io
    • http://twitter.com/writeline

    View full-size slide