Actus : Devices – Juin / Juillet 2017

Actus Devices

Juin-Juillet 2017

 

Au sommaire :

  • Windows 10 1703 validé pour le déploiement en Entreprise

  • Windows 10 et la fin des branches CB, CBB, LTSB

  • Windows 10 et la désactivation de VBS dans IE

  • Windows 10 et la fin des mises à jour de Build pour certains processeurs

  • Fin de support pour SCCM 2012

  • Les nouvelles possibilités fournies par SCCM 1706

  • Migrer ses GPO dans Intune

  • A la découverte de Windows Analytics ou comment exploiter la télémétrie en Entreprise

Lire la suite

//Build 2017 – EF Core 2.0 / UWP streamable install / WinForms-WPF

Entity Framework Core 2.0: data, mobile, server, IoT, and more
Rowan Miller

This session presented the new features brought by EF Core 2.0, which is out as Preview 1 right now.

Like .NET Core, EF Core is built against .NET Standard 2.0 which means that it can be used on any platform: Windows, Xamarin, HoloLens, IoT, Linux, etc.

Here’s the summary of the new features demonstrated

  • Global Query Filters
  • Flexible Mapping
  • Context Pooling
  • Compiled Queries
  • Some currently in development features were also shown like complex type mapping (which already exists in EF6) and better migration with « SeedData ».

    Global Query Filters allows to define filters at the DbContext level.
    For example in soft delete scenario, instead of excluding « IsDeleted = True » in every queries, we can define in the configuration of the DbContext to exclude it globally.
    This is done with the following code:

    modelBuilder.Entity<Blog>().HasQueryFilter(p => !p.IsDeleted)

    The interesting part of that line of code is that the QueryFilter part is evaluated at every query.
    This allows to do things like this.

    public class MyDbContext : DbContext
    {
        public string TenantId {get; set; }
    
        public void OnConfigure(...)
        {
            modelBuilder.Entity<Blog>().HasQueryFilter(b => b.TenantId == TenantId);
        }
    }
    

    Flexible Mapping allows more possibilities when mapping a C# object to a table.
    One possibility is mapping a private field to a column.

    modelBuilder.Entity<Blog>.Property<string>("TenantId").HasField("_tenantId")
    

    When we want to retrieve the value of the column, we can write that line

    var value = EF.Property<string>(row, "TenantId")
    

    Context Pooling allows the use a pool of already instantiated DbContext (like a ThreadPool) when working with DI.
    Enabling it is pretty straightforward, just replace « .AddDbContext() » by « .AddDbContextPool() ».
    It has some restrictions because the DbContext needs to be cleaned before each use.

    Compiled Queries are now available in EF Core.

    var query = EF.CompiledQuery((DbContext dbContext, int id) => dbContext.Table.First(a => a.Id == id))
    var result = query(dbContext, id);
    

    During the session, the speaker demonstrated the « EF Everywhere » by running a UWP application with EF Core on a Raspberry Pi named « Unicorn Launcher » that launched a small rocket into the air.

    https://docs.efproject.net
    https://github.com/aspnet/entityframework
    https://github.com/rowanmiller/demo-efcore

    XAML custom controls for UWP: Start to finish
    John Bristowe, Nikola Metulev

    This was a disappointing session.
    I tried my chances with this session based on its description which promised to explain the best pratices and UX design patterns for accessibility and input methods (mouse, keyboard, game controller, HoloLens) when creating custom controls in XAML.

    But in fact, it was a plain simple session on how to use and create controls in XAML (that is the same thing since the introduction of WPF 10 years ago).

    This session was more of an advertisement for UWP Community Toolkit and UI for Telerik.

    Here’s what we saw

    • 1st party controls: Button, TextBox, etc.
    • 3rd party controls: UWP community toolkit, Telerik, etc.
    • Restyled controls (Style, Template)
    • Extended controls (Inheriting controls to add behaviors)
    • Custom controls

    Nextgen UWP app distribution: Building extensible, stream-able, componentized apps
    John Vintzel, Sandeep George

    This session talked about some new features for UWP concerning the distribution of the apps.

    First, we were shown the « App streaming installation » feature that allows to download only a « required » part of the application and run it even before its full download. This can be compared to how Xbox games can be partially downloaded and run.

    This is available right now in the Creators Update.

    All the magic lies in a manifest file named « AppxContentGroupMap.xml » that is included in the UWP app. The Windows Store then uses this file to know how to install it.
    This feature comes with all the needed API to finely manage how to application reacts to missing parts, prioritizes parts to download and gets feedback on the progression of the download.

    APIs are also available to debug the app to simulate a state of partial download.

    For more information, see https://aka.ms/uwpstreaminginstall

    Coming in the Fall Creators Update, optional packages for UWP will be available.
    We can see it as DLC or plugins for existing UWP apps.
    It extends an existing app (or many) by adding contents and/or features and it can be sold separately.
    A UWP app that allows for optional packages can also receive packages from other publishers.

    For more information, see https://aka.ms/uwpoptionalpackages

    Modernize WinForms and WPF apps with maximum code reuse, cross-platform reach, and efficient DevOps
    Joshua Weber, Mike Battista

    This session was also non-surprising.
    It was aimed at those stuck with WinForms/WPF and who didn’t followed the other technologies in the meantime.

    To start, we were explained how to leverage the Desktop Bridge to take advantage of all the new APIs of Windows 10.
    Then, by moving the codebase of an existing app to a .NET Standard 2.0 lib, the code was reused into a Xamarin app.
    To end this session, we were presented Visual Studio Mobile Center to setup CI/CD for the Xamarin app.

//Build 2017 Day 3 – Sessions

Pour ce dernier jour de la build nous avons eu plusieurs sessions sur le future des outils/langages de Microsoft.

1- The future of Visual Studio

Cette session présentée par Amanda Silver, Tim Sneath avec une intro de Sadiq Shaikh que le grand public a découvert lors de la //Build 2016 avec le projet des lunettes connectés pour aveugle.

Sadiq Shaikh est intervenu pour nous montrer comment un aveugle peut coder. Il a commencé par énuméré les différentes nouveautés coté accessibilité dans Visual Studio et enfin il a terminé par une démo époustouflante du développement d’une appli console « Hello World » !

Amanda Silver a enchainé avec les nouveautés dans la version courante de VS 2017 et la prochaine MAJ (l’update 3 qui est en preview) :

    • Live Unit Testing qui arrive sur .NET Core.
    • Les nouvelles fonctionnalités de refactorisation (qui vont visiblement évolués encore plus)
    • L’amélioration de l’intellisense
    • Une nouvelle UI pour la recherche de références
    • Les moyens de rajouter un container Docker (windows ou Linux) dans la dialog de création de projet et avec un clique droit sur un ancien projet web.
    • Une extension Continuous delivery qui permet d’être notifié des differents evenements qui se passent sur VSTS

Tim Sneath a terminé la session sur plusieurs démo qui concerne le développement C++ d’un projet Linux qui s’exécute (avec du debug) en local sans VM en utilisant le subsystem linux de Windows 10.

2- The future of C#

Le nom de cette session est encore une fois trompeur, je n’ai vu que deux ou trois évolution de C# lors des 10 dernières minutes de la session, le reste était plus un rappel des dernières évolution de C# 7 (notamment les out variables, Is-expressions with patterns,  … ).

Les nouveautés présentés sont :

3- What’s new with the Microsoft Bot Framework

Plusieurs annonces:

4- Modern front-end web development in Visual Studio 2017

Dans cette session, Mads Kristensen l’inventeur de Web Essentials nous a fait quasiment que des démos pour nous présenter les fonctionnalités qui améliorent la vie d’un développeur front-end dans Visual Studio 2017 via des plugins:

Avec une mention spécial pour Client-Side Library Installer qui sera proposé dans un premier temps via un plugin et plus tard intégré nativement dans Visual Studio. Ce Plugin permet d’installer (restaurer) et de consommer facilement des bibliothèques côté client tiers: il suffit de précisé la source (cdnjs, npm (à venir), filesystem …) la lib avec sa version, le ou les fichier à récupérer, et la destination (voir le readme sur GitHub). Super plugin !

Et aussi une petite partie sur comment le compilateur TypeScript peut maintenant dans Visual studio (via une option activable dans le tsconfig + doc JSdoc) faire de l’analyse et des contrôles dans un fichier JavaScript sans aucun fichier .ts ou .d.ts

Et pour terminer, une belle découverte JavaScriptServices un ensemble de techno client-side pour ASP.NET Core qui fournit l’infrastructure pour:

  • Utiliser Angular 2/ React / Vue / Aurelia / Knockout / etc.
  • Compiler les ressources du front avec Webpack.
  • Exécuter le JS sur le serveur au runtime.
  • Faire du prerendering coté serveur pour un affichage instantané de l’HTML coté client et pour l’indexation dans les moteurs de recherche.

//Build 2017 – Visual Studio Mobile Center / Fluent Design

Visual Studio Mobile Center: Ship mobile apps faster
Keith Ballinger, Thomas Dohmke

This session presented the new Visual Studio Mobile Center that aims to bring into a single place every aspect of continuous integration and delivery as well as every services used in mobile development like authentication and push notifications.

In a few simple steps, we can quickly setup a continuous build on each push to a git repository (hosted in GitHub, VSTS, BitBucket). Then UI tests will be run by Xamarin Test Cloud, and finally the app can be distributed by Hockey App.
Also we are given 2 lines of code to add to our apps to enable Application Insights.
All that without leaving Mobile Center.

It supports Xamarin.iOS, Xamarin.Android, Objective-C, Swift, Java, ReactNative and UWP apps.
Cordova is not supported for the moment.

The build agent is hosted in the cloud, which means that we don’t need to have a Mac to compile iOS apps.

New features were announced

  • Partial support of UWP
  • Automated store distribution for UWP
  • More supported git hosting services (VSTS, BitBucket)
  • Push notifications campaign with analytics data-based targeting

This service is still in preview and free for the moment.
No pricing available as of now.

If you want to checkout Visual Studio Mobile Center, here’s the url: https://mobile.azure.com

Build Amazing Apps with Fluent Design
James Clarke, Paul Gusmorino

Another session packed with lots of sweet things, especially for me who loves XAML/UWP and UX design.

I recommend that you watch the replay as it’s a really visual session, difficult to transcribe by words.

This session presented all the new concepts of Fluent Design and how to implement them in XAML for UWP.

Fluent Design is based on 5 concepts:

  • Light: subtly highlight elements on the UI to give users feedback and make for discoverability
  • Depth: play with different levels of depth (like a parallax) to give a dynamic feeling to the app
  • Material: apply different kinds of « materials » on some parts of the application, rather than just putting flat colors, to make the app prettier
  • Motion: place animations in the app so that it feels fluid, especially when navigating from page to page
  • Scale: adapt to the space available, mostly true when making UWP apps that works on PC and on HoloLens

In XAML, some new features were shown to support for those concepts:

  • Reveal Highlight: dynamic lightning on controls when approaching the cursor and/or clicking (<Button Style= »{ThemeResource ButtonRevealStyle} »/>)
  • Commanding in collections: add support of Context Menu and swipe into collections like ListView

New controls for UWP were also shown:

  • NavigationView: full-featured navigation panel (burger menu) with its content pane.Can be seen like a SplitView++
  • RatingsControl
  • ColorPicker
  • Repeater: Repeat a group of UI elements
  • ParallaxView: Scroll its content in sync with another scrollable control to give parallax effect
  • 360° video support in UWP
  • SVG support in XAML

The demo app can be found at http://aka.ms/buildcast

Documentation on fluent design can be found at the following links
http://design.windows.com
http://fluent.microsoft.com

//Build 2017 – Xamarin: The future of mobile app development

Lots of great announcements in this crowded session.

Xamarin Live Player
Announced at the morning keynote, Xamarin Live Player seems to be an awesome tool for developing mobile apps.
Directly on real devices (both iPhone and Android), it adds live reloading of both the UI and the C# code, without even saving the files in Visual Studio!
That way, we don’t waste time when we want to make a change (big or small). No need to stop debugging, make a small change, recompile, and restart debugging.

It works both on Visual Studio and Visual Studio for Mac with an alpha version of the Xamarin SDK.

On the devices, an application « Xamarin Live Player » has to be installed. After that we only need to pair our device to Visual Studio.
A specific debug option will appear in Visual Studio to launch a debug session through the Xamarin Live Player that will interpret our app rather than install it the classic way, enabling live reloading.

This works both for Xamarin.Forms and classic Xamarin.
A really great side effect of the interpretation part of Xamarin Live Player is that when developing on Windows, no Mac is needed for debugging (it still is required for release)!

iOS provisioning wizard
One thing that is really really bothering when developing iOS apps is that we need to declare lots of things in the Apple Developer portal: one certificate per build/developer machine, one registration per device, one App ID declaration per application and finally one provisioning profile which links all the previous items.

That means when starting a new app, it really is complicated to setup everything.
Even when working on an already setup project, if there is a new developer or a new device, we need to update the developer portal and revoke certificates, and so on.
This results in lot of lost time.

Today Microsoft announced the upcoming of an integrated wizard inside VS for Mac that handles all that declaration part just by a handful of clicks:
– No certificate on the Mac? Click, done.
– No App ID matching the bundle name? Click, done.
– Device not registered in the portal? Click, done.
– Device not part of the existing provisioning profile? Click, done.
This will really simplify developing for iOS.

Embeddinator 4000
Just like we can use native libs (Objective-C, Swift, Java) inside a .NET Xamarin app, Microsoft announced the ability to use .NET libs inside native apps written in ObjC, Swift and Java.

It is even possible to write UI code in .NET and use it in a native app!

More info at: https://github.com/mono/embeddinator-4000

And lots of other things…
I won’t get into the details, but here are some of the other announcements

  • Easier native bindings: CocoaPods importer, SwiftNetifier
  • Multi process debugging for iOS and Android
  • New integrated SDK Manager for Android inside Visual Studio
  • Xamarin.Forms for MacOS, Linux and WPF
  • Xamarin.Forms pages embedding inside native apps
  • AOT compilation for Android/MacOS; Hybrid mode compilation (AOT+JIT) for Android/MacOS
  • SkiaSharp for cross-platform 2D
  • UrhoSharp for cross-platform 3D

If you want to know more, be sure to watch the replay on Channel9!

//Build 2017 Day2 – Sessions

Lors de cette journée consacrée à Windows, j’ai assisté à plusieurs sessions où malheureusement le  contenue tournaient autour de quasiment le même sujet.

App Model evolution

Dans cette session  Andrew Clinick a présenté les évolutions de l’app Model:

  • Simplification et l’amélioration de la vitesse de distribution.
  • Les delta de MAJ
  • Self UWP updating apps (pour les applications installées en dehors du store)
  • Microsoft conseille fortement l’utilisation du desktop bridge, non pas pour être dans le store, mais pour améliorer fortement l’expérience utilisateur, dans le sens où l’installation/désinstallation de l’application sera « propre » avec 0 impact sur le système.

Quelques infos sur le Desktop Bridge :

  • Il ne convertit pas les applications mais plutôt le MSI, xcopy …
  • l’application ne change quasiment pas
  • Office et Microsoft teams utilisent le desktop bridge
  • Amélioration de l’engagement des utilisateurs avec plusieurs outils :
    • Le project Rome
    • Les adaptatives cards (via la nouvelle fonctionnalité de Windows « timeline » ou via Cortana/Bots)
    • Microsoft Graph (sujet récurant lors de la build)

What’s New in TypeScript

Le nom de cette session est trompeur. Aucune nouveauté n’a été présentée. Anders Hejlsberg a déroulé exactement les mêmes slides qu’il utilise depuis plusieurs mois, avec exactement les mêmes démos.

Les nouveautés listées (ou vues lors des démos) sont celles des versions 2.0 à 2.2 et non pas des futures versions:

  • Non-nullable types
  • Literal types
  • Async Await ( pour de l’ES3/ES5)
  • type checking pour du JavaScript (dans VS Code)
  • Quick fixes (dans VS Code)