Dot NET
.NET is a free, open-source, cross-platform developer platform created by Microsoft for building many different types of applications. With .NET, you can use multiple languages, editors, and libraries to build for web, mobile, desktop, games, IoT, and more. .NET is built on a high-performance runtime that is used in production by many high-scale apps.
The .NET platform has evolved significantly since its initial release in 2002. What began as a Windows-only framework has transformed into a truly cross-platform ecosystem capable of running on Windows, macOS, and Linux. This evolution has made .NET one of the most versatile and widely adopted development platforms in the world, powering everything from small web APIs to large-scale enterprise systems.
Modern .NET applications benefit from a rich ecosystem of libraries, tools, and frameworks. ASP.NET Core enables high-performance web development, Entity Framework Core simplifies data access, and Blazor allows developers to build interactive web UIs using C# instead of JavaScript. The platform's commitment to performance, security, and developer productivity makes it an excellent choice for building scalable applications in 2024 and beyond.
Three basic stages of the change of .NET technology
The evolution of .NET can be understood through three distinct stages, each representing a major shift in the platform's capabilities, reach, and design philosophy.
Stage 1 — .NET Framework (2002–2019)
The original .NET Framework was a Windows-only platform that provided a managed execution environment for building Windows desktop and web applications. It introduced the Common Language Runtime (CLR), the Base Class Library (BCL), and ASP.NET for web development. While powerful, its Windows-only nature and monolithic architecture limited its applicability in a world moving toward cloud and cross-platform computing.
Stage 2 — .NET Core (2016–2020)
.NET Core was Microsoft's response to the need for a cross-platform, open-source, and modular .NET. It was rebuilt from the ground up to run on Windows, macOS, and Linux, with a focus on performance and cloud-native development. .NET Core introduced a new project system, a new CLI toolchain, and a dramatically improved performance profile compared to the original framework.
Stage 3 — .NET 5 and beyond (2020–present)
Starting with .NET 5, Microsoft unified the .NET Framework and .NET Core into a single platform simply called ".NET". This unified platform combines the best of both predecessors and continues to evolve with annual major releases. .NET 6, 7, 8, and 9 have each brought significant performance improvements, new language features, and expanded platform support.
Main Components of .NET Framework
The .NET Framework is built on two primary components that work together to provide a managed execution environment for .NET applications. Understanding these components is essential for any developer working with the platform.
- Cross-platform support: Build and run applications on Windows, macOS, and Linux from a single codebase.
- High performance: .NET consistently ranks among the fastest web frameworks in independent benchmarks, with optimised memory management and JIT compilation.
- Unified platform: One SDK, one runtime, and one set of base class libraries for all application types — web, desktop, mobile, cloud, and IoT.
- Modern language features: C# and F# continue to evolve with records, pattern matching, nullable reference types, and async/await that improve code quality and developer productivity.
- Dependency injection: Built-in DI container makes it straightforward to write loosely coupled, testable code following SOLID principles.
- Cloud-native ready: First-class support for containerisation with Docker, orchestration with Kubernetes, and seamless integration with Azure and other cloud platforms.
- Security: Built-in authentication, authorisation, data protection, and HTTPS enforcement features help developers build secure applications by default.
- Rich ecosystem: NuGet package manager provides access to hundreds of thousands of open-source libraries covering virtually every development need.
Common Language Runtime (CLR)
The Common Language Runtime (CLR) is the virtual machine component of the .NET framework that manages the execution of .NET programs. It provides a number of important services that make .NET applications more reliable, secure, and performant.
- Memory management: The CLR's garbage collector automatically manages memory allocation and deallocation, eliminating common programming errors such as memory leaks and dangling pointers.
- Just-In-Time (JIT) compilation: The CLR compiles Intermediate Language (IL) code to native machine code at runtime, optimising performance for the specific hardware and operating system.
- Type safety: The CLR enforces type safety, preventing programs from accessing memory in unauthorised ways and reducing the risk of security vulnerabilities.
- Exception handling: A unified exception handling model across all .NET languages makes it easier to write robust error-handling code.
- Thread management: The CLR provides a managed thread pool and synchronisation primitives that simplify concurrent programming.
- Security: Code access security and role-based security features help protect applications and the systems they run on.
Framework Class Library (FCL)
The Framework Class Library (FCL) is a comprehensive collection of reusable classes, interfaces, and value types that provide access to system functionality and serve as the foundation for building .NET applications. The FCL is organised into namespaces that group related types together.
- System namespace: Provides fundamental classes and base types including Object, String, Array, and the basic numeric types.
- System.Collections: Generic and non-generic collection types including List, Dictionary, Queue, Stack, and more.
- System.IO: Classes for reading and writing to files and data streams, and for basic file and directory support.
- System.Net: Provides a simple programming interface for many of the protocols used on networks today, including HTTP, FTP, and WebSockets.
- System.Threading: Classes and interfaces that enable multithreaded programming, including Thread, Task, and the async/await pattern.
- System.Linq: Language Integrated Query (LINQ) provides a consistent model for working with data across various kinds of data sources and formats.
- System.Security: Provides the underlying structure of the .NET security system, including base classes for permissions and policy.
.NET application arrange subordinate or arrange independent
One of the key architectural decisions when deploying .NET applications is whether to use a framework-dependent deployment or a self-contained deployment. Each approach has distinct advantages and trade-offs that affect how applications are packaged, distributed, and maintained.
Framework-Dependent Deployment (Arrange Subordinate)
In a framework-dependent deployment, the application relies on a shared, system-wide installation of the .NET runtime. The application package contains only the application code and its dependencies, not the runtime itself. This results in smaller deployment packages and allows multiple applications on the same machine to share a single runtime installation.
- Smaller deployment size — runtime is not bundled with the application.
- Runtime updates are applied centrally and benefit all framework-dependent applications.
- Requires the target machine to have the correct .NET runtime version installed.
- Suitable for environments where runtime management is centralised, such as corporate servers.
Self-Contained Deployment (Arrange Independent)
In a self-contained deployment, the application includes the .NET runtime and all its dependencies in the deployment package. This means the application can run on any compatible machine without requiring a separate runtime installation.
- No runtime installation required on the target machine.
- Complete control over the runtime version — updates to the system runtime do not affect the application.
- Larger deployment size due to the bundled runtime.
- Ideal for distributing applications to end users or deploying to environments where runtime management is not centralised.
Do follow links for more Contents: https://athenas.co.in/
AthenaS Reader
August 20, 2024Really helpful breakdown of the CLR and FCL components. The section on framework-dependent vs self-contained deployments cleared up a lot of confusion I had. Great article!