New Hotness in .NET

The .NET world is not evolving at the breakneck speed you find in the browser/Javascript world, but in the last year, we’ve seen a lot of the rust blown off the ecosystem and community. .NET is starting to be an exciting place once again, and with some love, courage, and effort we can bring the excitement of the Ruby/Go/Node/JVM worlds back to .NET and be technology leaders rather than simply Microsoft fanbois. Newness itself is not necessarily a virtue (this is the weakness of the Old and Tired/New Hotness format), but everything here has something interesting to learn even if it is only to improve your use of the Old and Tired frameworks and tools you have. New Hotness isn’t about throwing out your old work, it’s about creating a change in you that creates excitement and freshness in the work you do.

Old and Tired: .NET Framework
New Hotness: Core CLR
The good old .Net framework. So solid and fast and useful. Unfortunately it is wired into the core of Windows, which makes it more of a challenge than it should be to change and update. And try and run it on a non-windows operating system. Not too long ago, serious people were starting to suggest that .Net’s days were numbered because of its closed source slow evolution. Today, we have a fresh shiny implementation that has been cut completely free from Windows and can be evolved with a github pull request. CoreCLR can be deployed in your application folder and runs great on Linux and MacOS. I’m sure we will start seeing it integrated into things like the Unity game engine. Exciting times!

Old and Tired: Visual Studio 2013
New Hotness: Omnisharp
Visual Studio is an incredible IDE, seriously. Try the other ones 🙁 they aren’t even close. It is, however, very heavy when compared to a text editor. Slow to load. Complicated. These things warp your development. Not always in bad ways. But still it’s warping. By adding itellisense to Vim, Emacs, and Sublime Text, Omnisharp overcomes the biggest hurdle to using a lightweight text editor in your .Net workflow.

Old and Tired: SOAP WSDL
New Hotness: Swagger
Interoperability using restful or HTTP/JSON web services is so much lighter and more flexible than the agony of SOAP proxies and cross component dependencies. Unfortunately, documenting those services, or generating the boilerplate clients can be a pain. Swagger is a standard for documenting a service api using JSON and is a big part of the new Azure API Apps service.

Old and Tired: log4net
New Hotness: Serilog
Log4net and nLog allow you to print out log lines to instrument your application. Serilog behaves much the same way, but incorporates an understanding of the structure of the data your are logging allowing you to store your log in a richer data store and perform rich analysis of the logged data in a way that has always been just too painful to parse out of an old-and-tired-log.txt file. Serilog does this without adding programmer complexity when adding logging to your classes. You can also link it up to Seq for centralized log storage and analysis.

Old and Tired: WCF/IIS/Windows Services/COM Servers/Scheduled Tasks
New Hotness: AKKA.NET
Only small applications are written without a separation of backend duties these days. There are notifications to send, APIs to call, reports to collect. The classic .Net programming model only gives us the barest guidance as to how to structure and code these kind of applications. Akka.Net is a port of the Java Akka framework, which is in turn inspired by the Erlang runtime which is known for providing a highly reliable development model for backend services in telephony and message processing. While nothing on .Net or Java can guarantee the robustness of the Erlang runtime, Akka provides a lot of infrastructure and guidance for making your backend code into manageable components with comprehensible life cycles. The creators have also created a training bootcamp for learning the tech.

Old and Tired: nUnit
New Hotness: Fixie
nUnit has a standard lifecycle for a test and a class full of tests. However, it is one-size-fits-all, which means you have to cram your broad shoulders into a too-tight jacket. Fixie is a configurable, convention-based testing framework that allows you to structure your test classes in a way that aligns with the code you are testing. Need data-driven tests? Structure them that way. Need a new database instance for each test? Can do. Need to run code before and after parts of your test cycle? Do it! The correct structure for your test classes can make the difference between useful, flexible tests and brittle fragile ones that break every time there is a change. Learn more from the Pluralsight course. Fixie also allows for a choice of assertion frameworks rather than including a default one, allowing the test grammar to be more expressive.

Old and Tired: Msbuild, Rake
New Hotness: Fake
Build scripts? F#? Let’s do this!

Old and Tired: WebApi
New Hotness: Angular with SignalR
‘REST’-ful endpoints are great for supplying data and services to your front-end app, but there are a lot of timing issues, serialization issues, and boilerplate code to work with. What if you could just pass data and method calls back and forth with the server with a real-time connection between the web server and the Angular application? With SignalR you can.

Old and Tired: Stylecop
New Hotness: Roslyn Code Formatter
Automatically format code to follow coding standards before checking it in.

Old and Tired: Nuget
New Hotness: Paket
Nuget is great, but it doesn’t model transitive dependencies well, it doesn’t support semantic versioning, has assembly binding redirect problems, and doesn’t provide a lot of control when you have multiple versions of a sub-dependency required by your libraries. Paket provides a nuget-compatible solution for greater control of your dependency chain, and allows additional hotnesses, such as referencing single files of a GitHub repository (dapper, anyone?) instead of requiring a package wrapping a dll.

Old and Tired: SQL Server
New Hotness: OrigoDB
Ok. I’m not sure if this one is ready for the ‘hotness’ label. It’s edge still has a little too much blood on it. The idea is, however, really sexy. Imagine storing all of your database data in RAM, and interacting with it using clear CQRS semantics. Add in replication, pluggable disk persistence and serialization, and the flexibility to model graph, relational, document, and key-value data, and you have the start of something hot.

The .Net ecosystem is getting better and richer, and in a couple of weeks, people from around the world will be getting together here in Portland to celebrate this, and share what they are doing. Why not join them at .NET Fringe?

Experiment with and share your C#, VB, and F# code with .NET Fiddle