.Net Learning Resources and a tour - OperationCode/member_content GitHub Wiki
Terms, platforms, and different frameworks
C# is a programming language. So are Visual Basic .Net, and F#. Of the three, C# is the most popular one, F# is the nerdy academic one, and VB is viewed as an awkward cousin (nevertheless, it actually has almost the exact same features as C#). These, along with other .Net languages, all run using the CLR Virtual Machine. That means that in order to run a program written in one of these languages, you must have the runtime vm installed. This is analogous to how Java, Scala, Clojure, Kotlin, etc all run on the JVM (you know...those prompts saying you have to "install Java" to continue). In fact, C# and .Net were designed directly in response to, and as better versions of Java and the JVM.
On Windows, the .Net Runtime/CLR has been installed by the default since Windows 7. If you want to run cross-platform you will not be able to target this VM as it is tied deeply into Windows. Instead, you will target the CoreCLR VM (all the project templates with "Core" in the name do this). .Net Core is a recent project to bring .Net to all platforms. It can be a bit rough around the edges, but is generally considered stable. All the normal .Net languages can target CoreCLR, but be aware that not all features might be available. You can run a CoreCLR project on any platform, including on Windows.
The .Net Framework is a massive library of utilities provided by Microsoft that targets CLR (and therefore is Windows-only). It is what is often called a standard library, standard base class library, or BCL. It includes things like libraries to parse XML, read files, serve web requests, and process lists. Confusingly, ".Net Framework" is often used as a synonym for any .Net development on Windows with the CLR.
.Net Core is the much smaller (but rapidly growing) library of utilities provided by both Microsoft and the community that targets CoreCLR. Confusingly, ".Net Core" is a term used for any development that targets the CoreCLR, the libraries, and the CoreCLR itself.
.Net Standard is a specification for a "standard set" of utilities that is guaranteed to be available in any version of any .Net/CLR. Confusingly, ".Net Standard" is pretty new and not all of it is available everywhere.
Along with .Net Framework/CLR, and .Net Core/CoreCLR, there are other libraries/runtimes that exist. These include Mono, Portable Class Library (PCL), Xamarin Mobile(?), and others. All have their own standard libraries and virtual machines and all are targeted by slightly different versions of different languages (though 99.9% of the time the languages are the same). Almost any time that you are discussing .Net development you will be talking about .Net Framework, and occasionally .Net Core.
The .Net Framework has had major releases of versions 1.1, 2.0, 4.0 4.5. Of these, the jump from 1.1 to 2.0 was huge (generics were introduced), and the jump from 4.0 to 4.5 was significant (dynamic was introduced). Otherwise, these are mostly backwards compatible and you can run for example a program built and tested with .Net 4.7 on the 4.5 CLR, and likely even on the 2.0 CLR (but probably not 1.1).
Asp .Net is a generic term for web development on any .Net platform. It is also used to refer specifically to the parts of the .Net Framework web development utilities that hook directly into the IIS web server and are therefore not cross-platform/.Net Core compatible. Confusingly, ASP is a historical predecessor only and is not a part of the .Net landscape.
Commonly Used Frameworks
- Asp .Net Mvc is the standard MVC web server library. It includes Asp .Net Web API which is a very similar framework specifically for returning data (whereas MVC specializes in returning HTML). It is possible to have a Web API project as a standalone but commonly when talking about Asp .Net Mvc, people mean using the two in conjunction.
- Webforms is an older web technology that has gone out of vogue. It was primarily used in the early days of .Net to abstract away a lot of the "web stuff" for developers that were coming from desktop development to the web. It is too clever for its own good and rather complex. It is available on .Net Framework and Mono.
- WPF is a pretty decent commonly used Desktop-UI framework. It ties heavily into the way that Windows works and is .Net Framework only.
- Winforms is an older desktop-ui framework. It also is .Net Framework only.
- Xamarin.Forms is a cross platform (mobile and desktop) UI framework that targets Mono.
- Unity 3d is a game and UI building IDE, and runtime that runs on Mono.
- OWIN is a standard for how web requests should be handled in a composeable pipeline. It is essentially the concept of middleware. Many older frameworks precede it (eg Asp.Net Mvc) but some have been adjusted to be OWIN-compatible.
- Entity Framework is an open source ORM maintained by Microsoft that is almost ubiquitous in .Net. It comes in two versions: db first - where you point it at your database and it generates code for you to use; or code first where you write the code that you need and a database is generated from there. The latter is strongly preferred as, in addition to leading to better designed code, it contains a library for migrations. This is an incredibly useful technique for automatically modifying your database to match the needs of your code. An EF Core version also exists for CoreCLR
The Resource List
- Interactive C# Tutorial and Guide
- C# Basics - Basic syntax
- Awesome .Net Index - Many many resources, kinda a grab bag.
- Microsoft c# In-Browser Tutorial - a 20 part article series that takes you through a lot of the basics of the language itself and a bit of patterns and recommendations
- Getting Started with Asp.Net Core - Same author as the above, a multipart tutorial of the
Asp.Net Core
framework - Interfaces and Patterns
- Full Stack EF - Entity Framework Patterns Demo. I personally dislike the extravagance of these patterns, but its at least something
- C# Tutorial for Beginners on Youtube
- Foundations of Programming e-book - a bit dated, but fantastic and well written ebook about the high points of good software development with C# as an example
- Getting Started with F#
- A lot of resources on web development with .Net here
- A coding-game course which can work in various languages, C# being one of them. Great for getting a feel of the language itself.
- C# books and tutorials list
- Coding in Unity for beginners