SlideShare a Scribd company logo
1 of 37
Priyanka Pinglikar
What is framework
 A structure for supporting or enclosing something
else, especially a skeletal support used as the basis for
something being constructed.
 In computer programming, a software framework is
an abstraction in which software providing generic
functionality can be selectively changed by additional
user-written code, thus providing application-specific
software.
 A software framework is a universal, reusable software
platform to develop applications, products and
solutions
.Net Framework
 .NET Framework is entirely new environment for
building internet aware application with truly
simplified deployment model .
 The .NET Framework is a software framework
developed by Microsoft that runs primarily on
Microsoft Windows. It includes a large library and
provides language interoperability (each language can
use code written in other languages) across several
programming languages
.Net, the Rescuer
.NET
OOP JVM
GUI
Web
component-based
design n-tier design
.Net provides
 Integrated environment
 Internet, Desktop , Mobile devices
 consistent object-oriented
 To provide a portable environment
 A managed environment
What Is .NET
 .NET is a framework
 New programming methodology
 .NET is platform independent / cross platform
 .NET is language-insensitive
Narrow view of .Net applications
Operating System + Hardware
.NET Framework
.NET Application
.Net Architecture
 .NET architecture is:
 multi-language
 cross-platform
 based on the CLR, FCL, and JIT technology
 .NET components are packaged as assemblies
.Net Architecture
.Net Technical Architecture
Base Class Library
Common Language Specification
Common Language Runtime
ADO.NET: Data and XML
VB C++ C#
VisualStudio.NET
ASP.NET: Web Services
and Web Forms
JScript …
Windows
Forms
Windows
Forms
Common Language Runtime
 A common runtime for all .NET languages
 Common type system
 Common metadata
 Intermediate Language (IL) to native code compilers
 Memory allocation and garbage collection
 Code execution and security
 Over 15 languages supported today
 C#, VB, Jscript, Visual C++ from Microsoft
 Perl, Python, Smalltalk, Cobol, Haskell, Mercury, Eiffel, Oberon, Oz
, Pascal, APL, CAML, Scheme, etc.
The CLR Architecture
Class Loader
MSIL to Native
Compilers (JIT)
Code
Manager
Garbage
Collector (GC)
Security Engine Debug Engine
Type Checker Exception Manager
Thread Support COM Marshaler
Base Class Library Support
CLR Execution Model (Narrow)
Code in VB.NET Code in C#
Code in another
.NET Language
VB.NET compiler C# compiler
Appropriate
Compiler
IL(Intermediate
Language) code
CLR just-in-time
execution
CLR Execution Model
VBSource
code
Compiler
C++C#
CompilerCompiler
Assembly
IL Code
Assembly
IL Code
Assembly
IL Code
Operating System Services
Common Language Runtime
JIT Compiler
Native Code
Managed
code
Unmanaged
Component
How CLR works?
Common Language Runtime
 Execution Engine
 Compiles Microsoft Intermediate Language
(MSIL) into native code
 Handles garbage collection
 Handles exceptions
 Enforces code access security
 Handles verification
 Managed v. Unmanaged
Implications of CLR execution model
1. Clients need CLR & FCL to run .NET apps
 available via Redistributable .NET Framework
2. Design trade-off…
+ managed execution (memory protection,
verifiable code, etc.)
+ portability:
– slower execution?
CLR and JIT compiling.
 Indirect execution of .Net applications.
 All .NET languages compile to the same CIL.
 The CLR transforms the CIL to assembly instructions
for a particular hardware architecture.
 This is termed jit’ing or Just-in-time compiling.
 Some initial performance cost, but the jitted code is
cached for further execution.
 The CLR can target the specific architecture in which
the code is executing, so some performance gains are
possible.
Advantages of CLR
 Interoperation between managed code and
unmanaged code (COM, DLLs).
 Managed code environment
 Improved memory handling
 Improved “garbage collection”
Advantages of CLR
 JIT allows code to run in a protected environment as
managed code.
 JIT allows the IL code to be hardware independent.
 CLR also allows for enforcement of code access
security.
 Verification of type safety.
 Access to Metadata (enhanced Type Information)
Common Language
Infrastructure
CLI
Common Language Infrastructure
 CLI allows for cross-language development.
 Four components:
 Common Type System (CTS)
 Meta-data in a language agnostic fashion.
 Common Language Specification – behaviors that all
languages need to follow.
 A Virtual Execution System (VES).
Common Type System (CTS)
 A specification for how types are defined and
how they behave.
 no syntax specified
 A type can contain zero or more members:
 Field
 Method
 Property
 Event
Common Type System (CTS)
String Array ValueType Exception Delegate Class1
Multicast
Delegate
Class2
Class3
Object
Enum1
Structure1Enum
Primitive types
Boolean
Byte
Int16
Int32
Int64
Char
Single
Double
Decimal
DateTime
System-defined types
User-defined types
Delegate1
TimeSpan
Guid
CTS Data Types
Common Data Types
CLR provides a set of primitive types that all languages
must support. The data types include:
 Integer—three types 16/32/64 bits
 Float—two types: 32/64 bits
 Boolean and Character
 Date/time and Time span
 The primitive types can be collected into
 Arrays
 Structures
 Combination of the two
Common Language Specification (CLS)
 Not all languages support all CTS types and
features
 C# is case sensitive, VB.NET is not
 C# supports pointer types (in unsafe mode), VB.NET
does not
 C# supports operator overloading, VB.NET does not
 CLS was drafted to promote language
interoperability
 vast majority of classes within FCL are CLS-compliant
Comparison to Java
Hello.java Hello.class JVM
compile execute
Hello.vb Hello.exe CLR
compile execute
Source code Byte code
CILSource code
Base Class Library @ FCL
Unified Classes
Web Classes (ASP.NET)
XML Classes
System Classes
Drawing Classes
Windows FormsData (ADO.NET)
Controls, Caching, Security, Session, Configuration etc
Collections, Diagnostics, Globalization, IO, Security,
Threading Serialization, Reflection, Messaging etc
ADO, SQL,Types etc
Drawing, Imaging, Text, etc
Design, Cmpnt Model etc
XSLT, Path, Serialization etc
Base Class Library
 Similar to Java’s System namespace.
 Used by all .NET applications
 Has classes for IO, threading, database, text, graphics,
console, sockets/web/mail, security, cryptography,
COM, run-time type discovery/invocation, assembly
generation
Framework Class Library @ BCL
 Single consistent set of object oriented class libraries
to enable building distributed web applications
(Unified Classes)
 Built using classes arranged across logical hierarchical
namespaces
 Work with all CLR languages
 No more “VBRun” or “MFC” divide
Example
Intermediate Language (IL)
 .NET languages are not compiled to machine code.
They are compiled to an Intermediate Language (IL).
 CLR accepts the IL code and recompiles it to machine
code. The recompilation is just-in-time (JIT) meaning
it is done as soon as a function or subroutine is called.
 The JIT code stays in memory for subsequent calls. In
cases where there is not enough memory it is
discarded thus making JIT process interpretive.
Queries?
Thank you !!!
Disclaimer
The names of Technologies, Product(s), Companies,
Application(s), Tool(s), Utilities, etc provided with this
material are intended to reference only. The name(s),
brand name(s), trademark(s), registered trademark(s),
logo(s), slogan(s) belong to their respective owners in
the respective countries.

More Related Content

What's hot

Net Fundamentals
Net FundamentalsNet Fundamentals
Net FundamentalsAli Taki
 
Microsoft dot net framework
Microsoft dot net frameworkMicrosoft dot net framework
Microsoft dot net frameworkAshish Verma
 
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)citizenmatt
 
Life as an asp.net programmer
Life as an asp.net programmerLife as an asp.net programmer
Life as an asp.net programmerArun Prasad
 
.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .netpinky singh
 
Introduction .NET Framework
Introduction .NET FrameworkIntroduction .NET Framework
Introduction .NET Frameworkjavadib
 
.net CLR
.net CLR.net CLR
.net CLRDevTalk
 
Common language runtime clr
Common language runtime clrCommon language runtime clr
Common language runtime clrSanSan149
 
Introduction to ,NET Framework
Introduction to ,NET FrameworkIntroduction to ,NET Framework
Introduction to ,NET FrameworkANURAG SINGH
 
Dotnet framework
Dotnet frameworkDotnet framework
Dotnet frameworkNitu Pandey
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net frameworkArun Prasad
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework OverviewDoncho Minkov
 
dot net technology
dot net technologydot net technology
dot net technologyImran Khan
 
Architecture of net framework
Architecture of net frameworkArchitecture of net framework
Architecture of net frameworkumesh patil
 
Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net FundamentalsLiquidHub
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET FrameworkKamlesh Makvana
 

What's hot (20)

Net Fundamentals
Net FundamentalsNet Fundamentals
Net Fundamentals
 
Microsoft dot net framework
Microsoft dot net frameworkMicrosoft dot net framework
Microsoft dot net framework
 
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
 
Life as an asp.net programmer
Life as an asp.net programmerLife as an asp.net programmer
Life as an asp.net programmer
 
.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .net
 
.Net framework
.Net framework.Net framework
.Net framework
 
Microsoft .NET Framework
Microsoft .NET FrameworkMicrosoft .NET Framework
Microsoft .NET Framework
 
Introduction .NET Framework
Introduction .NET FrameworkIntroduction .NET Framework
Introduction .NET Framework
 
.net CLR
.net CLR.net CLR
.net CLR
 
.Net framework
.Net framework.Net framework
.Net framework
 
Common language runtime clr
Common language runtime clrCommon language runtime clr
Common language runtime clr
 
Introduction to ,NET Framework
Introduction to ,NET FrameworkIntroduction to ,NET Framework
Introduction to ,NET Framework
 
DOT Net overview
DOT Net overviewDOT Net overview
DOT Net overview
 
Dotnet framework
Dotnet frameworkDotnet framework
Dotnet framework
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
 
dot net technology
dot net technologydot net technology
dot net technology
 
Architecture of net framework
Architecture of net frameworkArchitecture of net framework
Architecture of net framework
 
Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net Fundamentals
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 

Similar to Introductionto .netframework by Priyanka Pinglikar

Similar to Introductionto .netframework by Priyanka Pinglikar (20)

.Net Framework
.Net Framework.Net Framework
.Net Framework
 
Microsoft.Net
Microsoft.NetMicrosoft.Net
Microsoft.Net
 
Nakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - EnglishNakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - English
 
Chapter 1 introduction to .net
Chapter 1 introduction to .netChapter 1 introduction to .net
Chapter 1 introduction to .net
 
.Net Session Overview
.Net Session Overview.Net Session Overview
.Net Session Overview
 
.Net overview
.Net overview.Net overview
.Net overview
 
.Net Overview
.Net Overview.Net Overview
.Net Overview
 
.Net slid
.Net slid.Net slid
.Net slid
 
Nakov dot net-framework-overview-english
Nakov dot net-framework-overview-englishNakov dot net-framework-overview-english
Nakov dot net-framework-overview-english
 
Chapter1_Part1.pptx
Chapter1_Part1.pptxChapter1_Part1.pptx
Chapter1_Part1.pptx
 
.Net
.Net.Net
.Net
 
SynapseIndia dotnet web development architecture module
SynapseIndia dotnet web development architecture moduleSynapseIndia dotnet web development architecture module
SynapseIndia dotnet web development architecture module
 
Inside .net framework
Inside .net frameworkInside .net framework
Inside .net framework
 
Synapse india sharing info on dotnet framework part2
Synapse india sharing info on dotnet framework part2Synapse india sharing info on dotnet framework part2
Synapse india sharing info on dotnet framework part2
 
Session2 (3)
Session2 (3)Session2 (3)
Session2 (3)
 
.Net Framwork Architecture And components
.Net Framwork Architecture And components.Net Framwork Architecture And components
.Net Framwork Architecture And components
 
1 what is microsoft .net framework
1 what is microsoft .net framework1 what is microsoft .net framework
1 what is microsoft .net framework
 
.Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1).Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1)
 
.Net overview
.Net overview.Net overview
.Net overview
 
Net framework
Net frameworkNet framework
Net framework
 

Recently uploaded

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Recently uploaded (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

Introductionto .netframework by Priyanka Pinglikar

  • 2. What is framework  A structure for supporting or enclosing something else, especially a skeletal support used as the basis for something being constructed.  In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by additional user-written code, thus providing application-specific software.  A software framework is a universal, reusable software platform to develop applications, products and solutions
  • 3. .Net Framework  .NET Framework is entirely new environment for building internet aware application with truly simplified deployment model .  The .NET Framework is a software framework developed by Microsoft that runs primarily on Microsoft Windows. It includes a large library and provides language interoperability (each language can use code written in other languages) across several programming languages
  • 4. .Net, the Rescuer .NET OOP JVM GUI Web component-based design n-tier design
  • 5. .Net provides  Integrated environment  Internet, Desktop , Mobile devices  consistent object-oriented  To provide a portable environment  A managed environment
  • 6. What Is .NET  .NET is a framework  New programming methodology  .NET is platform independent / cross platform  .NET is language-insensitive
  • 7. Narrow view of .Net applications Operating System + Hardware .NET Framework .NET Application
  • 8. .Net Architecture  .NET architecture is:  multi-language  cross-platform  based on the CLR, FCL, and JIT technology  .NET components are packaged as assemblies
  • 10. .Net Technical Architecture Base Class Library Common Language Specification Common Language Runtime ADO.NET: Data and XML VB C++ C# VisualStudio.NET ASP.NET: Web Services and Web Forms JScript … Windows Forms Windows Forms
  • 11. Common Language Runtime  A common runtime for all .NET languages  Common type system  Common metadata  Intermediate Language (IL) to native code compilers  Memory allocation and garbage collection  Code execution and security  Over 15 languages supported today  C#, VB, Jscript, Visual C++ from Microsoft  Perl, Python, Smalltalk, Cobol, Haskell, Mercury, Eiffel, Oberon, Oz , Pascal, APL, CAML, Scheme, etc.
  • 12. The CLR Architecture Class Loader MSIL to Native Compilers (JIT) Code Manager Garbage Collector (GC) Security Engine Debug Engine Type Checker Exception Manager Thread Support COM Marshaler Base Class Library Support
  • 13. CLR Execution Model (Narrow) Code in VB.NET Code in C# Code in another .NET Language VB.NET compiler C# compiler Appropriate Compiler IL(Intermediate Language) code CLR just-in-time execution
  • 14. CLR Execution Model VBSource code Compiler C++C# CompilerCompiler Assembly IL Code Assembly IL Code Assembly IL Code Operating System Services Common Language Runtime JIT Compiler Native Code Managed code Unmanaged Component
  • 16. Common Language Runtime  Execution Engine  Compiles Microsoft Intermediate Language (MSIL) into native code  Handles garbage collection  Handles exceptions  Enforces code access security  Handles verification  Managed v. Unmanaged
  • 17. Implications of CLR execution model 1. Clients need CLR & FCL to run .NET apps  available via Redistributable .NET Framework 2. Design trade-off… + managed execution (memory protection, verifiable code, etc.) + portability: – slower execution?
  • 18. CLR and JIT compiling.  Indirect execution of .Net applications.  All .NET languages compile to the same CIL.  The CLR transforms the CIL to assembly instructions for a particular hardware architecture.  This is termed jit’ing or Just-in-time compiling.  Some initial performance cost, but the jitted code is cached for further execution.  The CLR can target the specific architecture in which the code is executing, so some performance gains are possible.
  • 19. Advantages of CLR  Interoperation between managed code and unmanaged code (COM, DLLs).  Managed code environment  Improved memory handling  Improved “garbage collection”
  • 20. Advantages of CLR  JIT allows code to run in a protected environment as managed code.  JIT allows the IL code to be hardware independent.  CLR also allows for enforcement of code access security.  Verification of type safety.  Access to Metadata (enhanced Type Information)
  • 22. CLI
  • 23. Common Language Infrastructure  CLI allows for cross-language development.  Four components:  Common Type System (CTS)  Meta-data in a language agnostic fashion.  Common Language Specification – behaviors that all languages need to follow.  A Virtual Execution System (VES).
  • 24. Common Type System (CTS)  A specification for how types are defined and how they behave.  no syntax specified  A type can contain zero or more members:  Field  Method  Property  Event
  • 25. Common Type System (CTS) String Array ValueType Exception Delegate Class1 Multicast Delegate Class2 Class3 Object Enum1 Structure1Enum Primitive types Boolean Byte Int16 Int32 Int64 Char Single Double Decimal DateTime System-defined types User-defined types Delegate1 TimeSpan Guid
  • 27. Common Data Types CLR provides a set of primitive types that all languages must support. The data types include:  Integer—three types 16/32/64 bits  Float—two types: 32/64 bits  Boolean and Character  Date/time and Time span  The primitive types can be collected into  Arrays  Structures  Combination of the two
  • 28. Common Language Specification (CLS)  Not all languages support all CTS types and features  C# is case sensitive, VB.NET is not  C# supports pointer types (in unsafe mode), VB.NET does not  C# supports operator overloading, VB.NET does not  CLS was drafted to promote language interoperability  vast majority of classes within FCL are CLS-compliant
  • 29. Comparison to Java Hello.java Hello.class JVM compile execute Hello.vb Hello.exe CLR compile execute Source code Byte code CILSource code
  • 30. Base Class Library @ FCL Unified Classes Web Classes (ASP.NET) XML Classes System Classes Drawing Classes Windows FormsData (ADO.NET) Controls, Caching, Security, Session, Configuration etc Collections, Diagnostics, Globalization, IO, Security, Threading Serialization, Reflection, Messaging etc ADO, SQL,Types etc Drawing, Imaging, Text, etc Design, Cmpnt Model etc XSLT, Path, Serialization etc
  • 31. Base Class Library  Similar to Java’s System namespace.  Used by all .NET applications  Has classes for IO, threading, database, text, graphics, console, sockets/web/mail, security, cryptography, COM, run-time type discovery/invocation, assembly generation
  • 32. Framework Class Library @ BCL  Single consistent set of object oriented class libraries to enable building distributed web applications (Unified Classes)  Built using classes arranged across logical hierarchical namespaces  Work with all CLR languages  No more “VBRun” or “MFC” divide
  • 34. Intermediate Language (IL)  .NET languages are not compiled to machine code. They are compiled to an Intermediate Language (IL).  CLR accepts the IL code and recompiles it to machine code. The recompilation is just-in-time (JIT) meaning it is done as soon as a function or subroutine is called.  The JIT code stays in memory for subsequent calls. In cases where there is not enough memory it is discarded thus making JIT process interpretive.
  • 37. Disclaimer The names of Technologies, Product(s), Companies, Application(s), Tool(s), Utilities, etc provided with this material are intended to reference only. The name(s), brand name(s), trademark(s), registered trademark(s), logo(s), slogan(s) belong to their respective owners in the respective countries.