SlideShare a Scribd company logo
1 of 45
Introduction to .Net Framework 
By 
Quontra Solutions 
Email : info@quontrasolutions.com 
Contact : 404-900-9988 
WebSite : www.quontrasolutions.com
Before .NET 
 Windows GUI development: Win32 API, MFC, 
Visual Basic, COM 
 Web development: ASP 
 Java – “Write once, run anywhere.” 
 Embrace and extend: Visual J++
Life As a C/Win32 API 
Programmer 
 Traditional software development for the 
Windows. 
 C developers are forced to contend with complex 
memory management and pointer arithmetic. 
 It lacks the benefits provided by the object-oriented 
approach 
 When you combine the thousands of global 
functions and data types defined by the Win32 
API to an already formidable language, it is little 
wonder that there are so many buggy 
applications floating around today.
Life As a C++/MFC Programmer 
 C++ is an object-oriented layer on top of C. 
 Programmers benefit from the famed “pillars of OOP” 
(encapsulation, inheritance, and polymorphism). 
 Microsoft Foundation Classes (MFC) provides a 
set of C++ classes that facilitate the construction 
of Win32 applications. 
 It wraps a “sane subset” of the raw Win32 API behind a 
number of classes, magic macros, and numerous 
code-generation tools (wizards). 
 Regardless of the helpful MFC, programming for 
Windows using C++ remains a difficult and error-prone 
experience
Visual Basic 6.0 Programmer 
 Ability to build complex user interfaces, code 
libraries, and data access logic with minimal fuss 
and bother. 
 VB6 hides the complexities of the raw Win32 API from 
view using integrated code wizards, intrinsic data types, 
classes, and VB-specific functions. 
Not fully object-oriented 
 No “is-a” relationships between types (i.e., no classical 
inheritance) 
 No multithreaded applications unless you are willing to 
drop down to low-level Win32 API calls (which is 
complex at best and dangerous at worst).
Life As a Java/J2EE Programmer 
 Object oriented with syntactic roots in C++. 
 Java cleans up many unsavory syntactical aspects of C++. 
 Java provides programmers with a large number of predefined 
“packages” that contain various type definitions. 
 Limited ability to access non-Java APIs. 
 Little support for true cross-language integration. 
 Not appropriate for many graphically or numerically intensive 
applications. 
 A better approach for such programs would be to use a 
language such as C++ where appropriate.
Life As a COM Programmer 
 Microsoft’s previous application development framework. 
 reusable binary code. 
 C++ programmers can build COM classes that can be 
used by VB6. Delphi programmers can use COM 
classes built using C. 
 COM’s language independence is limited. 
 COM has no support for classical inheritance). 
 COM is extremely complex under the hood. 
 The Active Template Library (ATL) provides a set of C++ 
classes, templates, and macros to ease the creation of 
COM types.
Windows DNA Programmer 
 Microsoft has been adding more Internet-aware 
features into its family of operating systems and 
products. 
 COM-based Windows Distributed interNet 
Applications Architecture (DNA) is quite complex. 
 Due to the simple fact that Windows DNA requires 
the use of numerous technologies and languages 
(ASP, HTML, XML, JavaScript, VBScript, COM(+), 
and data access API like ADO).
The complete 
maze… 
 Completely unrelated syntaxes. 
 JavaScript has a syntax much like C, while VBScript is 
a subset of VB6. The result is a highly confused 
mishmash of technologies. 
 Each language and/or technology has its own type 
system: 
An “int” in JavaScript is not quite the same as an 
“Integer” in VB6.
.Net, the Rescuer 
OOP JVM 
.NET 
GUI 
Web 
component-based 
design n-tier design
.Net, the Rescuer
.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
.NET is cross-platform 
APP.exe 
? 
Win64 Win32 
(XP,2K,98) 
WinCE
Narrow view of .Net applications 
.NET Application 
.NET Framework 
Operating System + Hardware
.Net Framework
.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 
VB C++ C# 
Common Language Specification 
ADO.NET: Data and XML 
Base Class Library 
Windows 
Forms 
Common Language Runtime 
Visual Studio.NET 
ASP.NET: Web Services 
and Web Forms 
JScript … 
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. 
 Rational is working on Java compiler for CLR
The CLR Architecture 
Base Class Library Support 
Thread Support COM Marshaler 
Type Checker Exception Manager 
Security Engine Debug Engine 
Class Loader 
MSIL to Native 
Compilers (JIT) 
Code 
Manager 
Garbage 
Collector (GC)
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 
Source VB 
code 
Compiler 
C# C++ 
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
How CLR works?
CLR based 
execution 
APP.exe 
other FCL 
components 
JIT Compiler 
obj code 
CLR 
OS Process 
Core 
FCL 
Underlying OS and HW
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 
 Support for developer services (debugging) 
 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) 
System-defined types 
String Array ValueType Exception Delegate Class1 
Multicast 
Delegate 
Class2 
Class3 
Object 
Enum Structure1 
Enum1 
Primitive types 
Boolean 
Byte 
Int16 
Int32 
Int64 
Char 
Single 
Double 
Decimal 
DateTime 
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 
compile execute 
Hello.java Hello.class JVM 
Source code Byte code 
compile execute 
Hello.vb Hello.exe CLR 
Source code CIL
Base Class Library @ 
FCL 
Unified Classes 
Web Classes (ASP.NET) 
Controls, Caching, Security, Session, Configuration etc 
Data (ADO.NET) Windows Forms 
ADO, SQL,Types etc 
XML Classes 
Design, Cmpnt Model etc 
Drawing Classes 
Drawing, Imaging, Text, etc 
XSLT, Path, Serialization etc 
System Classes 
Collections, Diagnostics, Globalization, IO, Security, 
Threading Serialization, Reflection, Messaging 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
Thank you !!!

More Related Content

What's hot

Presentation1
Presentation1Presentation1
Presentation1
kpkcsc
 
Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net Fundamentals
LiquidHub
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
Doncho Minkov
 
Dotnet framework
Dotnet frameworkDotnet framework
Dotnet framework
Nitu Pandey
 

What's hot (20)

.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .net
 
Net framework
Net frameworkNet framework
Net framework
 
.Net framework
.Net framework.Net framework
.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)
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
 
.Net framework
.Net framework.Net framework
.Net framework
 
Microsoft .NET Framework
Microsoft .NET FrameworkMicrosoft .NET Framework
Microsoft .NET Framework
 
.net CLR
.net CLR.net CLR
.net CLR
 
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 overview
DOT Net overviewDOT Net overview
DOT Net overview
 
Presentation1
Presentation1Presentation1
Presentation1
 
Common language runtime clr
Common language runtime clrCommon language runtime clr
Common language runtime clr
 
Architecture of .net framework
Architecture of .net frameworkArchitecture of .net framework
Architecture of .net framework
 
Introduction to ,NET Framework
Introduction to ,NET FrameworkIntroduction to ,NET Framework
Introduction to ,NET Framework
 
Introduction .NET Framework
Introduction .NET FrameworkIntroduction .NET Framework
Introduction .NET Framework
 
Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net Fundamentals
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
 
Module 1: Introduction to .NET Framework 3.5 (Slides)
Module 1: Introduction to .NET Framework 3.5 (Slides)Module 1: Introduction to .NET Framework 3.5 (Slides)
Module 1: Introduction to .NET Framework 3.5 (Slides)
 
Dotnet framework
Dotnet frameworkDotnet framework
Dotnet framework
 

Similar to Introduction to .NET by QuontraSolutions

ASP.NET Session 1
ASP.NET Session 1ASP.NET Session 1
ASP.NET Session 1
Sisir Ghosh
 
1 get started with c#
1   get started with c#1   get started with c#
1 get started with c#
Tuan Ngo
 
Nakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - EnglishNakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - English
Svetlin Nakov
 
.Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1).Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1)
Rishi Kothari
 
Introdot Netc Sharp En
Introdot Netc Sharp EnIntrodot Netc Sharp En
Introdot Netc Sharp En
Gregory Renard
 
Net framework
Net frameworkNet framework
Net framework
jhsri
 
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnish
Rajnish Kalla
 

Similar to Introduction to .NET by QuontraSolutions (20)

ASP.NET Session 1
ASP.NET Session 1ASP.NET Session 1
ASP.NET Session 1
 
Microsoft.Net
Microsoft.NetMicrosoft.Net
Microsoft.Net
 
.Net Framework
.Net Framework.Net Framework
.Net Framework
 
1 get started with c#
1   get started with c#1   get started with c#
1 get started with c#
 
.Net overview
.Net overview.Net overview
.Net overview
 
Nakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - EnglishNakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - English
 
.Net overview
.Net overview.Net overview
.Net overview
 
.Net Overview
.Net Overview.Net Overview
.Net Overview
 
.Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1).Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1)
 
Dotnet ch1
Dotnet ch1Dotnet ch1
Dotnet ch1
 
Introdot Netc Sharp En
Introdot Netc Sharp EnIntrodot Netc Sharp En
Introdot Netc Sharp En
 
Net framework
Net frameworkNet framework
Net framework
 
Csharp dot net
Csharp dot netCsharp dot net
Csharp dot net
 
As Pdotnet
As PdotnetAs Pdotnet
As Pdotnet
 
Microsoft .NET Platform
Microsoft .NET PlatformMicrosoft .NET Platform
Microsoft .NET Platform
 
Session2 (3)
Session2 (3)Session2 (3)
Session2 (3)
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
 
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnish
 
Overview of microsoft dot net platforms
Overview of microsoft dot net platformsOverview of microsoft dot net platforms
Overview of microsoft dot net platforms
 
Chapter1_Part1.pptx
Chapter1_Part1.pptxChapter1_Part1.pptx
Chapter1_Part1.pptx
 

More from QUONTRASOLUTIONS

Business analyst overview by quontra solutions
Business analyst overview by quontra solutionsBusiness analyst overview by quontra solutions
Business analyst overview by quontra solutions
QUONTRASOLUTIONS
 
Business analyst overview by quontra solutions
Business analyst overview by quontra solutionsBusiness analyst overview by quontra solutions
Business analyst overview by quontra solutions
QUONTRASOLUTIONS
 
Saas overview by quontra solutions
Saas overview  by quontra solutionsSaas overview  by quontra solutions
Saas overview by quontra solutions
QUONTRASOLUTIONS
 

More from QUONTRASOLUTIONS (20)

Big data introduction by quontra solutions
Big data introduction by quontra solutionsBig data introduction by quontra solutions
Big data introduction by quontra solutions
 
Java constructors
Java constructorsJava constructors
Java constructors
 
Cognos Online Training with placement Assistance - QuontraSolutions
Cognos Online Training with placement Assistance - QuontraSolutionsCognos Online Training with placement Assistance - QuontraSolutions
Cognos Online Training with placement Assistance - QuontraSolutions
 
Business analyst overview by quontra solutions
Business analyst overview by quontra solutionsBusiness analyst overview by quontra solutions
Business analyst overview by quontra solutions
 
Business analyst overview by quontra solutions
Business analyst overview by quontra solutionsBusiness analyst overview by quontra solutions
Business analyst overview by quontra solutions
 
Cognos Overview
Cognos Overview Cognos Overview
Cognos Overview
 
Hibernate online training
Hibernate online trainingHibernate online training
Hibernate online training
 
Java j2eeTutorial
Java j2eeTutorialJava j2eeTutorial
Java j2eeTutorial
 
Software Quality Assurance training by QuontraSolutions
Software Quality Assurance training by QuontraSolutionsSoftware Quality Assurance training by QuontraSolutions
Software Quality Assurance training by QuontraSolutions
 
Introduction to software quality assurance by QuontraSolutions
Introduction to software quality assurance by QuontraSolutionsIntroduction to software quality assurance by QuontraSolutions
Introduction to software quality assurance by QuontraSolutions
 
.Net introduction by Quontra Solutions
.Net introduction by Quontra Solutions.Net introduction by Quontra Solutions
.Net introduction by Quontra Solutions
 
Introduction to j2 ee patterns online training class
Introduction to j2 ee patterns online training classIntroduction to j2 ee patterns online training class
Introduction to j2 ee patterns online training class
 
Saas overview by quontra solutions
Saas overview  by quontra solutionsSaas overview  by quontra solutions
Saas overview by quontra solutions
 
Sharepoint taxonomy introduction us
Sharepoint taxonomy introduction   usSharepoint taxonomy introduction   us
Sharepoint taxonomy introduction us
 
Introduction to the sharepoint 2013 userprofile service By Quontra
Introduction to the sharepoint 2013 userprofile service By QuontraIntroduction to the sharepoint 2013 userprofile service By Quontra
Introduction to the sharepoint 2013 userprofile service By Quontra
 
Introduction to SharePoint 2013 REST API
Introduction to SharePoint 2013 REST APIIntroduction to SharePoint 2013 REST API
Introduction to SharePoint 2013 REST API
 
Performance Testing and OBIEE by QuontraSolutions
Performance Testing and OBIEE by QuontraSolutionsPerformance Testing and OBIEE by QuontraSolutions
Performance Testing and OBIEE by QuontraSolutions
 
Obiee introduction building reports by QuontraSolutions
Obiee introduction building reports by QuontraSolutionsObiee introduction building reports by QuontraSolutions
Obiee introduction building reports by QuontraSolutions
 
Sharepoint designer workflow by quontra us
Sharepoint designer workflow by quontra usSharepoint designer workflow by quontra us
Sharepoint designer workflow by quontra us
 
Qa by quontra us
Qa by quontra   usQa by quontra   us
Qa by quontra us
 

Recently uploaded

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 

Introduction to .NET by QuontraSolutions

  • 1. Introduction to .Net Framework By Quontra Solutions Email : info@quontrasolutions.com Contact : 404-900-9988 WebSite : www.quontrasolutions.com
  • 2. Before .NET  Windows GUI development: Win32 API, MFC, Visual Basic, COM  Web development: ASP  Java – “Write once, run anywhere.”  Embrace and extend: Visual J++
  • 3. Life As a C/Win32 API Programmer  Traditional software development for the Windows.  C developers are forced to contend with complex memory management and pointer arithmetic.  It lacks the benefits provided by the object-oriented approach  When you combine the thousands of global functions and data types defined by the Win32 API to an already formidable language, it is little wonder that there are so many buggy applications floating around today.
  • 4. Life As a C++/MFC Programmer  C++ is an object-oriented layer on top of C.  Programmers benefit from the famed “pillars of OOP” (encapsulation, inheritance, and polymorphism).  Microsoft Foundation Classes (MFC) provides a set of C++ classes that facilitate the construction of Win32 applications.  It wraps a “sane subset” of the raw Win32 API behind a number of classes, magic macros, and numerous code-generation tools (wizards).  Regardless of the helpful MFC, programming for Windows using C++ remains a difficult and error-prone experience
  • 5. Visual Basic 6.0 Programmer  Ability to build complex user interfaces, code libraries, and data access logic with minimal fuss and bother.  VB6 hides the complexities of the raw Win32 API from view using integrated code wizards, intrinsic data types, classes, and VB-specific functions. Not fully object-oriented  No “is-a” relationships between types (i.e., no classical inheritance)  No multithreaded applications unless you are willing to drop down to low-level Win32 API calls (which is complex at best and dangerous at worst).
  • 6. Life As a Java/J2EE Programmer  Object oriented with syntactic roots in C++.  Java cleans up many unsavory syntactical aspects of C++.  Java provides programmers with a large number of predefined “packages” that contain various type definitions.  Limited ability to access non-Java APIs.  Little support for true cross-language integration.  Not appropriate for many graphically or numerically intensive applications.  A better approach for such programs would be to use a language such as C++ where appropriate.
  • 7. Life As a COM Programmer  Microsoft’s previous application development framework.  reusable binary code.  C++ programmers can build COM classes that can be used by VB6. Delphi programmers can use COM classes built using C.  COM’s language independence is limited.  COM has no support for classical inheritance).  COM is extremely complex under the hood.  The Active Template Library (ATL) provides a set of C++ classes, templates, and macros to ease the creation of COM types.
  • 8. Windows DNA Programmer  Microsoft has been adding more Internet-aware features into its family of operating systems and products.  COM-based Windows Distributed interNet Applications Architecture (DNA) is quite complex.  Due to the simple fact that Windows DNA requires the use of numerous technologies and languages (ASP, HTML, XML, JavaScript, VBScript, COM(+), and data access API like ADO).
  • 9. The complete maze…  Completely unrelated syntaxes.  JavaScript has a syntax much like C, while VBScript is a subset of VB6. The result is a highly confused mishmash of technologies.  Each language and/or technology has its own type system: An “int” in JavaScript is not quite the same as an “Integer” in VB6.
  • 10. .Net, the Rescuer OOP JVM .NET GUI Web component-based design n-tier design
  • 12. .Net provides  Integrated environment  Internet, Desktop , Mobile devices  consistent object-oriented  To provide a portable environment  A managed environment
  • 13. What Is .NET  .NET is a framework  New programming methodology  .NET is platform independent / cross platform  .NET is language-insensitive
  • 14. .NET is cross-platform APP.exe ? Win64 Win32 (XP,2K,98) WinCE
  • 15. Narrow view of .Net applications .NET Application .NET Framework Operating System + Hardware
  • 17. .Net Architecture  .NET architecture is:  multi-language  cross-platform  based on the CLR, FCL, and JIT technology  .NET components are packaged as assemblies
  • 19. .Net Technical Architecture VB C++ C# Common Language Specification ADO.NET: Data and XML Base Class Library Windows Forms Common Language Runtime Visual Studio.NET ASP.NET: Web Services and Web Forms JScript … Windows Forms
  • 20. 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.  Rational is working on Java compiler for CLR
  • 21. The CLR Architecture Base Class Library Support Thread Support COM Marshaler Type Checker Exception Manager Security Engine Debug Engine Class Loader MSIL to Native Compilers (JIT) Code Manager Garbage Collector (GC)
  • 22. 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
  • 23. CLR Execution Model Source VB code Compiler C# C++ 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
  • 25. CLR based execution APP.exe other FCL components JIT Compiler obj code CLR OS Process Core FCL Underlying OS and HW
  • 26. 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
  • 27. 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?
  • 28. 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.
  • 29. Advantages of CLR  Support for developer services (debugging)  Interoperation between managed code and unmanaged code (COM, DLLs).  Managed code environment  Improved memory handling  Improved “garbage collection”
  • 30. 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)
  • 32. CLI
  • 33. 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).
  • 34. 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
  • 35. Common Type System (CTS) System-defined types String Array ValueType Exception Delegate Class1 Multicast Delegate Class2 Class3 Object Enum Structure1 Enum1 Primitive types Boolean Byte Int16 Int32 Int64 Char Single Double Decimal DateTime User-defined types Delegate1 TimeSpan Guid
  • 37. 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
  • 38. 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
  • 39. Comparison to Java compile execute Hello.java Hello.class JVM Source code Byte code compile execute Hello.vb Hello.exe CLR Source code CIL
  • 40. Base Class Library @ FCL Unified Classes Web Classes (ASP.NET) Controls, Caching, Security, Session, Configuration etc Data (ADO.NET) Windows Forms ADO, SQL,Types etc XML Classes Design, Cmpnt Model etc Drawing Classes Drawing, Imaging, Text, etc XSLT, Path, Serialization etc System Classes Collections, Diagnostics, Globalization, IO, Security, Threading Serialization, Reflection, Messaging etc
  • 41. 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
  • 42. 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
  • 44. 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