SlideShare a Scribd company logo
1 of 34
.Net Framework
Introduction to
.NET Framework
Outline
Introduction to .NET Framework
Architecture of .NET Framework
CLS, CLR, CTS, IL, CIL, MSIL
Before .NET
 Windows GUI development: Win32 API, MFC,
Visual Basic, COM
 Web development: ASP
 Java – “Write once, run anywhere. (WORA)”
What Is .NET
 .NET is a framework
 New Programming Paradigm
 .NET is platform independent / cross platform
 .NET is language-insensitive
.NET provides
 Integrated environment
 Internet, Desktop , Mobile devices
 consistent object-oriented
 To provide a portable environment
 Amanaged environment
.NET
Architecture
.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
Windows
Forms
Languages Supported by .NET
Over 35 languages are supported now
 C#, VB, Jscript, Visual C++
 Perl, Python, Smalltalk,
 Cobol, Haskell, Mercury, Eiffel,
 Oberon, Oz, Pascal,
 APL, CAML, Scheme, etc.
Common Type System (CTS)
• A specification for how types are
defined and how they behave.
• no syntaxspecified
• A type can contain zero or more
members:
• Field
• Method
• Property
• Event
Common Type System (CTS)
CTS is a formal specification that describes
how a given type must be defined for CLR
• CTS Class Type
• CTS Structure Type
• CTS Interface Type
• CTS Enumeration type
• CTS Delegate type
CTS Class Type
• Same as C++ class
• Can contain members: methods,
properties, events, etc.
• Support for abstract members that
define a polymorphic interface for
derived classes
• Multiple inheritance is not allowed
CTS Class Characteristics
• "sealed"? – sealed classes can't function as
base classes
• Implement any interfaces? – An
interface is a collection of abstract
members
• Abstract or Concrete? – Abstract classes (to
define common behaviors for derived) can't be
created directly but concrete classes can.
• Visibility? – visibility attribute to know
whether external assemblies can use it.
CTS Structure types
 Same as C/C++
 Derived from a common base class
System.ValueType
CTS Enumeration type
To group name/value pairs under a
specific name Default Storage:
System.Int32 (could be Changed)
CTS Interface types
CTS Delegate type
• Same as pure abstract class of C++
• A description of work that a derived
class can perform
• Similar to a class, but can never be
instantiated
• Same as C's function pointer
(System.MulticastDelegate)
• Useful for event handling (ASP .NET)
CTS Data Types
.NET Base Type C# Type
System.Byte Byte
System.SByte sbyte
System.Int16 short
System.Int32 int
System.Int64 long
System.UInt64 ulong
System.Single float
System.Double double
System.Object object
System.String string
System.Boolean bool
CLS Compliance
C# Type CLS Compliance
byte Yes
sbyte No
short Yes
int Yes
long Yes
ulong No
float Yes
double Yes
object Yes
string Yes
char Yes
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
Common Language Runtime
 Execution Engine
 Compiles Microsoft Intermediate
Language (MSIL) into nativecode
 Handles garbagecollection
 Handles exceptions
 Enforces code accesssecurity
 Handles verification
 Managed v.Unmanaged Code
CLR Execution Model
Source
code
VB C# C++
Compiler Compiler Compiler
Assembly
IL Code
Assembly
IL Code
Assembly
IL Code
Common Language Runtime
JIT Compiler
Native Code
Operating System Services
Managed
code
Unmanaged
Component
Advantages of CLR
• Support for developer services (debugging)
• Interoperation between managed code and
unmanaged code (COM,DLLs).
• Managed code environment
• Improved memory handling
• Improved “garbagecollection”
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.
CLR .NET
Source
Code
Base Class
Libraries
(mscorlib.dll)
.NET Execution Engine
Class Loader
Jitter
Platform
Specific code
Execute
.NET Compiler
DLL or EXE
(CIL)
mscoree.dll
mscoree.dll
MicroSoft Common
Object Runtime Execution Engine
Dot Net Namespaces
• MFC, Java, VB 6.0 have predefined set of
classes; C# doesn't
• C# uses namespace concept
• Any language targeting the .NET runtime
makes use of the same namespaces and
same types as C#
• System is the root namespace
Sample .NET namespaces
System
primitive types, garbage
collection, etc
System.Collections Container objects: ArrayList, Queue,
etc.
System.Data
System.Data.Common
System.Data.OleDb
System.Data.SqlClient
For Database manipulations ADO .NET
System.IO file IO, buffering, etc.
System.Drawing
System.Drawing.2D
GDI+ primitives, bitmaps, fonts, icons, etc.
System.Threading Threads
Common Data Types
CLR provides a set of primitive types that all
languages must support.The datatypes
include:
 Integer—three types 16/32/64bits
 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 introduced 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 Bytecode
CILSource code
Base Class Library @ FCL
Unified Classes
Web Classes (ASP.NET)
Controls, Caching, Security, Session, Configuration etc
System Classes
Collections, Diagnostics, Globalization, IO, Security,
Threading Serialization, Reflection, Messaging etc
Data (ADO.NET)
ADO, SQL,Types etc
Drawing Classes
Drawing, Imaging, Text, etc
Windows Forms
Design, Cmpnt Model etc
XML Classes
XSLT, Path, Serialization etc
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 allCLR languages
Summary
Introduction to .NET Framework
Architecture of .NET Framework
CTS, CLR, IL, MSIL, CIL
Introduction to dot net framework
Introduction to dot net framework

More Related Content

What's hot

Difference between java and c#
Difference between java and c#Difference between java and c#
Difference between java and c#TECOS
 
Standard libraries on iOS
Standard libraries on iOSStandard libraries on iOS
Standard libraries on iOSMake School
 
Xtext: code generation
Xtext: code generationXtext: code generation
Xtext: code generationMikhail Barash
 
Explain CTS in detail.
Explain CTS in detail. Explain CTS in detail.
Explain CTS in detail. Questpond
 
(6) c sharp introduction_advanced_features_part_i
(6) c sharp introduction_advanced_features_part_i(6) c sharp introduction_advanced_features_part_i
(6) c sharp introduction_advanced_features_part_iNico Ludwig
 
Console applications IN C#
Console applications IN C#Console applications IN C#
Console applications IN C#Sireesh K
 
12. standard library introduction
12. standard library introduction12. standard library introduction
12. standard library introductionVahid Heidari
 
Introducing object oriented programming (oop)
Introducing object oriented programming (oop)Introducing object oriented programming (oop)
Introducing object oriented programming (oop)Hemlathadhevi Annadhurai
 
(3) cpp abstractions more_on_user_defined_types_exercises
(3) cpp abstractions more_on_user_defined_types_exercises(3) cpp abstractions more_on_user_defined_types_exercises
(3) cpp abstractions more_on_user_defined_types_exercisesNico Ludwig
 
Avro2 tf: a data processing engine for tensorflow
Avro2 tf: a data processing engine for tensorflowAvro2 tf: a data processing engine for tensorflow
Avro2 tf: a data processing engine for tensorflowXuhong Zhang
 
Java basic datatypes
Java basic datatypesJava basic datatypes
Java basic datatypesSoba Arjun
 

What's hot (20)

C# note
C# noteC# note
C# note
 
Vb
VbVb
Vb
 
Difference between java and c#
Difference between java and c#Difference between java and c#
Difference between java and c#
 
3rd june
3rd june3rd june
3rd june
 
Standard libraries on iOS
Standard libraries on iOSStandard libraries on iOS
Standard libraries on iOS
 
Xtext: code generation
Xtext: code generationXtext: code generation
Xtext: code generation
 
Python Concepts
Python ConceptsPython Concepts
Python Concepts
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Explain CTS in detail.
Explain CTS in detail. Explain CTS in detail.
Explain CTS in detail.
 
Python training
Python trainingPython training
Python training
 
(6) c sharp introduction_advanced_features_part_i
(6) c sharp introduction_advanced_features_part_i(6) c sharp introduction_advanced_features_part_i
(6) c sharp introduction_advanced_features_part_i
 
Console applications IN C#
Console applications IN C#Console applications IN C#
Console applications IN C#
 
12. standard library introduction
12. standard library introduction12. standard library introduction
12. standard library introduction
 
Introducing object oriented programming (oop)
Introducing object oriented programming (oop)Introducing object oriented programming (oop)
Introducing object oriented programming (oop)
 
Ppt of c++ vs c#
Ppt of c++ vs c#Ppt of c++ vs c#
Ppt of c++ vs c#
 
(3) cpp abstractions more_on_user_defined_types_exercises
(3) cpp abstractions more_on_user_defined_types_exercises(3) cpp abstractions more_on_user_defined_types_exercises
(3) cpp abstractions more_on_user_defined_types_exercises
 
Lzw algorithm
Lzw algorithmLzw algorithm
Lzw algorithm
 
Avro2 tf: a data processing engine for tensorflow
Avro2 tf: a data processing engine for tensorflowAvro2 tf: a data processing engine for tensorflow
Avro2 tf: a data processing engine for tensorflow
 
Java basic datatypes
Java basic datatypesJava basic datatypes
Java basic datatypes
 
Lesson1
Lesson1Lesson1
Lesson1
 

Similar to Introduction to dot net framework

C#_01_CLROverview.ppt
C#_01_CLROverview.pptC#_01_CLROverview.ppt
C#_01_CLROverview.pptMarcEdwards35
 
Introductionto .netframework by Priyanka Pinglikar
Introductionto .netframework by Priyanka PinglikarIntroductionto .netframework by Priyanka Pinglikar
Introductionto .netframework by Priyanka PinglikarPriyankaPinglikar
 
Introduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutionsIntroduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutionsQUONTRASOLUTIONS
 
Introduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutionsIntroduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutionsQuontra Solutions
 
.Net Framework
.Net Framework.Net Framework
.Net FrameworkMohamadKrm
 
.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .netpinky singh
 
Presentation1
Presentation1Presentation1
Presentation1kpkcsc
 
Microsoft .NET (dotnet) Framework 2003 - 2004 overview and web services…
Microsoft .NET (dotnet) Framework 2003 - 2004 overview and web services…Microsoft .NET (dotnet) Framework 2003 - 2004 overview and web services…
Microsoft .NET (dotnet) Framework 2003 - 2004 overview and web services…Lorenz Lo Sauer
 
Chapter 1 introduction to .net
Chapter 1 introduction to .netChapter 1 introduction to .net
Chapter 1 introduction to .netRahul Bhoge
 
Nakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - EnglishNakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - EnglishSvetlin Nakov
 
Common language runtime clr
Common language runtime clrCommon language runtime clr
Common language runtime clrSanSan149
 
Session2 (3)
Session2 (3)Session2 (3)
Session2 (3)DrUjwala1
 
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 part2Synapseindiappsdevelopment
 
Nakov dot net-framework-overview-english
Nakov dot net-framework-overview-englishNakov dot net-framework-overview-english
Nakov dot net-framework-overview-englishsrivathsan.10
 

Similar to Introduction to dot net framework (20)

C#_01_CLROverview.ppt
C#_01_CLROverview.pptC#_01_CLROverview.ppt
C#_01_CLROverview.ppt
 
Introductionto .netframework by Priyanka Pinglikar
Introductionto .netframework by Priyanka PinglikarIntroductionto .netframework by Priyanka Pinglikar
Introductionto .netframework by Priyanka Pinglikar
 
The Philosophy of .Net
The Philosophy of .NetThe Philosophy of .Net
The Philosophy of .Net
 
Introduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutionsIntroduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutions
 
Introduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutionsIntroduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutions
 
.Net Framework
.Net Framework.Net Framework
.Net Framework
 
Microsoft.Net
Microsoft.NetMicrosoft.Net
Microsoft.Net
 
.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .net
 
Presentation1
Presentation1Presentation1
Presentation1
 
Microsoft .NET (dotnet) Framework 2003 - 2004 overview and web services…
Microsoft .NET (dotnet) Framework 2003 - 2004 overview and web services…Microsoft .NET (dotnet) Framework 2003 - 2004 overview and web services…
Microsoft .NET (dotnet) Framework 2003 - 2004 overview and web services…
 
Chapter 1 introduction to .net
Chapter 1 introduction to .netChapter 1 introduction to .net
Chapter 1 introduction to .net
 
Nakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - EnglishNakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - English
 
1.Philosophy of .NET
1.Philosophy of .NET1.Philosophy of .NET
1.Philosophy of .NET
 
Common language runtime clr
Common language runtime clrCommon language runtime clr
Common language runtime clr
 
Session2 (3)
Session2 (3)Session2 (3)
Session2 (3)
 
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
 
Intro.net
Intro.netIntro.net
Intro.net
 
Nakov dot net-framework-overview-english
Nakov dot net-framework-overview-englishNakov dot net-framework-overview-english
Nakov dot net-framework-overview-english
 
.Net framework
.Net framework.Net framework
.Net framework
 
C Sharp Jn
C Sharp JnC Sharp Jn
C Sharp Jn
 

Recently uploaded

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 

Recently uploaded (20)

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 

Introduction to dot net framework

  • 3. Outline Introduction to .NET Framework Architecture of .NET Framework CLS, CLR, CTS, IL, CIL, MSIL
  • 4. Before .NET  Windows GUI development: Win32 API, MFC, Visual Basic, COM  Web development: ASP  Java – “Write once, run anywhere. (WORA)”
  • 5. What Is .NET  .NET is a framework  New Programming Paradigm  .NET is platform independent / cross platform  .NET is language-insensitive
  • 6. .NET provides  Integrated environment  Internet, Desktop , Mobile devices  consistent object-oriented  To provide a portable environment  Amanaged environment
  • 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. Languages Supported by .NET Over 35 languages are supported now  C#, VB, Jscript, Visual C++  Perl, Python, Smalltalk,  Cobol, Haskell, Mercury, Eiffel,  Oberon, Oz, Pascal,  APL, CAML, Scheme, etc.
  • 11. Common Type System (CTS) • A specification for how types are defined and how they behave. • no syntaxspecified • A type can contain zero or more members: • Field • Method • Property • Event
  • 12. Common Type System (CTS) CTS is a formal specification that describes how a given type must be defined for CLR • CTS Class Type • CTS Structure Type • CTS Interface Type • CTS Enumeration type • CTS Delegate type
  • 13. CTS Class Type • Same as C++ class • Can contain members: methods, properties, events, etc. • Support for abstract members that define a polymorphic interface for derived classes • Multiple inheritance is not allowed
  • 14. CTS Class Characteristics • "sealed"? – sealed classes can't function as base classes • Implement any interfaces? – An interface is a collection of abstract members • Abstract or Concrete? – Abstract classes (to define common behaviors for derived) can't be created directly but concrete classes can. • Visibility? – visibility attribute to know whether external assemblies can use it.
  • 15. CTS Structure types  Same as C/C++  Derived from a common base class System.ValueType CTS Enumeration type To group name/value pairs under a specific name Default Storage: System.Int32 (could be Changed)
  • 16. CTS Interface types CTS Delegate type • Same as pure abstract class of C++ • A description of work that a derived class can perform • Similar to a class, but can never be instantiated • Same as C's function pointer (System.MulticastDelegate) • Useful for event handling (ASP .NET)
  • 17. CTS Data Types .NET Base Type C# Type System.Byte Byte System.SByte sbyte System.Int16 short System.Int32 int System.Int64 long System.UInt64 ulong System.Single float System.Double double System.Object object System.String string System.Boolean bool
  • 18. CLS Compliance C# Type CLS Compliance byte Yes sbyte No short Yes int Yes long Yes ulong No float Yes double Yes object Yes string Yes char Yes
  • 19. 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
  • 20. Common Language Runtime  Execution Engine  Compiles Microsoft Intermediate Language (MSIL) into nativecode  Handles garbagecollection  Handles exceptions  Enforces code accesssecurity  Handles verification  Managed v.Unmanaged Code
  • 21. CLR Execution Model Source code VB C# C++ Compiler Compiler Compiler Assembly IL Code Assembly IL Code Assembly IL Code Common Language Runtime JIT Compiler Native Code Operating System Services Managed code Unmanaged Component
  • 22. Advantages of CLR • Support for developer services (debugging) • Interoperation between managed code and unmanaged code (COM,DLLs). • Managed code environment • Improved memory handling • Improved “garbagecollection”
  • 23. 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.
  • 24. CLR .NET Source Code Base Class Libraries (mscorlib.dll) .NET Execution Engine Class Loader Jitter Platform Specific code Execute .NET Compiler DLL or EXE (CIL) mscoree.dll mscoree.dll MicroSoft Common Object Runtime Execution Engine
  • 25. Dot Net Namespaces • MFC, Java, VB 6.0 have predefined set of classes; C# doesn't • C# uses namespace concept • Any language targeting the .NET runtime makes use of the same namespaces and same types as C# • System is the root namespace
  • 26. Sample .NET namespaces System primitive types, garbage collection, etc System.Collections Container objects: ArrayList, Queue, etc. System.Data System.Data.Common System.Data.OleDb System.Data.SqlClient For Database manipulations ADO .NET System.IO file IO, buffering, etc. System.Drawing System.Drawing.2D GDI+ primitives, bitmaps, fonts, icons, etc. System.Threading Threads
  • 27. Common Data Types CLR provides a set of primitive types that all languages must support.The datatypes include:  Integer—three types 16/32/64bits  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 introduced 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 Bytecode CILSource code
  • 30. Base Class Library @ FCL Unified Classes Web Classes (ASP.NET) Controls, Caching, Security, Session, Configuration etc System Classes Collections, Diagnostics, Globalization, IO, Security, Threading Serialization, Reflection, Messaging etc Data (ADO.NET) ADO, SQL,Types etc Drawing Classes Drawing, Imaging, Text, etc Windows Forms Design, Cmpnt Model etc XML Classes XSLT, Path, Serialization etc
  • 31. 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 allCLR languages
  • 32. Summary Introduction to .NET Framework Architecture of .NET Framework CTS, CLR, IL, MSIL, CIL