4 ms·
Can someone please explain what .NET framework is? Everytime I come across it, it seems like a mysterious microsoft thing and Wikipedia's explanation is even mo
by systemvoltage 6y ago
Can someone please explain what .NET framework is? Everytime I come across it, it seems like a mysterious microsoft thing and Wikipedia's explanation is even more confusing:
> .NET Framework (pronounced as "dot net") is a software framework developed by Microsoft that runs primarily on Microsoft Windows. It includes a large class library called Framework Class Library (FCL) and provides language interoperability (each language can use code written in other languages) across several programming languages.
What is .NET framework really?
Elsewhere, it is described as "A framework to build applications in Windows", but I thought that's what the Windows API helps with.
Any help with clarification would be great, thank you.
- josteink 6y ago> What is .NET framework really? At its core: It’s what Microsoft made to compete with Java back in 2002. It’s a development platform, with associated tooling, compilers and a runtime. It has a common standard-library independent of language used by the developer (which aids cross-language interop), but realistically speaking most people just use C#. You can use it to create network services, console applications, web assembly programs or desktop GUI applications. It’s quite versatile. And .NET 5 will seemingly be the first version to officially supersede the previously Windows-only “.Net Framework” with a modern, open-source, cross-platform version instead. As a Linux desktop-user, I’m loving it.
- scruple 6y agoAre you building and/or using any .NET desktop GUI applications _on_ linux? I'd love to poke around some open-source projects to see how these are being made today.
- ZeroClickOk 6y agocheck https://github.com/AvaloniaUI/Avalonia https://github.com/AvaloniaUI/Avalonia
- pknopf 6y agoI've built this: https://GitHub.com/qmlnet/qmlnet https://GitHub.com/qmlnet/qmlnet I used it in medical devices within some of the larger medical device companies.
- cgrealy 6y ago> And .NET 5 will seemingly be the first version to officially supersede the previously Windows-only “.Net Framework” with a modern, open-source, cross-platform version instead. You don't count .Net core?
- setr 6y ago.net core ran in parallel with .net framework .Net 5 is where they drop framework and core actually supersedes it
- pizza234 6y agoI suppose that it's very similar in spirit as Java, with the difference that Microsoft presented in a more encompassing way (assuming that the definition of "software framework" was given by MS). Often in fact Java is described as a language, while, at a minimum, a Java distribution includes the JVM and the standard library. Describing as a software framework is therefore (in this sense) more exact, as the .NET framework includes the CLR and its standard library (and possibly, other components). The difference with the Windows API is that they are lower level. The simplest possible component one may think of is probably LINQ - querying functionalities are intuitively higher level than system APIs.
- wenc 6y agoA really handwavy description would be that it's kinda like a "runtime". It's very roughly analogous to the Java Runtime Environment (JRE). .NET binaries are very roughly like JAR files. (I realize the analogy is rough, but I think it would connect with folks who've never worked with a Microsoft stack)
- Inception 6y agoThis is a pretty good explanation video about the .NET ecosystem in general: https://www.youtube.com/watch?v=bEfBfBQq7EE https://www.youtube.com/watch?v=bEfBfBQq7EE
- liversage 6y agoTo simplify things you can say that .NET consists of three things: 1) A garbage collecting virtual machine (like the JVM) that executes Intermediary Language (IL) by just-in-time compiling it to native code. 2) A set of programming languages (C# being the most popular) that compiles to IL. 3) A broad set of libraries that are part of .NET or available from the NuGet package manager. This includes basic features like collections, JSON serialization and cryptographic primitives but also huge frameworks for web development using databases etc. In recent years Microsoft has open sourced big parts of .NET and basically rebuilt it from the ground up to make it cross platform. In the process a lot has been improved in terms of usability and efficiency making .NET a serious contender when it comes to building something like large scale cloud applications. The next major release of .NET is expected in November where the "old" Windows only version and the new improved cross platform version (.NET Core) will converge into .NET 5.
- at_a_remove 6y agoIf it is any consolation, Microsoft's description of .NET at its first launch was even more nebulous than that. I avoided it out of sheer confusion at how it was going to wax my car, do my taxes, and save my soul.
- kumarvvr 6y agoHaha. Inspite of the hyperbole, MS did manage to steer .NET very well. I only wish there were more libraries in the Data Analytics area, something akin to Pandas library in Python.
- Const-me 6y agoIt’s huge, has 2 decades of legacy, and has many parts. Here’s the main ones. 1. Virtual machine and JIT compiler, usually called CLR = Common Language Runtime, it runs byte code called CIL = Common Intermediate Language. They have renamed it a few times; older docs/tools may call the byte code MSIL = Microsoft Intermediate Language, or just IL. In modern .NET this thing is platform-agnostic. 2. Standard libraries for that runtime. The modern implementation is called CoreFX. It includes large count of batteries: collections, LINQ, threading and synchronization, async-await runtime, reflection, and much more. Fortunately, CIL is very compact representation of code, takes a small fraction of an AMD64 equivalent. The lower-level pieces are platform-agnostic, but there’re many windows-only pieces implementing GUI and integration with other OS-specific services like WMI, registry, ADSI and more. For WinForms and similar they just use [DllImport] to consume Win32 and GDI+. For WPF this includes large amount of compiled C++ DLLs that consumes DirectX 9 to render GUI and implement resource-intensive algorithms. For UWP this includes COM interfaces to call native Windows APIs (albeit these interfaces might be a part of Windows SDK, I’m not sure). 3. Programming languages and compilers for them, the main ones supported by MS are C#, VB.NET, and to lesser extent F#. Modern version has a single compiler for C# and VB called “Roslyn”, F# is a separate program. There’re third-party ones, see IronPython. Also some .NET based products include their custom compilers or code generators who produce CIL code from something else in runtime, I did it a few times, not too hard. There’re smaller pieces like framework SDK (a set of command-line tools to create, compile and run projects), msbuild (a build system typically used on Windows or for larger projects), and many other random programs/libraries of varying utility. Update: Forgot an important component, NuGet package manager. It’s an equivalent of Python’s pip, or JavaScript’s npm, an online repository of code packages. The majority of packages there only contain CIL code, i.e. they’re very small and platform-agnostic. The most popular package there is an alternative Json parser, was downloaded 650M times. Microsoft uses nuget to deliver optional pieces of the standard library, developers like me are publishing their weird libraries too https://www.nuget.org/profiles/ConstMe https://www.nuget.org/profiles/ConstMe
- pjmlp 6y agoYou missed C++/CLI.
- runfaster2000 6y ago.NET was built in the time of early Java, and so has many similar characteristics: virtual machine with a garbage collector, executes compiled processor- and OS-independent binaries, supports multiple languages, and a large class library. A lot of these early bets were good. .NET has been used in almost all the relevant computing devices today, to greater or lesser degrees of success (not all from Microsoft). More recently, .NET has been focused on cloud native space and high-performance web applications. It has been open source and cross platform for about 5 years now. Here's an example of work we've done for containers: https://devblogs.microsoft.com/dotnet/using-net-and-docker-together-dockercon-2019-update/ https://devblogs.microsoft.com/dotnet/using-net-and-docker-t... Here are two good blog posts to demonstrate what we've been up to performance-wise: https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-5/ https://devblogs.microsoft.com/dotnet/performance-improvemen... https://devblogs.microsoft.com/dotnet/arm64-performance-in-net-5/ https://devblogs.microsoft.com/dotnet/arm64-performance-in-n...
- kqr 6y agoYou would definitely be excused for feeling puzzled. I got thrown into a full time cross-platform .NET development role with zero experience in .NET, and figuring out how it all fit together (especially a couple of years ago) was a nightmare. I wrote down some of my discoveries here: https://two-wrongs.com/dotnet-on-non-windows-platforms-brief-historic-summary.html https://two-wrongs.com/dotnet-on-non-windows-platforms-brief...
- deleted 6y ago[deleted]