Review: Visual Studio 2015 breaks new ground
Sweeping upgrade improves everything from language support to lifecycle management, and it opens the door to cross-platform development
-
Microsoft Visual Studio 2015
Visual Studio has always been a big product with a raft of features that grew with each release. Visual Studio 2015 extends that trend in ways I never expected to see from Microsoft.
Cross-platform mobile app development? Check that box at least twice, once for Xamarin and once for Cordova, with extra credit for portable C++ and integration with Unity.
Cross-platform servers? Check that box at least thrice, for .Net Core, ASP.Net and Entity Framework, and Python and Node.js.
Cross-platform editing and debugging? Yes. Visual Studio Code runs on Mac OS X, Linux, and Windows.
Cross-platform application lifecycle management? Git and GitHub are supported, and Microsoft has extended the Git support in Team Foundation Server to allow for continuous integration with the same kinds of smart check-in rules that Team Foundation Server has for its version control system.
Cross-platform builds? You got it. In addition to working with Visual Studio Build and MSBuild, Team Foundation Build can use Ant, Gradle, Maven, Android Build, Gulp, Xcode, and others.
Of course, Visual Studio still supports development for, you know, Windows, and still includes all the old technologies for Windows desktop apps, from console apps built in C++ with Windows API calls to Windows Presentation Foundation apps in C# and XAML designed in Blend for Visual Studio 2015. But the definition of Windows has expanded for Windows 10, with universal Windows Platform apps. These applications are intended to work unchanged on hardware ranging from phones to tablets to laptops to desktops to Xbox game consoles to augmented reality headsets to Surface Hubs to servers to cloud. How well that particular vision will pan out still remains to be seen.
New in Visual Studio 2015
As I mentioned at the outset, Visual Studio 2015 includes extensive support for cross-platform mobile development: Apache Cordova installation and integration, Xamarin installation and integration, portable C++, an enhanced Android Emulator, and Unity integration.
You can build cross-platform server applications and deploy them to Windows and Linux servers, as well as run them on Mac OS X desktops and laptops. Server support includes ASP.Net 5, Python, Node.js, and the new open source .Net Core 5 for Windows, Linux, and Mac OS X.
In Windows development, there’s the new generation of universal apps, new diagnostic tools, and new design features. In the area of productivity, there is better debugging, including debugging lambdas and doing performance monitoring and historical debugging simultaneously. In the editor, the Roslyn language processors power a lightbulb that pops up when and where there’s a common issue in the code, and offer automatic code fixes and improved refactoring. Meanwhile, Visual Studio 2015 has many programming language updates, including C#, Visual Basic, C++, and TypeScript, along with extensions for Python and Node.js.
Visual Studio Online and Team Foundation Server 2015 now sport extensibility hooks and integration with Trello, Campfire, and the like. The agile planning function includes Kanban boards and swim lanes. You can now do quick code edits and commits right in Visual Studio Online and Team Foundation Server. You used to have to go back to Visual Studio or another code editing tool.
Speaking of other code editing tools, Visual Studio Code is a free cross-platform (Windows, Linux, and Mac OS X) code editor built on the open source Atom Electron shell, with deep language support from Roslyn and the TypeScript compiler, covering more than 30 programming languages at the syntax highlighting and bracket matching level in addition to a few at the IntelliSense level.
.Net Core 5 is a cloud-optimized, cross-platform, open source implementation of the .Net Platform that currently supports Linux, Windows, and Mac OS X. It also runs inside Docker containers on Linux. .Net Core is a refactored subset of the .Net Framework, has both native and CLR (application VM) runtimes, and supports both Windows Store and ASP.Net apps.
Universal Windows Platform apps not only run on a wide range of hardware, they use the fast .Net Native runtime. You can choose from the C#, Visual Basic, C++, and JavaScript languages (including Cordova) and construct your UI in XAML, DirectX, or HTML. You can preview XAML designs in Visual Studio on a range of device dimensions, from a 5-inch phone to an 84-inch Surface Hub. You can use device-specific extensions in Universal apps, as long as you wrap these extensions in code that checks for the presence of the appropriate APIs at runtime. While you can design XAML in Visual Studio, the preferred tool for XAML design is the revamped Blend for Visual Studio 2015.
Updated programming languages
C# 6 and Visual Basic 14 offer a few welcome language updates, including nameof
expressions, null-conditional operators, await
in catch
and finally
blocks, and expression-bodied function members.
Standards and portable code mark the C++ language improvements, such as conformance to the C++ 11 and C++ 14 standards and the inclusion of some C++ 17 features. The C++ compiler now has faster builds and enhancements to code generation and security. I don’t know if the builds are now fast enough to eliminate the extended “compiling” sessions that C++ coders often use for brewing coffee, visiting the facilities, and playing table tennis. It can take a long time to port a large code base to a new C++ compiler version and perform all the necessary regression testing.
F# 4.0 was built in the open by the F# community developers, about a quarter of whom are affiliated with Microsoft. There are many improvements to the language and tools, but the most obvious ones for me are the improved IntelliSense and debugging.
TypeScript 1.4 and TypeScript 1.5 (Beta) continue to build new features to work with more JavaScript patterns, create richer typings, and use new ECMAScript 6 features.
The Python Tools in Visual Studio 2015 support CPython, IronPython, PyPy, Anaconda, and other Python compilers, and they give you IntelliSense in the editor and interactive debugging, including mixed mode (Python/C++) and cross-OS debugging.
Since my review of 7 JavaScript IDEs, the Node.js Tools for Visual Studio, now at version 1.1 RC, have added support for Visual Studio 2015 (natch) and a new Linux-based Dockerfile template to make it easier to get your app up and running in a Docker container. To add the Dockerfile template to a Node.js project, right-click your project, select Add New Item, and select the Dockerfile template.
This version of NTVS also improves Node.js IntelliSense, formatting, debugging, TypeScript, unit test running, and Npm integration. With an additional download, NTVS 1.1 RC supports a new IoT extension that can deploy Node.js-based universal Windows apps to Windows IoT Core devices such as Raspberry Pi 2.
Code editing in Visual Studio 2015
Some years ago, I had a private briefing from the then-GM of the Visual Studio team about the plans for the next version of Visual Studio. After running through the slides, she asked me what else I’d suggest, and I pointed out that the squiggly-underline convention for real-time spell checking in Word could be applied to real-time syntax checking in Visual Studio. Much scribbling ensued; the feature duly appeared in the next beta.
Then she asked me, with a glint in her eye, if I wanted Clippy in Visual Studio. Laughing, I said, “Not yet. Maybe not ever, unless the suggestions it made were really good.” (Clippy had a terrible reputation among Word users for making stupid suggestions in an annoying way.)
The equivalent of Clippy in Visual Studio 2015 is a Light Bulb, which appears whenever the Visual Studio editor thinks it sees a code problem and has a suggestion, and whenever you type “^.”. The Light Bulb not only suggests fixes to common code issues, but also possible code refactoring. The refactoring menu has disappeared and all refactoring operations have been moved to the Light Bulb. On balance, I’d say the Light Bulb is a good thing.
Variable renaming is greatly improved in Visual Studio 2015; you can actually see what it’s going to do before it happens. Live code analysis and automatic correction is also greatly improved. Part of the magic is that the analysis is informed by specific code-aware guidance for the Microsoft platforms and NuGet packages you're targeting.
It seems like a small change, but you can now customize, save, and restore window layouts for Visual Studio. Why does this matter? If you periodically switch among computers with different screen sizes, you’ll save yourself tons of time by simply pulling up your optimized layout for the screen you’re currently using.
Visual Studio now has touch support: scrolling (tapping-and-dragging on the editor surface on the regular and enhanced scrollbars), pinch-to-zoom, selecting a whole line by tapping in the editor margin, selecting words by double-tapping them, and pressing and holding to invoke the editor context menu. If you have a development machine with a touchscreen -- you should if you’re developing for Windows 10 or mobile devices -- you’ll find this handy.
And my personal favorite UI improvement: No more ALL CAPS menus. Good riddance.
Testing, debugging, diagnostics, and performance monitoring
Those of you who always write perfect code on the first try can move along, there’s nothing to see here. The rest of us are in for a treat: Visual Studio debugging, which was already pretty good, has gotten even better.
Conditional breakpoints have been around for a long time. Now we can also specify actions to take when a breakpoint is hit. That includes breakpoints on autoimplemented properties, and the use of lambda expressions in breakpoint actions, watch expressions, and the Immediate window.
Two new tools -- the Live Visual Tree and the Live Property Explorer -- let you examine the visual tree of your running Windows Presentation Foundation or Windows Store app. New diagnostics available during debugging are the Events list, the Memory Usage tool, and the CPU Usage graph. Meanwhile, as you run code in the debugger, Visual Studio automatically times it, and tells you the (estimated) elapsed and CPU time for the code. You used to have to work on performance after you had debugged.
When you’re not debugging, you can use a new Application Timeline tool to track system resource consumption over time for Windows Presentation Foundation, Windows Store 8.1, and universal Windows Platform XAML apps. Similarly, the Network Diagnostic tool lets you track HTTP network operations for Windows Store apps and Windows universal apps. And if you’re developing DirectX apps (often, but not always, games), you can now watch Frame Time, Frame Rate, and GPU Utilization graphs while the applications are running live. These indicators will give you a handle on whether the GPU or CPU might be your app’s performance bottleneck.
InfoWorld Scorecard
|
Capability
(30%)
|
Performance
(30%)
|
Ease of use
(20%)
|
Documentation
(10%)
|
Value
(10%)
|
Ease of development
(20%)
|
Overall Score
|
---|---|---|---|---|---|---|---|
Visual Studio 2015 | 10 | 9 | 8 | 8 | 9 | 0 |