.NET Flashcards
4 majros component of .Net architecture
Common language specification (CLS) defines how objects are implemented so they work everywhere .NET works.
CLS is a subset of Common Type System (CTS) – which sets a common way to describe all types
Framework class library (FCL) is a standard library that collects reusable classes, interfaces and value types
Common language runtime (CLR) is the virtual machine that runs the framework and manages the execution of .NET programs
Visual Studio is used to create standalone applications, interactive websites, web applications and web services
.NET Framework
to create Windows desktop and server-based applications
Memory management
Type and memory safety
Security
Networking
Application deployment
Data structures
APIs
.NET Core
There are cross-platform needs
Using Microservices
Working with Docker containers
You have high-performance and scalable system needs
You are running multiple .NET versions side-by-side.
You want command line interface (CLI) control
.NET hierarchy
.NET framework 2002
.Net Core 2016
.NET 2020
What is .NET?
Understanding .NET Framework
What is .NET?
Application Development Platform, to build Desktop, Web and Mobile Apps.
Developed by Microsoft, in 2002.
Provides fully managed, secured application execution environment.
Supports multiple languages such as C#, VB, VC++ etc.
Modules & Apps
ASP.Net
WebSites
Web Applications
WebServices
Common Language Infrastructure (CLI)
Application Source Code ->
Microsoft Intermediate Language ->
Common Language Runtime CLR ->
Native Machine Code
Common Language Runtime (CLR) and its component
“Execution Engine” for all .net languages.
Code-Execution Environment that executes all types of .net applications.
Applications developed in any .net language runs based on “CLR” only.
CLR is a part of .NET Framework; pre-installed in Windows.
CLR Components:
Class Loader
Memory Manager
Garbage Collector
JIT Compiler
Exception Manager
Thread Manager
Security Manager
Components of CLR
Class Loader:
Loading classes from compiled source code to memory.
Loads a class, when it is needed (before creating object).
Memory Manager:
Allocating necessary memory for objects.
When an object is created in the code, certain amount of memory will be allocated for the object in application’s “heap”.
Garbage Collector:
Freeing (deleting) memory of objects.
Identifies all unreferenced objects and delete them in memory (RAM).
JIT (Just-In-Time) Compiler:
Convert the MSIL Code into Native Machine Language.
Compiles the code of a class, when it is needed (before executing that particular class).
Exception Manager:
Raise notifications while run-time errors.
Creates exception logs.
Thread Manager:
Create threads (background process) to execute the code.
The entire program is treated as “Main thread”.
Developer can create sub threads (child threads) to do background processes.
Security Manager:
Verifies whether the application has permission to access system resources or not.
Before executing the application, it verifies whether the application has not attacked by malicious programs & has necessary permissions to access files / folders and hardware resources.
.NET Framework main 2 things
CLR Run Time Engine That executes app
+
Framework Class Library- collection of classes
Base Class Library (BCL)
Contains a set of pre-defined classes that can be used in all types of .net applications & languages for general I/O operations, type conversion, creation of threads etc.
Eg:
Console
String
StringBuilder
Convert
Thread
Task
etc.
ADO.NET
Contains a set of pre-defined classes that can be used in all types of .net applications & languages for connecting to databases, retrieving data from databases, inserting, updating, deleting rows etc.
Eg:
SqlConnection
SqlCommand
SqlDataAdapter
SqlDataReader
etc.
WinForms
Contains a set of pre-defined classes that can be used in Windows GUI applications for development of GUI elements such as form, textbox, button, checkbox, radio button, dropdownlist etc.
Eg:
Form
Label
Button
Text Box
etc.
Windows Presentation Foundation (WPF)
Contains a set of pre-defined classes that can be used in Rich Windows GUI applications for development of GUI elements such as window, textbox, button, checkbox, radio button, dropdownlist etc.
Eg:
Window
Label
Button
Text Box
etc.
Active Server Pages (ASP.NET)
Contains a set of pre-defined classes that can be used in Web Applications for development of GUI elements such as page, textbox, button, checkbox, radio button, dropdownlist etc.
Eg:
Page
Label
Button
Text Box
etc.