Glue and Microsoft

The Glue 2015 conference was held in Broomfield a few months back and showed a lot of what’s going on in the open-source (or at least non-Microsoft) development world. Between exhibitors, presenters and attendees, there was an impressive energy and a lot of good ideas on how to build better software.

A big theme was microservices. Docker was one of the previous year’s themes and has become effectively commonplace in this space. A microservices architecture, built into Docker containers, deployed to the cloud and managed by a monitoring system was the predominant approach being described and/or used by the speakers at the conference. The fullest realization of this is a self-healing architecture that can spin up a new instance of a service or other component in the cloud when the monitoring system detects one has gone down or become overloaded. That’s a pretty impressive goal.

Overall, the tools and approaches being used seem to add up three very valuable things: agility, scalability and quality. Docker containers and cloud infrastructure can be used to help make deployments quick and easy. Microservices allow development and deployment to be very focused on one functional area, making quick development cycles and frequent deployments easier. That architecture also opens up a lot of opportunity to scale out and up. Finally, production monitoring helps complete the quality cycle that (hopefully) began in development. There was certainly an inspiring level of enthusiasm and innovation present at the Glue conference.

It’s interesting to take some of the ideas and approaches towards software development that were presented at Glue and compare them to what Microsoft is currently doing. Starting in the fall of 2014, they’ve been putting out some pretty interesting things around where development is going with Visual Studio 2015, the .NET Framework and ASP.NET 5.

That they have moved to an open-source, cross-platform model is a big move itself, but there are some interesting details under the surface (actually, a lot of them) which are going to have a significant impact on how software is developed with these tools. Even though cross-platform .NET has been available with Mono for a while, Microsoft has made a lot changes that bring it fully into that space. In fact, the entire ASP.NET development experience has changed quite a bit.

One fundamental change is the introduction of .NET Core, which is a lightweight, modularized version of the .NET Framework; the libraries that make it up are served up as NuGet packages. To build an application, you explicitly include the packages you need and wire things up in the app startup and configuration code. Even inclusion of config files is explicit and the new model is more about transparency and flexibility than automatic configuration. The breakdown into NuGet packages is rather fine-grained, too. For example, Entity Framework is spread out over a few different packages. Though this requires a more in-depth knowledge of the library structure than may have been necessary in the past, it comes with at least one obvious up-side: a small footprint. Your application can include only the packages that it actually needs.

That small footprint is good from a deployment perspective, especially given that the new deployment model is self-contained. An application can be deployed along with all the .NET Core packages and CoreCLR runtime version that it needs, rather than relying on global installations on the target system. The self contained nature of the deployments combined with the small footprint should be valuable in a microservices architecture. Additionally, this makes side-by-side deployments of applications targeting different .NET versions easier.

Microsoft is also embracing the container approach in adding support for Docker. Linux servers on Azure already support Docker and configuring a publish profile to a Docker container is available in Visual Studio 2015. Support for Docker on Windows Server is on the way.

ASP.NET 5 applications are composed using OWIN and middleware. The middleware approach provides quite a bit of flexibility and control over how your application is put together. Though this isn’t entirely new, Microsoft has certainly solidified this as the core of the application architecture. Especially combined with .NET now being open source, the ability to extend and customize here is pretty intriguing. Even short of delving into contributing to the .NET code base, being able to peek into the code and understand in detail how something is implemented can be rather useful.

The nature of the .NET stack is changing. Not only can .NET apps now be deployed on non-Windows environments, the entire development experience is available cross-platform. Visual Studio itself still only runs on Windows and the 2015 version has a lot of great features for developers who prefer this IDE. However, much of the workflow has been built to use external utilities; including some new ones provided by Microsoft for managing packages, working with Entity Framework migrations and more. Given that, a developer on Mac OSX could use Sublime and familiar tools such as NPM and Bower, along with .NET utilities that run from the command line and enjoy a development experience familiar to non-Microsoft developers. That means developers can work in the environment and (generally) with the development tools they prefer. That also makes it easier to put C# and .NET in the stack in new ways. Being able to freely combine the best tools and technologies for a given project and team is very valuable.

Visual Studio 2015 encourages working with open-source tools such as NPM, Bower, Grunt and Gulp and provides integration points for them. Client-side development can be easier, more flexible and lightweight than in the past, even if staying within Visual Studio; of course, stepping outside those bounds is easy. As in much of the development world, Angular has found prominence in Visual Studio. Templates for adding common Angular items such as controllers, modules, factories, etc. are built-in. Even if using other JavaScript frameworks, the development experience is very much improved.

Overall, Visual Studio 2015 and ASP.NET 5 represent a big change, rather than just another iteration of familiar tools; there will be a learning curve even for seasoned developers. The development experience has changed significantly, the .NET Framework has been restructured for .NET Core and certain parts (such as Entity Framework) have effectively gotten a rewrite. All of this being transparent, open-source and cross-platform. For .NET developers, this opens the door to new ways of building software, aligning with some of the innovation in the open-source world. For developers who haven’t used .NET in the past, this makes it more accessible to wire-in .NET to their stack while still working in overall environments that they’re familiar with. It will be very interesting to see where things go from here.

About the author

Leave a Reply

Your email address will not be published. Required fields are marked *