Microsoft Build 2017 is a wrap, and there were some big announcements, but what about the little stuff that helps you as developers and IT Pros? Let’s trudge through the forest and into the weeds to learn some of the things you may not have heard about.
Before we get started, here are the links to Day’s 1 & 2 of the 3-day conference:
Script Lab for Office Add-ins
A few years back, Microsoft introduced this concept of creating apps that live in a side pane within Microsoft Office. They showcased scenarios where a small app can read and write data in the document to add new capabilities. For example, you could use Excel, and the side pane could let you assign commonly used formulas.
Over the years, Microsoft has progressed these side-pane apps to be the new way you create Office Add-ins. If you, as a developer, want to sell your app on Microsoft’s Store, then you have to get on the Office Web Add-ins train. I am writing about my experience on that in an ongoing series called Cloudifying my app right here on TechGenix.
Unfortunately, building an Office Web Add-in means writing your code blind in Visual Studio and then running Office and trying to make it work again.
That all changes with Microsoft Script Lab. Script Lab is a free Office Add-in you can install from the Microsoft Store (just choose Insert->My Add-ins and search for Script Lab). This add-in showcases the many features an Office web add-in can perform. Not only does it give examples, but it shows you code. It has a console window, a DOM previewer, and references to online documentation. At this point, I am unsure as to whether this is only available for Microsoft Word or other apps, but it is a significant step for anyone who wants to write an app for Office that targets any operating system.
The following image shows Script Lab running in Microsoft Word. At the top of the window, you will see the various icons available. At the far-right is a sample app running that lets you add and retrieve images, and at the bottom-right is the console window and DOM previewer.
Microsoft’s Juan Balmori gives a short 15-minute overview of the technology here.
Static pages and Visual Studio
Static sites as a project type
A day at the SPA
With the SPA templates in place, you can create a new folder for your project. As you can see in the following image, you simply type dotnet new and then type the project type you want.
With your SPA template in place, you can now open the project directly in Visual Studio and start working.
Save and autorefresh
In what is great news for Visual Studio developers, you can now have a project automatically refresh in the browser. Whenever you save a file, you can see the changes in real-time in your browser. Cool stuff.
Cool web extensions for Visual Studio
As part of the static website presentation, Microsoft showcased many more tools that will be useful for any developer, including:
- Web accessibility checker – review the website to make sure it is accessible. For example, the checker will throw a warning if you:
- Do not have enough contrast between text and backgrounds.
- Do not specify the language in your html header.
- W3C validation extension – Make sure the final output of your app complies with W3C standards.
- Task Runner Explorer – Call Webpack, Yarn, Node.js, and other tools with the Visual Studio UI. You can even set up events to force these commands to run based on certain triggers, like opening your project.
- Support for Surface Dial – Want to change the CSS in your code? Click the Surface Dial and rotate to get a live preview of the color. Neat!
- TypeScript – I mentioned this earlier, but it is worth repeating that TypeScript is going to be a first-class citizen in Visual Studio.
Now that Microsoft owns Xamarin, they are investing heavily in cross-platform development. In a previous recap, I mentioned that XAML Standard is out, but there are some other pretty cool features out as well. For example:
- Xamarin Live – Build your mobile app and preview it at the same time without even having to save first (!).
- .NET Standard 2.0 – With .Net Core, .Net Framework (and its many versions), and other variants, Microsoft is working to provide a path that helps developers choose which version of .Net to use. .Net Standard is an attempt to help ease the pain, but I think the messaging needs some work (I would go on about this but that’s an article for another day).
- Visual Studio for the Mac – Technically, Visual Studio for the Mac has been out for some time, but it was in a preview state. Now, you can get the final GA (general availability) version.
There is much more, but those are the big unsung features that I thought would be of interest to those deep in the software development trenches.
If you missed Microsoft Build, you should peruse the Channel 9 library as nearly all the content is already up.