Successfully reported this slideshow.
Your SlideShare is downloading. ×

Introduzione alle Universal App

Ad

.NET Day
05 Febbraio 2015
#netday15
Windows 8.1

Ad

.NET Day #netday15

Ad

.NET Day #netday15

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Loading in …3
×

Check these out next

1 of 37 Ad
1 of 37 Ad
Advertisement

More Related Content

Advertisement

Introduzione alle Universal App

  1. 1. .NET Day 05 Febbraio 2015 #netday15 Windows 8.1
  2. 2. .NET Day #netday15
  3. 3. .NET Day #netday15
  4. 4. .NET Day #netday15
  5. 5. .NET Day #netday15
  6. 6. .NET Day #netday15 Windows Phone 7.5 Windows Phone 8.0 Convergenza con IE • WP 7.5 includeva IE9 • Stesso rendering engine della versione per Windows • Stesso engine Javascript della versione per Windows Convergenza del core (NT kernel) • Kernel & file system comuni • Framework per i driver comune • Secure boot & criptaggio dei dati (BitLocker) • Stack di rete comune Developer Platform • Parziale convergenza delle API (con focus su sensori e IAP) • Supporto a C++ e DirectX • IE10 Convergenza della piattaforma di sviluppo • Possibilità di riutilizzare le proprie conoscenze • Possibilità di riutilizzare il codice • Un’esperienza d’uso unificata Allineamento degli Store • Registrazione unica • Condivisione degli acquisti Core Platform comune • Proximity e geo localizzazione • Sicurezza e identity • Gestione dei task in background
  7. 7. .NET Day #netday15 Il Windows Runtime (WinRT) è la piattaforma che consente di condividere il runtime e le API usate dalle Store app (telefono e tablet / pc) Convergenza quasi totale in 8.1 • L’obiettivo è la convergenza al 100% per gli scenari di sviluppo • 8.0 aveva circa il 30% di API convergenti • 8.1 ha più del 90% di API convergenti
  8. 8. .NET Day #netday15 | | Legend
  9. 9. .NET Day #netday15
  10. 10. .NET Day #netday15 Alessio Iafrate
  11. 11. .NET Day #netday15
  12. 12. .NET Day #netday15 Lo sviluppatore ha a disposizione un sistema di coordinate comune tra Windows e Windows Phone, che consente di scalare in automatico il layout10” tablet 7” tablet 6” 5” 4.5” Infinite virtual canvas 166 Logical DPI
  13. 13. .NET Day #netday15 80% XAML condiviso 20% XAML specifico Common SignatureOptimized DatePicker TimePicker CommandBar AppBar Button CheckBox RadioButton ProgressBar Slider ToggleSwitch Hub Pivot ListView GridView
  14. 14. .NET Day #netday15
  15. 15. .NET Day #netday15 Su Windows Phone 8.1 … e su Windows 8.1
  16. 16. .NET Day #netday15 Task TimeTrigger PUSH Notification LocationTrigger PushNotificationTrigger MaintenanceTrigger InternetAvailable NetworkStateChange TimeZoneChange
  17. 17. .NET Day #netday15 Windows Notification Service (WNS) • Servizio di invio notifiche condiviso tra Windows e Windows Phone • Coda più efficiente per limitare la perdita di notifiche in caso di problemi di connettività Tile template + toast • Template delle tile condivisi • Aggiornamenti delle tile periodici dato un URL • Toast
  18. 18. .NET Day #netday15 Action Center Punto di raccolta di tutte le notifiche Le applicazioni possono gestire il comportamento delle notifiche (notifiche “fantasma”, aggiornamento e cancellazione delle notifiche)
  19. 19. .NET Day #netday15 Device B WP 8.1 – PFN 12345 Roaming Local Local Cache Temp Device A WP 8.1 App Roaming Local Local Cache Temp Backup [Device A]
  20. 20. .NET Day #netday15
  21. 21. .NET Day #netday15
  22. 22. .NET Day #netday15
  23. 23. .NET Day #netday15
  24. 24. .NET Day #netday15
  25. 25. .NET Day #netday15
  26. 26. .NET Day #netday15
  27. 27. .NET Day #netday15
  28. 28. .NET Day #netday15
  29. 29. .NET Day #netday15 Approccio Vantaggi & Svantaggi Continuare ad usare Silverlight 7.x / 8 Pro  L’app funziona su Windows Phone 8.1 e su tutti i dispositivi con Windows Phone 7.x / 8.0 Contro  Non potete sfruttare le novità della piattaforma  Non siete in grado di condividere la maggior parte del codice con Windows Usare Silverlight 8.1 (L’applicazione Silverlight fa uso del nuovo stack basato sul Windows Runtime) Pro  Consente alle applicazioni Silverlight di sfruttare quasi tutte le nuove funzionalità aggiunte in Windows Phone 8.1 Contro  Non siete in grado di condividere la maggior parte del codice con Windows  Non funzionano sui dispositivi con Windows Phone 8.0 Usare la piattaforma Windows XAML Pro  Supporto a Windows e Windows Phone  Pieno supporto alle nuove funzionalità di 8.1  Migliori performance e minor consume di memoria Contro  Non funzionano sui dispositive con Windows Phone 8.0  Non potete migrare automaticamente un’app già esistente
  30. 30. .NET Day #netday15
  31. 31. .NET Day #netday15
  32. 32. .NET Day #netday15
  33. 33. .NET Day #netday15 http://dev.windows.com http://dev.windowsphone.com http://www.visualstudio.com/en-us/products/free-developer-offers-vs
  34. 34. .NET Day #netday15 Sistemi operativi supportati Windows 8.1 (x86 o x64) Hardware 4 GB di spazio libero su disco 1.5 GB di RAM (raccomandati) Scheda madre a 64-bit (x64) Per usare l’emulatore di Windows Phone Windows 8.1 Pro o Enterprise (per Hyper- V) e supporto a Second Level Address Translation (SLAT) Min 4GB RAM
  35. 35. .NET Day #netday15
  36. 36. .NET Day #netday15 Caratteristiche principali La nuova piattaforma basata sul Windows Runtime offre la convergenza con Windows 8.1, migliori performance e un minor consumo di memoria rispetto a Silverlight Il cuore dell’applicazione può essere sviluppato una volta sola per Windows e Windows Phone; è possibile condividere elementi della UI, ma è consigliato ottimizzare l’esperienza d’uso per ogni piattaforma La convergenza non è solo relative alla piattaforma di sviluppo, ma si estende a tool, store e possibilità di guadagno Gli sviluppatori che hanno già investito sulla piattaforma non vengono tagliati fuori: Silverlight 8.1 consente di mantenere il proprio codice e, allo stesso tempo, sfruttare le nuove funzionalità di Windows Phone 8.1    
  37. 37. .NET Day #netday15

Editor's Notes

  • This ‘convergence’ is nothing new; we’ve been working on it for a while.
    In Windows Phone 7.5, we implemented a shared browser – both Window and Windows Phone used the same codebase for Internet Explorer.
    In Windows Phone 8.0, we continued that work by making the core modules of the Windows and Windows Phone Oss common – laying the groundwork for all the later convergence, and delivering a converged programming experience for games development in C++ and DirectX. And although the XAML app platforms where still different, we started introducing some common Windows Runtime APIs around areas such as Storage and Sensors and In-App Purchase.
    With Windows Phone 8.1, we now deliver on a highly converged app development platform across the board.
  • The Windows Runtime is the API libraries that enable the development of modern apps.
    In Windows Phone 8.0, there was only a small subset of the WinRT APIs available on Windows Phone.
    [Build] In Windows Phone 8.1, the commonality now extends to over 90%. There are still a few areas where APIs just don’t make sense on one platform or another, but the vast majority are now available on both.
    Examples of not in Windows Runtime on Windows Phone 8.1: DirectAccess, Printing, Search
  • So this is the Windows 8.1 Developer Platform.
    As you can see, it’s the same pretty much all across the board, with common WinRT APIs on both Windows and Windows Phone.
    The major standout difference is that we are continuing to support and invest in the Windows Phone Silverlight app framework which is the XAML-based framework Windows Phone app developers have used up to now. This means that if you have Silverlight app development skills, you can continue to use them – we’re not forcing you to move the the new Windows XAML app framework which is the converged framework for Windows and Windows Phone.
  • We will now run through the most important new feature areas for developers in Windows Phone 8.1
  • In Windows Phone 8, we had a convenient virtual layout system that scaled all phone displays to provide a fixed virtual canvas of 480 pixels wide and either 800 or 856 pixels high. This convenient arrangement made it easy for designers to create layouts without worrying about the physical size of the display, but when the latest 6” superphones were released, it was often the case that the output of pages designed with a 4.5” screen in mind started to look ‘comically large’ on a 6” display, and this convenient arrangement starts to break down.
    In Windows Phone 8.1 for apps using the Windows XAML framework, we now have a virtual layout canvas that provides a consistent layout canvas of ‘view pixels’ that allow designers to create layouts that are determined by the physical size of the display, and not the screen resolution, from 4.5” displays, through 5” and 6”, through tablet sizes and right up to large 40” (or bigger) wall-mounted displays.
  • To support the converged programming model, the Windows XAML app framework has converged controls, available across both Windows and Windows Phone. But what does ‘civerged controls’ really mean?
    [Build] Firstly, we have the common controls which you program the same on both platforms, and which render the same wherever they display.
    [Build] Next we have the optimized controls. These controls are programmed in exactly the same way on each platform, but when they render, they adapt their rendering automatically to be more appropriate for that platform. An example of this is the DatePicker and TimePicker.
    [Build] Finally, we have the Signature controls, which are really the controls that encapsulate the Windows UX. These controls have all the Windows touch response and standard animations built in, and usually support templating so that designers can use them to easily create tailored UI appropriate for each platform.
  • The Date and Time Pickers are great examples of controls that you program the same way on Windows and Windows Phone, but which render quite differently as appropriate for the platform at runtime.
  • An example of that is the Hub control. Here we see it used for a Travel app, where a different experience is offered on Phone and on Tablet, which is tailored to take better advantage of the bigger screen real estate.
  • Multitasking: through Background Tasks activated by Triggers.
    Trigger-based execution:
    Apps will subscribe to triggers they are interested in
    Only run *when* trigger is fired
    Example:
    Geofencing
    BLE beacon
    Push notification
  • Not just push, it’s a platform
    Tiles
    Toasts
    PushNotificationTrigger for background execution
    Local, Scheduled and Remote updates

    Tile template catalog with near parity to Windows (Windows Phone will accept all 40+ square (150x150) and wide (310x150) Windows templates)
    Tile Notification Queue with 5 updates

    This means brand new stuff for Windows Phone!:
    - Periodic polling
    - Scheduled updates - scheduled toast and/or tile updates
    - Tile notification queue
    - Expiration support
    - New templates
  • By default, the 20 most recent toast notifications per app are persisted – expire after 7 days.
    Notification Center management APIs available to allow apps to manage their notifications.
    Scenarios:
    Remove a toast – remove toast relating to something that is no longer valid, such as a sold-out deal.
    Tag toasts so that you can refer to them later as a group.
    Replace a toast with an updated one – match on tag and group. E.g. frequently updated information such as a daily stock price update.
    Expire toasts – se expiration time on toasts. Scenario: a limited time deal is only available until midnight.
    Ghost toasts – create a new toast but suppress the UX popup. Useful for placing a non-interruptive record of some event into the notification center.
  • [Build] Roaming: Apps can choose to save Settings data so that it can roam with the user
    Sync engine transfers data periodically based on triggers (user idle, battery, network, etc.)
    Syncs up to 100kb of data using the app’s PFN
    Data is stored in the user’s OneDrive account, but doesn’t count against their OneDrive quota
    [Build]
    Application data can also be backed up. Data is backed up daily in user’s OneDrive account per device, and counts against their OneDrive quota (user can disable)
  • You can help users share content from your app with another app or service, and vice versa. Participating in the Share contract means that you don't have to write extra code or provide other developers with an SDK for your app just to share content. Apps that support the Share contract can automatically share content to and from any other app that also supports the contract.

    This is a much more flexible and extensible way of supporting sharing between apps than the rather limited launchers and choosers previously available in Windows Phone 8.
  • Windows Phone 8.1 comes with a new improved Maps control. As before, there is good support for geolocation, but 8.1 brings support for geofencing. You can set up to 1000 circular geofences (a radius around a geolocation) and when the user passes through a geofence, a background task can be triggered allowing you to run some code to alert the user or perform other relevant processing.
  • Bluetooth LE is exploding! The ‘Internet of Things’ phenomena means that more and more smart objects are being equipped with sensors and Bluetooth LE radios. We have great APIs in Windows Phone 8.1 to connect to these devices, such as heart rate monitors and smart key fobs, including the ability to trigger background tasks when a connection id made or lost to a device.
    We also have good support for more legacy RFComm device services.
  • There are great new APIs for authenticating users.
    There’s SSO (Single Sign-On) support for users against their Microsoft Account, making it easy to access resources such as files stored in the cloud in OneDrive.
    The Web Authentication Broker makes it easy to authenticate against social networks using OAUTH2.
    There’s also CredentialLocker which makes it easy to store credentials securely.

    Both WAB and CredntialLocker support roaming of stored credentials across devices.
  • The tools on the SDK have had a major overhaul. The emulator now supports new tools such as a Push notification simulator which allows you to test your app by sending dummy notifications from the emulator additional tools rather then from the cloud.
    You can also emulate an SD card by mapping it to a local folder on your PC – useful for getting content onto the emulator.
  • The tools on the SDK have had a major overhaul. The emulator now supports new tools such as a Push notification simulator which allows you to test your app by sending dummy notifications from the emulator additional tools rather then from the cloud.
    You can also emulate an SD card by mapping it to a local folder on your PC – useful for getting content onto the emulator.
  • We also have awesome tools such as:
    AppVerifier: great for finding resource leaks in C++ code
    Performance Monitor for monitoring memory and CPU usage while exercising your app
    Performance Recorder for capturing low level ETW (Event Tracing for Windows) data for later analysis.
  • And many, many more great features that you’ll learn about in this Jump Start.
  • If you are a XAML app developer, you have three choices:
    Keep developing apps using Silverlight 7.x/8.0 APIs – your app will run on every phone running 8.0 or 8.1, but you can’t use all the new stuff
    Upgrade your app to Silverlight 8.1 – you can use all the new stuff, but your app will only run on 8.1 devices (though you can still distribute an 8.0 version of your app through the Store alongside your 8.1 version)
    Choose to create Windows Phone Store Apps using the Windows XAML framework. This will run on 8.1 devices only, but allows easy creation of a Universal app for Tablet/PC as well as Phone. Note that moving a Silverlight app over to Windows XAML is non-trivial and not a process that can be automated through tools with any great success.
  • There are a number of features that we couldn’t get into the Windows XAML app framework. We’ll be working to address this in future updates.
    CameraCaptureTask (though the workaround is to use a FileOpenPicker which has a ‘Take Picture’ button on the app bar)
    Wallpaper/Lock screen
    Lenses
    Alarms/Reminders
    SocialRT (Siverlight 8.1-only new feature to make social media updates)
    VoIP
    Continuous location tracking apps (run trackers, turn-by-turn navigation) – these are not supported on Windows XAML *or* Silverlight 8.1 – 8.0 only
    Wallet foreground agents
    WCF APIs – Windows XAML is limited to HTTP calls to REST services.
  • You can download tools, samples and register for a developer account at http://dev.windows.com
  • Download the tools from http://dev.windows.com or http://dev.windowsphone.com.
    All you need to build compelling apps for phones, tablets and PCs is in Visual Studio Express 2013 for Windows (with Update 2 RC). Included are universal app templates, a full-featured code editor, a powerful debugger, emulators, rich language support, and more, all ready to use in production.

    Paid, non-Express editions get the same tooling by installing Visual Studio 2013 Update 2 – it’s all free!
  • To develop Windows Phone 8.0 apps, you must have a 64 bit version of Windows 8.1. For Windows Phone 8.1, this can be x86 or x64.

    When developing apps, you can test them on a real USB-connected Windows Phone device, or you can use the included Windows Phone emulators. Since the emulators are virtual machines, this means you must have an edition of Windows 8.1 that supports Hyper-V – Windows 8.1 Professional or higher. Also because of the memory used by the emulator virtual machines while they are running, this means we recommend you have RAM of 4GB or higher, which means that your PC must be a 64-bit machine.
  • You don’t need to sign up for a developer account if all you want to do is download the tools and start building apps. You can also developer unlock one phone (using a utility included in the SDK) to debug apps on a real device.
    But you do need to register if you want to submit apps for publication, you want to unlock more than one phone, or you want to use Push Notifications in your app (requires regiatration of your app with the Store.
    To get a Developer Account:
    Included if you have an MSDN subscription
    Free to students who have a Dreamspark subscription
    $19 charge per annum for individual developers, $99 for Company accounts
  • [Builds – click to reveal each tick as you talk down this list]
    Now is the time to build for Windows and Windows Phone. As one converged platform, you can build an app experience that reaches every Windows screen – phone, tablet, and PC.

×