Framework
=============
A framework, or software framework, is a platform for developing software
applications. It provides a foundation on which software developers can build
programs for a specific platform. For example, a framework may include predefined
classes and functions that can be used to process input, manage hardware devices,
and interact with system software. This simplifies the development process because
programmers don't need to reinvent the wheel each time they develop a new
application.
A framework is similar to an application programming interface (API), though
technically a framework includes an API. A framework serves as a foundation for
programming, while an API provides access to the elements supported by the
framework. A framework may also include code libraries, a compiler, and other
programs used in the software development process.
.Net Framework
===============
.NET is a software framework which is designed and developed by Microsoft. The
first version of the .Net framework was 1.0 which came in the year 2002. In easy
words, it is a virtual machine for compiling and executing programs written in
different languages like C#, VB.Net etc.
It is used to build applications for Windows, phone, web, etc.
.NET Framework supports more than 60 programming languages in which 11 programming
languages are designed and developed by Microsoft. The remaining Non-Microsoft
Languages which are supported by .NET Framework but not designed and developed by
Microsoft.
11 Programming Languages which are designed and developed by Microsoft are:
C#.NET
VB.NET
C++.NET
J#.NET
F#.NET
JSCRIPT.NET
WINDOWS POWERSHELL
IRON RUBY
IRON PYTHON
C OMEGA
ASML(Abstract State Machine Language)
.NET Framework
+++++++++++++
is the original implementation of .NET. It supports running websites, services,
desktop apps, and more on Windows.
.NET Core
+++++++++++++
is a cross-platform implementation for running websites, services, and console apps
on Windows, Linux, and macOS. .NET Core is open source on GitHub.
Xamarin/Mono
++++++++++++++
is a .NET implementation for running apps on all the major mobile operating
systems, including iOS and Android.
Main Components of .NET Framework
====================================
The two major components of .NET Framework are the Common Language Runtime and
the .NET Framework Class Library.
The Common Language Runtime (CLR)
++++++++++++++++++++++++++++++++++
is the execution engine that handles running applications. It provides services
like thread management, garbage collection, type-safety, exception handling, and
more.
The Class Library (.Net Frmaework Class Library or FCL)
++++++++++++++++++
provides a set of APIs and types for common functionality. It provides types for
strings, dates, numbers, etc. The Class Library includes APIs for reading and
writing files, connecting to databases, drawing, and more.
NET applications are written in the C#, F#, or Visual Basic programming language.
Code is compiled into a language-agnostic Common Intermediate Language (CIL).
Compiled code is stored in assemblies—files with a .dll or .exe file extension.
When an app runs, the CLR takes the assembly and uses a just-in-time compiler (JIT)
to turn it into machine code that can execute on the specific architecture of the
computer it is running on.
.Net Framework vs .Net Core
==============================
.NET Core and .NET Framework share many of the same components and you can share
code across the two. Some key differences include:
.NET Core is cross-platform and runs on Linux, macOS, and Windows. .NET Framework
only runs on Windows.
.NET Core is open-source and accepts contributions from the community. The .NET
Framework source code is available, but does not take direct contributions.
The majority of .NET innovation happens in .NET Core.
.NET Framework is included in Windows and automatically updated machine-wide by
Windows Update. .NET Core is shipped independently.
Common Type System (CTS):
=============================
It describes set of data types that can be used in different .Net languages in
common. (i.e), CTS ensures that objects written in different .Net languages can
interact with each other.
For Communicating between programs written in any .NET language, the types have to
be compatible on the basic level.
The common type system supports two general categories of types:
Value types:
Value types directly contain their data, and instances of value types are either
allocated on the stack or allocated inline in a structure. Value types can be
built-in (implemented by the runtime), user-defined, or enumerations.
Reference types:
Reference types store a reference to the value's memory address, and are allocated
on the heap. Reference types can be self-describing types, pointer types, or
interface types. The type of a reference type can be determined from values of
self-describing types. Self-describing types are further split into arrays and
class types. The class types are user-defined classes, boxed value types, and
delegates.