Highlights from Build 2016

Satya

Even though I have never attended a Microsoft Build conference in person I always learn so much from them.

Every year there are new platforms to try, lots of documentation to read, and many presentations and recoded sessions to watch.

I still have a lot of videos to watch, but here are some of top announcements from Build 2016 which matter to me the most as a developer.

Windows 10 as the best OS for Developers

A number of new features coming to Windows 10 in the “Anniversary” update were shown in the day-one keynote, and then even more features where shown at sessions throughout the conference. Solid improvements to the inking, biometrics, and the Action Center were all well received.

Windows Ink

Many of the features shown help fix minor annoyances in the system. For example, pressing on a live tile showing a preview of a news article can now take you directly to it, and notifications dismissed on the PC or tablet will automatically get dismissed on the phone too.

One of the most exciting new features was the addition of Bash (on Ubuntu) on Windows which is both technically very interesting and extremely useful for many development workflows. The new Ubuntu subsystem will allow any (command-line) Linux application to run natively on Windows. This instantly unlocks a massive amount of tools and utilities for developers, making common scenarios significantly easier from Windows.

Bash on Windows

As a huge fan of command line interfaces I’m going to go into this in more detail in a future article – but essentially Microsoft are positioning Windows to be the ultimate developer platform, no matter what operating systems you use for your solutions.

Azure is growing up with more data centres and services

Microsoft would prefer you use Azure when you deploy your applications though, and the day-two keynote showed that is still serious about the cloud.

Improvements which interested me the most included Azure Functions, Service Fabric, Containers, DocumentDB, and much, much more.

Azure

Azure is the future of Microsoft, and by the numbers they going strong. They’re expanding their datacentres and really betting big on the cloud. This is no surprise to Microsoft watchers, but it’s good to see steady improvements here. Many of which I will use.

Visual Studio keeps getting better

I spend absolutely huge amounts of time in Visual Studio so any improvements here have a very positive effect on my productivity.

Visual Studio 2015 Update 2 was released (with lots of improvements) and an early preview version of Visual Studio vNext was also shown. I’ve tried both and they’re definitely going in the right direction for me.

Visual Studio

I’m especially looking forward to some of the improvements coming in the Visual Studio installation experience moving forward. This should make setting up new development environments much faster, and the side-by-side installations means there’s much less risk when installing previews.

App development for Windows, iOS, Android

The mobile app development story from Microsoft is stronger than it ever has been. This year brings a number of improvements to the Universal Windows Platform (UWP) itself, and a more integrated store experience which now includes the apps on the Xbox One and HoloLens.

The Desktop App Converter lets you wrap up existing Win32 and .NET apps into UWP packages, allowing access to new features like UWP APIs – including Live Tiles. Even though I don’t currently develop any Win32 or .NET applications that I want to put in the store, this is an important step and I’m looking forward to the benefits of this as an app user.

Xamarin

For targeting non-Windows devices, the Xamarin platform is now the obvious choice. After recently purchasing Xamarin (and their amazing talent) they’ve decided to make Xamarin available for no extra charge with Visual Studio. And that includes shipping it with the free Community version. Very cool.

The combination of UWP and Xamarin means I can directly apply my C# and .NET skills to making applications for a wide range of platforms, sharing many code components. It’s really coming together nicely.

.NET and the continued move into Open Source

As well as making Xamarin’s development tools free to Visual Studio users, the folks over at Microsoft also announced their intention to open source the Xamarin SDK (including the runtime, the libraries, and command line tools), and give the governance of it over to the .NET Foundation.

Mono, the cross platform and open source sibling of the full .NET Framework has also been re-licenced to be even more permissive, and given to the .NET Foundation. (To be honest I actually thought this was already the case!)

.NET Core, the future replacement of both the .NET Framework and Mono, also saw steady improvements – my favourite of which was official F# language support:

$ cd hellofs/
$ ls
$ dotnet new --lang f#
Created new F# project in /home/julian/hellofs.
$ # I can now dotnet restore and run this F# app using .NET Core!

The Future of Cortana and Conversation as a Platform

So far everything I have mentioned has been mostly around solid updates to existing platforms, but this year’s Build included a slightly different way of thinking about productivity with the idea of Conversation as a Platform.

Conversation as a Platform

The Microsoft Bot Framework provides templates for creating bots with C# and JavaScript, as well as connectors to simplify their interaction with services like Slack and Skype. When linked with the new Cognitive Services, these bots can understand natural language and perform tasks for the user.

build-cortana

The demonstration of talking to Cortana through Skype was very interesting – where essentially Cortana can act as a broker between the user and other bots on the Internet which can act as experts in their field. I found this very compelling, and something I can see myself using.

As this is as subject that interests me greatly, I’ll be writing more about this over the next week or so.

And everything else…

Of course, there’s no way I could summarise everything I looked at so I have skipped a number of cool announcements ranging from Microsoft Graph to HoloLens.

The hard-working folk over at Channel 9 have videos for many of the events and topics, so be sure to check them out if you’re interested. I’m very thankful that these videos are all made available for everyone to watch, I really enjoy watching them.

Using Docker with Hyper-V: the easy way

Docker is pretty cool, but there’s one thing that always gets in the way for me.

The default installer sucks.

Installing Docker using the Windows version of the Docker Toolkit means it installs multiple things on your computer:

  • The Docker command-line tools (hooray)
  • Virtual Box (boo)
  • Kitematic, a user interface (only works with Virtual Box… so also boo?)

As I use Hyper-V as my virtualization platform of choice, Virtual Box is completely redundant. More than that, it’s an annoyance. They’re incompatible with each other.

Obviously this was no good for me, so after a bit of messing around I have found my preferred method for getting Docker up and running on own workstations using Hyper-V.

As is always the case with these things, this may not be the best way for everyone. But if you’re interested, here’s what I did:

Note: the following assumes you have some knowledge of Windows and PowerShell in order to keep the instructions brief.

Setup Hyper-V

  • Ensure you have Windows 8.1 or 10 Professional
  • Ensure you have Hyper-V installed
  • Create an external switch called “External Switch” (if you don’t have one)

Get the binaries

  1. Get docker.exe client from: https://github.com/docker/docker/releases
  2. Get docker-machine.exe from: https://github.com/docker/machine/releases
  3. Put them in a new ~\Scripts\Docker folder

Update your PowerShell profile.ps1 file

Make sure you can get to your new commands by using an alias or add the folder to your PATH, either works:

Set-Alias docker            "~\Scripts\Docker\docker.exe"
Set-Alias docker-machine    "~\Scripts\Docker\docker-machine.exe"

And then add some variables to be used by default, like the network switch and memory allocation:

$env:HYPERV_VIRTUAL_SWITCH  = "External Switch"
$env:HYPERV_MEMORY          = 2048

Create and configure your machine

After this you should be able to create a new boot2docker VM on Hyper-V:

PS> docker-machine create -d hyperv default

Once that’s up and running you’ll need to set your environment for the Docker client:

PS> docker-machine env --shell=powershell default | invoke-expression

Try out a container

Working? Great! Try running something, like the new .NET Core container:

PS> docker run -it microsoft/dotnet:latest

Update

Looks like there will be an even easier way to do this moving forward, thanks to an upcoming release of Docker for Windows which will use Hyper-V by default. (Yesssss!!!)

Find out more through this handy article from Scott Hanselman.

Windows Server 2016 for Developers

Windows Server

It’s not often I get excited about new versions of Windows Server. It has been a long time since I have professionally managed any servers or worked in any kind of IT environment. It’s also been a long time since I’ve had my own personal servers at home. At one point, I had five Windows Server 2003 boxes in an Active Directory domain!

As a developer, many of the changes coming in Windows Server 2016 have got me excited.

The things I care most about are servers which power cloud applications, and not the traditional view of a back office server for files and printers – something Windows has traditionally been associated with since the 1990s.

With this in mind, here are the top three technologies I am most interested in as a software development engineer and a solution architect.

1. Nested Virtualisation

Nested Virtualisation

Virtualisation has always been something I have been keen on, and Microsoft’s main platform for this is Hyper-V, a powerful server-based virtualisation platform which works on the client, server, and cloud.

Because Hyper-V uses a hypervisor to directly access virtualisation-enabled hardware, there has always been a limitation stopping you from running hypervisor based virtualisation inside a machine which is already virtualised. With the latest version of Hyper-V shipping with Windows Server 2016 (and Windows 10) you can actually nest these hypervisors inside each other – essentially letting you run a virtual machine inside a virtual machine.

I use a virtual machine hosted on Azure as a developer platform, so the ability to use virtualisation technologies (including Windows and Android emulators) inside of that virtual machine would be very handy. At the moment I have to run these tools locally on my physical hardware.

Currently, virtual machines need to be manually tweaked to enable the nested virtualisation – so we’re not quite at the stage where it is completely seamless, but being able to run a Windows 10 Mobile emulator inside of a Windows 10 desktop virtual machine running inside of Windows Server doesn’t seem too far fetched.

2. Containers

Windows Containers

Container technology is similar to virtualisation, but rather than having the overhead of virtualising the whole machine, applications can be sandboxed into their own execution environment while continuing to share system resources, like the file system.

This means these sandboxed applications can be started much faster and the overheads are smaller, allowing much higher density.

Windows Server 2016 brings container technology to Windows applications and also allows an extra level of separation by offering Hyper-V containers as well.

You can see why nested virtualisation is important.

Containers aren’t new, Linux has had support for containers for a while now, and the recent popularity of Docker has made this technology a fantastic option for developers to design their applications to work inside these containers, and then share them on Docker Hub.

Microsoft recently announced a partnership with Docker and you can find plenty of material from the folks in Redmond showing how the Docker tools work with Windows containers. It’s important that Microsoft get this right, as they don’t want to miss out on this important change in the way developers build and ship solutions.

With the ability to have a full VM separation running in Hyper-V containers, it’s quite possible that Linux could run on top of the Windows Server container system. A single management interface to run mixed containers? Sign me up.

For this to really take off, developers would need to be able to do this on their own machines. Right now Docker on Windows is a pain if you use Hyper-V as it’s incompatible with the current version of the Docker Toolbox. Microsoft have to be trying to fix this with their partnership and it’s likely ‘Barcelona‘ is part of this.

Windows is most certainly my platform of choice for the desktop, but I want the applications I create to be cross platform. Being able to create Linux containers using the same management tools as Windows containers is a must.

3. Nano Server

Nano Server

When trying to increase the density if your containers, you want your operating system to be as compact as possible. Windows Server has always been quite a bit larger than Linux when used in its smallest configuration.

Nano Server is a new, highly cut-down version of Windows specifically designed for virtualisation, containers, and cloud environments. Nano Server’s new reduced feature set is a minimum bar to which Windows containers can target – anything that runs on the Nano SKU can run on the Core SKU and above too. But this new minimum bar cuts out many features which are unnecessary, including any UI. If you want to do anything on Nano Server you need to use PowerShell or SSH. (PowerShell Direct is an awesome new feature which will ensure you can connect to a virtualised Nano Server even when it’s not connected to the TCP/IP network – very cool)

Out of the box, Microsoft claims that Nano Server will have over 90% smaller VHD footprint and 80% fewer reboots than the current Windows Server. That’s a big improvement for both Hyper-V hosts and guests.

Roles like IIS can be already be added to Nano Server and Microsoft’s Tools for Docker already helps you write ASP.NET, Node.js, or any other kind of application and directly target a Nano Server container. The tools are great for publishing, and remote debugging is supported, just as you’d expect.

Running a Nano Server in a Hyper-V container like this means the overhead on the developer’s machine is smaller, but it’s still running the real environment just as you’d get in production. Need a special version of a framework for a project? No problem – it’s a container running inside Nano Server which you can spin up as required. This makes me think that all three of these technologies born in Windows Server 2016 must be coming to Windows 10. You can’t expect a developer to run Windows Server 2016 on their Surface!

One Last Thing…

There is one part of this release which is bothering me.

Why call it Windows Server 2016?

I think the trend of having these year-based names must come to an end, It just doesn’t make sense anymore. I’d much rather see Microsoft brand the platform as Windows Server 10 or something similar. Think of how companies like Ubuntu brands their server versions: 14.04 LTS, 14.10, 15.04, 15.10 etc. (LTS stands for Long Term Support, something Microsoft is now doing for their Windows 10 Enterprise customers.)

Currently, Nano Server skips all of this branding in Microsoft’s documentation. I don’t know if that’s just because it’s in preview, but I hope it’s a sign of changes to come. Recently, Microsoft decided to drop year-based naming from their Dynamics AX ERP product, I think they should do this for Windows Server too.

For me, the details are important. In a world where Microsoft is finally embracing new thinking, I feel this year-based branding is a tradition that should let go.

Keep in mind it’s December 2015 and the current version of Windows Server is called “Windows Server 2012 R2 with Update” – seriously.

Windows Server 2016 is due to ship in late 2016.