The Greasy Hands Guide To Getting Started In .NET

When you first begin pitter-pattering around .NET (also written as lowercase .net and dotnet) and the Microsoft stack, you’ll probably find yourself thinking:

Wow – dotnet is confusing...

You can get lost in all the different ways to do the same thing.

If you’re coming from other ecosystems like JavaScript where every platform seems to try to do only one thing, it can take some time to wrap your head around all the nomenclature and tools that make up the vast multi-generational forest that is .NET.

If you’re just joining us here around the end of 2017, you’re in for an even bigger landscape as some heavy restructuring has been going on to evolve dotnet into its cross platform and open source future.

So... where do you start?

Fear not! Have another slice of pizza and follow along as we bootstrap you from noob to next steps.

But first – Get some context AND impress your boss after reading this three part .NET History email series.

The .NET Tool Decision Flowchart

To get you on your feet the fastest, have a look at this nifty decision chart that takes you to the dotnet application model that you’ll want to start with.

A decision flowchart for what dotnet tool to use

Where did you end up?

Hopefully that got you a tad further. Big thanks to those that helped me with the final touches1.

The Trade-offs

The biggest thing to know right now is that there are trade-offs between the major platforms.

It comes down to choosing something stable and battle-tested that only works on Windows, vs. the new hotness (well, new as of a couple years ago) that is cross-platform but is evolving so quickly that you’ll need to plan in for lot’s of technical debt to stay caught up.

If you’re a beginner and just looking for something to learn, stick with the right side of the chart (.NET Core) and your skills will stay future proof.

If you’re building a large enterprise application that will be fine running only on Windows, you might appreciate the sense of security and maturation by sticking with .NET Framework. This doc from Microsoft might also help in this decision.

To give you a launch pad – I’ll share my thoughts on each of the application models (the blue termination points on the chart) and offer some links to learn more.

Windows Forms

To me, WinForms is the basic of the basic. If you just want to throw together a simple Windows desktop program or console app to share with your non-Mac-using friends, this is your guy.

Where to go from here:

Windows Presentation Foundation (WPF)

WPF is the newer desktop app model for .NET that aims to give you the tools to create richer and more modern user interfaces. Where WinForms is optimized for…Forms, WPF is for the chrome. Animations, multi-media, and graphics.

WPF does a good job at keeping code and presentation separate (unlike WinForms).

Where to go from here:

ASP.NET MVC

If you’re going with the battle-tested and stable side of .NET, ASP.NET is what you’ll use to build server side applications like web apps, APIs, and other web-based services.

At the time of writing this, MVC 5 is the latest version you’ll want to work with.

At my work, the app I work on is mostly written in a technology called Web Forms that you might run into in your exploration. I didn’t list it here because it uses an antiquated development model and would be a poor choice to start your journey with.

Where to go from here:

ASP.NET Core (MVC & Web API)

ASP.NET Core is the web and server side model for .NET Core. If you’re a complete beginner and are just looking for the smart choice to begin learning on, I would say this is your best bet.

By all estimations, this is the direction Microsoft is putting the most money in so you won’t be wasting your time starting here. And the web is the future, right?

Web API is actually under the MVC umbrella but I put it there just to make it distinct. Web API is the library you would use for creating an API. The same is true for .NET Framework.

An important note about documentation

Many of pointed out to me that, because .NET Core is evolving so quickly, the documentation and tutorial section is not in a great state.

.NET Core 2 is the latest release at the time of writing this but prepare to run into disparities between tutorial information and what ACTUALLY builds correctly using the latest tools.

I’ll try to help sort through this when I can.

Where to go from here:

Universal Windows Platform

The Universal Windows Platform is Microsofts attempt at providing a standardized platform for you to build apps that can run across the full range of Windows devices.

That means you can build something once and have it run on Windows Desktop, Xbox, HoloLens augmented reality, Internet of Things (IoT) devices, and more.

At the time of writing this, I recently got a new Surface Book 2 laptop (which is badass by the way) and it is what introduced me to the new Microsoft Store that features a ton of new UWP-based apps. Might me a cool way to make a tiny bit of side-income on an app since it doesn’t look like competition is very high yet.

Where to go from here:

Honorable Mentions

Xamarin

I left out Xamarin because I consider it more of an accessory tool rather than something you start with.

Xamarin allows you to reuse existing .NET code within mobile operating systems – you can build something once and have it compile down into Android, IOs and Mac apps.

I might be biased because I’m also an Android developer, but I think it would be better to build native apps using the tools the platform provides, both for optimization and as a learning exercise.

Xamarin has a place though, particularly if you already have a large .NET codebase that you’d like to leverage with mobile.

Learn more from the official docs.

Mono

Mono is an open-source, cross-platform version of .NET (like .NET Core) that was not created by Microsoft.

I know very little about it at this time but apparently Microsoft is working closely with it so it still has some life to it. I wouldn’t recommend starting out with it when .NET Core is available.

Here is the Mono website if you want to learn more.

Still lost?

If you haven’t jettisoned off from one of these launch pads yet to continue learning, why not? Let me know on Twitter and while you’re there, give this article a share if you think it could help someone.

This article’s URL to copy and paste.

  1. Folks on Twitter that pointed out some of the issues with the first iteration of the flowchart: @shanselman, @smaine, and @jimgale. Thanks guys!