SlideShare a Scribd company logo
1 of 20
What is .NET
1
outline
ā€¢ .NET framework
ā€¢ CLR
ā€¢ CLI, CIL, MSIL
ā€¢ ADO.NET, ASP.NET, MVC, webforms, razor
ā€¢ Mono
ā€¢ .NET Core
ā€¢ .NET Standard
2
.NET framework
ā€¢ Software framework
ā€¢ First released early 2000ā€™s
ā€¢ ā€œconsists of the common language runtime (CLR) and the .NET
Framework class library (FCL)ā€ [1]
ā€¢ Provides a ā€œcode execution environmentā€
ā€¢ Various runtime hosts for the CLR [2]
ā€¢ ASP.NET (via ISAPI filter)
ā€¢ Executable
ā€¢ Can write your own
3
CLR
ā€¢ The virtual machine that manages execution of .NET programs [3]
ā€¢ Memory
ā€¢ Threads
ā€¢ Code trust
ā€¢ Type checking
ā€¢ pinvoke
ā€¢ JIT compiling to execute on current hardware
4
5
.NET Framework and CLR
ā€¢ Framework and CLR are different [4]
ā€¢ Can technically run different framework versions
within the same CLR version
ā€¢ E.g. Windows XP only supports framework up to 4.0,
running 4.5 apps is theoretically possible (with some
hex editing of the binary) as long as calls are restricted
to methods that were the same in 4.0 (e.g., no
extensions) [5]
ā€¢ Recent framework updates have been focused on
ā€¢ Optimization (including SIMD)
ā€¢ Accessories (stylus, touch screen, etc)
ā€¢ Security
6
CLR, CLI, CIL
ā€¢ Common Language Infrastructure (CLI)
ā€¢ Open standard that describes executable code [6]
ā€¢ Common Intermediate Language (CIL) [7]
ā€¢ Aka ā€œILā€
ā€¢ Formerly MSIL
ā€¢ Object oriented assembly language
ā€¢ Platform independent
ā€¢ A compiler takes source code and
ā€¢ Converts it to CIL using the CLI specification
ā€¢ Adds any required metadata (type information, etc)
ā€¢ This is an ā€œassemblyā€
7
CLR, CLI, CIL
ā€¢ Visual Studio tooling supports compiling C#, F#, VB.NET to CIL
ā€¢ Semi C++ support [8]
ā€¢ Language support include IronPython, ClojureCLR, IronScheme, others [10]
ā€¢ Can write your own compiler
ā€¢ C to CIL example in F# [9]
ā€¢ Ahead of time (AOT) compilation to avoid JIT
ā€¢ Has some performance benefits
ā€¢ No longer portable across hardware
ā€¢ CIL makes calling a method in another CIL library convenient
ā€¢ Managed by CLR, vs unsafe dll call through pinvoke
8
CLR, CLI, CIL
ā€¢ The CIL is available at runtime
ā€¢ Metadata for the assembly needs to be available to the CLR
ā€¢ This is generally available at runtime as well
ā€¢ Can use this information to modify code at runtime
ā€¢ See [21] which references [22]
ā€¢ Useful for performance profiling, anti-debug avoidance
ā€¢ Other more suitable tools exist for aspect oriented programming (AOP) and
mocking frameworks
9
.NET framework
ā€¢ Includes a set of standard class libraries [11]
ā€¢ Base Class Library (BCL) [12]
ā€¢ Intrinsic types (e.g. string, datetime) and other base classes (e.g. FileStream)
ā€¢ Follows ECMA specification
ā€¢ Framework Class Library (FCL)
ā€¢ Broader library base
ā€¢ Depends on BCL
ā€¢ Provides extensions, like LINQ methods
ā€¢ System.Web, System.Data, System.Collections, System.Xml etc [13]
ā€¢ Source available at [16]
ā€¢ Also includes libraries for winforms, WPF, WCF, ASP.NET, etc
ā€¢ These other libraries are mostly still proprietary (and will probably remain so)
10
ADO.NET, ASP.NET, MVC, webforms, razor
ā€¢ ADO.NET is a .NET Framework library to interact with (MSSQL)
database
ā€¢ Entity Framework is ORM for ADO.NET
ā€¢ ASP.NET is a .NET framework library to serve dynamic web pages [14]
ā€¢ Typically hosted in IIS
ā€¢ Pages are ā€œWeb Formsā€
ā€¢ Has ā€œcode behindā€ file and view file
ā€¢ Pages need to be compiled like source code
11
ADO.NET, ASP.NET, MVC, webforms, razor
ā€¢ ASP.NET cont
ā€¢ MVC is an extension to ASP.NET that comes with Visual Studio
ā€¢ Implements Model-View-Controller design pattern
ā€¢ Methods for a page are handled in the controller, or somewhere else as defined in route
setup
ā€¢ Can still include code in the view itself, same as before
ā€¢ Razor is typically used with MVC
ā€¢ Entire state of the webpage (ā€œViewStateā€) no longer needs to be passed around with every
server call
ā€¢ Page is no longer re-rendered with every server call
ā€¢ Views are compiled on demand and can be changed at runtime
ā€¢ No more if (!IsPostback)
// generate form
else
// process submitted data;
12
ASP.NET visualized
.NET Framework
CLR BCL
FCL
ASP.NET
(WebForms)
ASP.NET extensions
MVC
Razor
ā€¢ Extensions available through Visual Studio, elsewhere
13
Mono
ā€¢ Started as open source C# compiler and CLR [15]
ā€¢ ā€œMonoā€ includes the mono libraries (e.g. POSIX and OS libraries),
Code Execution Engine, etc
ā€¢ Alternative to .NET Framework
ā€¢ MonoDevelop is the IDE
14
.NET core
ā€¢ Cross platform, open source [17]
ā€¢ Alternative to .NET framework
ā€¢ CoreCLR
ā€¢ Fork of FCL
ā€¢ ASP.NET core
ā€¢ Universal Windows Platform (UWP) libraries
ā€¢ Adds additional libraries
ā€¢ Missing some .NET Framework libraries
ā€¢ Windows forms, WPF
ā€¢ Adds deployment to have self contained applications (via AOT compilation)
[20]
15
ā€¢ Compare to .NET Framework, or C++
16
.NET Standard
ā€¢ Set of API specifications (guidelines, not code)
ā€¢ Supposed to be supported by multiple frameworks [18]
ā€¢ Version commentary about 1.6 -> 2.0 at [19]
17
.NET Standard
ā€¢ Unifying library across platforms
ā€¢ Mostly based on .NET Framework mscorlib (BCL, FCL, ā€œand friendsā€
[19])
ā€¢ Binary compatible, not necessarily behavioral compatible
18
.NET FRAMEWORK .NET CORE XAMARIN
MONO
WPF
Windows
Forms
ASP.NET
UWP
ASP.NET
Core
iOS
OS X
Android
GTK#
.NET Standard
BCL FCL (partial?)
CLR CoreCLR Mono CLR
System.Runtime
*
Classes
Runtime
ā€¢ Each framework has more libraries not shown (OS specific, compatibility, etc)
ā€¢ Sticking to BCL and FCL is mostly cross platform, works well for simple console apps
POSIX
19
References
[1] https://docs.microsoft.com/en-us/dotnet/framework/get-started/overview
[2] https://msdn.microsoft.com/en-us/library/a51xd4ze(v=vs.71).aspx
[3] https://en.wikipedia.org/wiki/Common_Language_Runtime
[4] https://en.wikipedia.org/wiki/.NET_Framework
[5] https://stackoverflow.com/questions/17499351/is-it-possible-to-run-a-net-4-5-app-on-xp
[6] https://en.wikipedia.org/wiki/Common_Language_Infrastructure
[7] https://en.wikipedia.org/wiki/Common_Intermediate_Language
[8] https://stackoverflow.com/questions/688386/is-c-converted-into-msil
[9] http://timjones.io/blog/archive/2014/04/13/writing-a-minic-to-msil-compiler-in-fsharp-part-0-introduction
[10] https://en.wikipedia.org/wiki/List_of_CLI_languages
[11] https://stackoverflow.com/questions/807880/bcl-base-class-library-vs-fcl-framework-class-library
[12] https://en.wikipedia.org/wiki/List_of_data_types_of_the_Standard_Libraries#Base_Class_Library
[13] https://msdn.microsoft.com/en-us/library/gg145045(v=vs.110).aspx
[14] https://en.wikipedia.org/wiki/ASP.NET
[15] https://en.wikipedia.org/wiki/Mono_(software)
[16] http://referencesource.microsoft.com/
[17] https://docs.microsoft.com/en-us/dotnet/core/
[18] https://docs.microsoft.com/en-us/dotnet/standard/library
[19] https://github.com/dotnet/standard/tree/master/docs/netstandard-20
[20] https://github.com/dotnet/coreclr/blob/master/Documentation/building/crossgen.md
[21] https://stackoverflow.com/a/19403979/1462295
[22] https://www.codeproject.com/Articles/463508/NET-CLR-Injection-Modify-IL-Code-during-Run-time
20

More Related Content

Similar to Dotnet.ppt

.Net Core Blimey! (16/07/2015)
.Net Core Blimey! (16/07/2015).Net Core Blimey! (16/07/2015)
.Net Core Blimey! (16/07/2015)citizenmatt
Ā 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele RialdiCodeFest
Ā 
Intro to Microsoft.NET
Intro to Microsoft.NET Intro to Microsoft.NET
Intro to Microsoft.NET rchakra
Ā 
.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UG.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UGcitizenmatt
Ā 
.NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016).NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016)citizenmatt
Ā 
Net Framework overview
Net Framework overviewNet Framework overview
Net Framework overviewMohitKumar1985
Ā 
CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)Dilawar Khan
Ā 
C# code sharing across the platforms
C# code sharing across the platformsC# code sharing across the platforms
C# code sharing across the platformsAndrei Marukovich
Ā 
.Net overview by cetpa
.Net overview by cetpa.Net overview by cetpa
.Net overview by cetpasharmamohan13989
Ā 
.Net overview
.Net overview.Net overview
.Net overviewmadydud
Ā 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET FrameworkRaghuveer Guthikonda
Ā 
ASP.NET vNext
ASP.NET vNextASP.NET vNext
ASP.NET vNextAlex Thissen
Ā 
NETOverview1ppt.pptx
NETOverview1ppt.pptxNETOverview1ppt.pptx
NETOverview1ppt.pptxcharusharma165
Ā 
NETOverview1.ppt
NETOverview1.pptNETOverview1.ppt
NETOverview1.pptVivekRaj101435
Ā 
.Net framework
.Net framework.Net framework
.Net frameworksanya6900
Ā 
Introduction to ASP.NET 5
Introduction to ASP.NET 5Introduction to ASP.NET 5
Introduction to ASP.NET 5mbaric
Ā 
.NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016).NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016)citizenmatt
Ā 

Similar to Dotnet.ppt (20)

.Net Core Blimey! (16/07/2015)
.Net Core Blimey! (16/07/2015).Net Core Blimey! (16/07/2015)
.Net Core Blimey! (16/07/2015)
Ā 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele Rialdi
Ā 
Intro to Microsoft.NET
Intro to Microsoft.NET Intro to Microsoft.NET
Intro to Microsoft.NET
Ā 
.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UG.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UG
Ā 
.NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016).NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016)
Ā 
DOT Net overview
DOT Net overviewDOT Net overview
DOT Net overview
Ā 
Net Framework overview
Net Framework overviewNet Framework overview
Net Framework overview
Ā 
CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)
Ā 
C# code sharing across the platforms
C# code sharing across the platformsC# code sharing across the platforms
C# code sharing across the platforms
Ā 
Net overview
Net overviewNet overview
Net overview
Ā 
.Net overview by cetpa
.Net overview by cetpa.Net overview by cetpa
.Net overview by cetpa
Ā 
.Net overview
.Net overview.Net overview
.Net overview
Ā 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
Ā 
ASP.NET vNext
ASP.NET vNextASP.NET vNext
ASP.NET vNext
Ā 
NETOverview1ppt.pptx
NETOverview1ppt.pptxNETOverview1ppt.pptx
NETOverview1ppt.pptx
Ā 
NETOverview1.ppt
NETOverview1.pptNETOverview1.ppt
NETOverview1.ppt
Ā 
Net overview
Net overviewNet overview
Net overview
Ā 
.Net framework
.Net framework.Net framework
.Net framework
Ā 
Introduction to ASP.NET 5
Introduction to ASP.NET 5Introduction to ASP.NET 5
Introduction to ASP.NET 5
Ā 
.NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016).NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016)
Ā 

Recently uploaded

GOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdfGOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdfAlina Yurenko
Ā 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
Ā 
Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)
Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)
Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)jennyeacort
Ā 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
Ā 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
Ā 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
Ā 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
Ā 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
Ā 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
Ā 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
Ā 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
Ā 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
Ā 
č‹±å›½UN学位čƁ,åŒ—å®‰ę™®é”æ大学ęƕäøščƁ书1:1制作
č‹±å›½UN学位čƁ,åŒ—å®‰ę™®é”æ大学ęƕäøščƁ书1:1åˆ¶ä½œč‹±å›½UN学位čƁ,åŒ—å®‰ę™®é”æ大学ęƕäøščƁ书1:1制作
č‹±å›½UN学位čƁ,åŒ—å®‰ę™®é”æ大学ęƕäøščƁ书1:1制作qr0udbr0
Ā 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
Ā 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
Ā 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
Ā 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
Ā 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
Ā 

Recently uploaded (20)

GOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdfGOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdf
Ā 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
Ā 
Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)
Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)
Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)
Ā 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
Ā 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
Ā 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Ā 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
Ā 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
Ā 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
Ā 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
Ā 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
Ā 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
Ā 
Hot Sexy call girls in Patel NagaršŸ” 9953056974 šŸ” escort Service
Hot Sexy call girls in Patel NagaršŸ” 9953056974 šŸ” escort ServiceHot Sexy call girls in Patel NagaršŸ” 9953056974 šŸ” escort Service
Hot Sexy call girls in Patel NagaršŸ” 9953056974 šŸ” escort Service
Ā 
č‹±å›½UN学位čƁ,åŒ—å®‰ę™®é”æ大学ęƕäøščƁ书1:1制作
č‹±å›½UN学位čƁ,åŒ—å®‰ę™®é”æ大学ęƕäøščƁ书1:1åˆ¶ä½œč‹±å›½UN学位čƁ,åŒ—å®‰ę™®é”æ大学ęƕäøščƁ书1:1制作
č‹±å›½UN学位čƁ,åŒ—å®‰ę™®é”æ大学ęƕäøščƁ书1:1制作
Ā 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Ā 
2.pdf Ejercicios de programaciĆ³n competitiva
2.pdf Ejercicios de programaciĆ³n competitiva2.pdf Ejercicios de programaciĆ³n competitiva
2.pdf Ejercicios de programaciĆ³n competitiva
Ā 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
Ā 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
Ā 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
Ā 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
Ā 

Dotnet.ppt

  • 2. outline ā€¢ .NET framework ā€¢ CLR ā€¢ CLI, CIL, MSIL ā€¢ ADO.NET, ASP.NET, MVC, webforms, razor ā€¢ Mono ā€¢ .NET Core ā€¢ .NET Standard 2
  • 3. .NET framework ā€¢ Software framework ā€¢ First released early 2000ā€™s ā€¢ ā€œconsists of the common language runtime (CLR) and the .NET Framework class library (FCL)ā€ [1] ā€¢ Provides a ā€œcode execution environmentā€ ā€¢ Various runtime hosts for the CLR [2] ā€¢ ASP.NET (via ISAPI filter) ā€¢ Executable ā€¢ Can write your own 3
  • 4. CLR ā€¢ The virtual machine that manages execution of .NET programs [3] ā€¢ Memory ā€¢ Threads ā€¢ Code trust ā€¢ Type checking ā€¢ pinvoke ā€¢ JIT compiling to execute on current hardware 4
  • 5. 5
  • 6. .NET Framework and CLR ā€¢ Framework and CLR are different [4] ā€¢ Can technically run different framework versions within the same CLR version ā€¢ E.g. Windows XP only supports framework up to 4.0, running 4.5 apps is theoretically possible (with some hex editing of the binary) as long as calls are restricted to methods that were the same in 4.0 (e.g., no extensions) [5] ā€¢ Recent framework updates have been focused on ā€¢ Optimization (including SIMD) ā€¢ Accessories (stylus, touch screen, etc) ā€¢ Security 6
  • 7. CLR, CLI, CIL ā€¢ Common Language Infrastructure (CLI) ā€¢ Open standard that describes executable code [6] ā€¢ Common Intermediate Language (CIL) [7] ā€¢ Aka ā€œILā€ ā€¢ Formerly MSIL ā€¢ Object oriented assembly language ā€¢ Platform independent ā€¢ A compiler takes source code and ā€¢ Converts it to CIL using the CLI specification ā€¢ Adds any required metadata (type information, etc) ā€¢ This is an ā€œassemblyā€ 7
  • 8. CLR, CLI, CIL ā€¢ Visual Studio tooling supports compiling C#, F#, VB.NET to CIL ā€¢ Semi C++ support [8] ā€¢ Language support include IronPython, ClojureCLR, IronScheme, others [10] ā€¢ Can write your own compiler ā€¢ C to CIL example in F# [9] ā€¢ Ahead of time (AOT) compilation to avoid JIT ā€¢ Has some performance benefits ā€¢ No longer portable across hardware ā€¢ CIL makes calling a method in another CIL library convenient ā€¢ Managed by CLR, vs unsafe dll call through pinvoke 8
  • 9. CLR, CLI, CIL ā€¢ The CIL is available at runtime ā€¢ Metadata for the assembly needs to be available to the CLR ā€¢ This is generally available at runtime as well ā€¢ Can use this information to modify code at runtime ā€¢ See [21] which references [22] ā€¢ Useful for performance profiling, anti-debug avoidance ā€¢ Other more suitable tools exist for aspect oriented programming (AOP) and mocking frameworks 9
  • 10. .NET framework ā€¢ Includes a set of standard class libraries [11] ā€¢ Base Class Library (BCL) [12] ā€¢ Intrinsic types (e.g. string, datetime) and other base classes (e.g. FileStream) ā€¢ Follows ECMA specification ā€¢ Framework Class Library (FCL) ā€¢ Broader library base ā€¢ Depends on BCL ā€¢ Provides extensions, like LINQ methods ā€¢ System.Web, System.Data, System.Collections, System.Xml etc [13] ā€¢ Source available at [16] ā€¢ Also includes libraries for winforms, WPF, WCF, ASP.NET, etc ā€¢ These other libraries are mostly still proprietary (and will probably remain so) 10
  • 11. ADO.NET, ASP.NET, MVC, webforms, razor ā€¢ ADO.NET is a .NET Framework library to interact with (MSSQL) database ā€¢ Entity Framework is ORM for ADO.NET ā€¢ ASP.NET is a .NET framework library to serve dynamic web pages [14] ā€¢ Typically hosted in IIS ā€¢ Pages are ā€œWeb Formsā€ ā€¢ Has ā€œcode behindā€ file and view file ā€¢ Pages need to be compiled like source code 11
  • 12. ADO.NET, ASP.NET, MVC, webforms, razor ā€¢ ASP.NET cont ā€¢ MVC is an extension to ASP.NET that comes with Visual Studio ā€¢ Implements Model-View-Controller design pattern ā€¢ Methods for a page are handled in the controller, or somewhere else as defined in route setup ā€¢ Can still include code in the view itself, same as before ā€¢ Razor is typically used with MVC ā€¢ Entire state of the webpage (ā€œViewStateā€) no longer needs to be passed around with every server call ā€¢ Page is no longer re-rendered with every server call ā€¢ Views are compiled on demand and can be changed at runtime ā€¢ No more if (!IsPostback) // generate form else // process submitted data; 12
  • 13. ASP.NET visualized .NET Framework CLR BCL FCL ASP.NET (WebForms) ASP.NET extensions MVC Razor ā€¢ Extensions available through Visual Studio, elsewhere 13
  • 14. Mono ā€¢ Started as open source C# compiler and CLR [15] ā€¢ ā€œMonoā€ includes the mono libraries (e.g. POSIX and OS libraries), Code Execution Engine, etc ā€¢ Alternative to .NET Framework ā€¢ MonoDevelop is the IDE 14
  • 15. .NET core ā€¢ Cross platform, open source [17] ā€¢ Alternative to .NET framework ā€¢ CoreCLR ā€¢ Fork of FCL ā€¢ ASP.NET core ā€¢ Universal Windows Platform (UWP) libraries ā€¢ Adds additional libraries ā€¢ Missing some .NET Framework libraries ā€¢ Windows forms, WPF ā€¢ Adds deployment to have self contained applications (via AOT compilation) [20] 15
  • 16. ā€¢ Compare to .NET Framework, or C++ 16
  • 17. .NET Standard ā€¢ Set of API specifications (guidelines, not code) ā€¢ Supposed to be supported by multiple frameworks [18] ā€¢ Version commentary about 1.6 -> 2.0 at [19] 17
  • 18. .NET Standard ā€¢ Unifying library across platforms ā€¢ Mostly based on .NET Framework mscorlib (BCL, FCL, ā€œand friendsā€ [19]) ā€¢ Binary compatible, not necessarily behavioral compatible 18
  • 19. .NET FRAMEWORK .NET CORE XAMARIN MONO WPF Windows Forms ASP.NET UWP ASP.NET Core iOS OS X Android GTK# .NET Standard BCL FCL (partial?) CLR CoreCLR Mono CLR System.Runtime * Classes Runtime ā€¢ Each framework has more libraries not shown (OS specific, compatibility, etc) ā€¢ Sticking to BCL and FCL is mostly cross platform, works well for simple console apps POSIX 19
  • 20. References [1] https://docs.microsoft.com/en-us/dotnet/framework/get-started/overview [2] https://msdn.microsoft.com/en-us/library/a51xd4ze(v=vs.71).aspx [3] https://en.wikipedia.org/wiki/Common_Language_Runtime [4] https://en.wikipedia.org/wiki/.NET_Framework [5] https://stackoverflow.com/questions/17499351/is-it-possible-to-run-a-net-4-5-app-on-xp [6] https://en.wikipedia.org/wiki/Common_Language_Infrastructure [7] https://en.wikipedia.org/wiki/Common_Intermediate_Language [8] https://stackoverflow.com/questions/688386/is-c-converted-into-msil [9] http://timjones.io/blog/archive/2014/04/13/writing-a-minic-to-msil-compiler-in-fsharp-part-0-introduction [10] https://en.wikipedia.org/wiki/List_of_CLI_languages [11] https://stackoverflow.com/questions/807880/bcl-base-class-library-vs-fcl-framework-class-library [12] https://en.wikipedia.org/wiki/List_of_data_types_of_the_Standard_Libraries#Base_Class_Library [13] https://msdn.microsoft.com/en-us/library/gg145045(v=vs.110).aspx [14] https://en.wikipedia.org/wiki/ASP.NET [15] https://en.wikipedia.org/wiki/Mono_(software) [16] http://referencesource.microsoft.com/ [17] https://docs.microsoft.com/en-us/dotnet/core/ [18] https://docs.microsoft.com/en-us/dotnet/standard/library [19] https://github.com/dotnet/standard/tree/master/docs/netstandard-20 [20] https://github.com/dotnet/coreclr/blob/master/Documentation/building/crossgen.md [21] https://stackoverflow.com/a/19403979/1462295 [22] https://www.codeproject.com/Articles/463508/NET-CLR-Injection-Modify-IL-Code-during-Run-time 20

Editor's Notes

  1. [1] https://docs.microsoft.com/en-us/dotnet/framework/get-started/overview [2] https://msdn.microsoft.com/en-us/library/a51xd4ze(v=vs.71).aspx
  2. [3] https://en.wikipedia.org/wiki/Common_Language_Runtime
  3. [4] https://en.wikipedia.org/wiki/.NET_Framework [5] https://stackoverflow.com/questions/17499351/is-it-possible-to-run-a-net-4-5-app-on-xp
  4. [6] https://en.wikipedia.org/wiki/Common_Language_Infrastructure [7] https://en.wikipedia.org/wiki/Common_Intermediate_Language
  5. [8] https://stackoverflow.com/questions/688386/is-c-converted-into-msil [9] http://timjones.io/blog/archive/2014/04/13/writing-a-minic-to-msil-compiler-in-fsharp-part-0-introduction [10] https://en.wikipedia.org/wiki/List_of_CLI_languages
  6. [21] https://stackoverflow.com/a/19403979/1462295 [22] https://www.codeproject.com/Articles/463508/NET-CLR-Injection-Modify-IL-Code-during-Run-time Also, CIL assembly is rather straightforward to decompile back into code (at least for C#) so legacy binary fix doesnā€™t seem like the ideal use case
  7. [11] https://stackoverflow.com/questions/807880/bcl-base-class-library-vs-fcl-framework-class-library [12] https://en.wikipedia.org/wiki/List_of_data_types_of_the_Standard_Libraries#Base_Class_Library [13] https://msdn.microsoft.com/en-us/library/gg145045(v=vs.110).aspx [16] http://referencesource.microsoft.com/
  8. [14] https://en.wikipedia.org/wiki/ASP.NET
  9. [15] https://en.wikipedia.org/wiki/Mono_(software)
  10. [17] https://docs.microsoft.com/en-us/dotnet/core/ [20] https://github.com/dotnet/coreclr/blob/master/Documentation/building/crossgen.md
  11. [18] https://docs.microsoft.com/en-us/dotnet/standard/library [19] https://github.com/dotnet/standard/tree/master/docs/netstandard-20
  12. iOS doesnā€™t allow virtual code to be run like other platforms, so thereā€™s no JIT and everything is AOT compiled. Not sure about android or OS X.