Navneet Sandhu
PG Department of Computer Science
Sri Guru Gobind Singh College, Sector-26, Chandigarh
Introduction to
.NET Framework
NK SGGS-26 2
Introduction to .NET Framework
 The .NET Strategy
 The Origins of the .NET Technology
 The .NET Framework
 The Common Language Runtime
 Visual Studio .NET
 .NET Languages
 Benefits of the .NET Approach
NK SGGS-26 3
The .NET Framework: An Introduction
 Challenges faced by software vendors:
 To develop languages that could integrate with the Web
 To build entire frameworks that would allow developers to
architect, develop and deploy the applications easily
 Major software vendors like IBM, Sun Microsystems and
Microsoft rushed to meet this need with a host of products
 With .NET, Microsoft created an integrated suite of
components that combines the building blocks of the Web –
Markup languages and HTTP
NK SGGS-26 4
The .NET Strategy
 Microsoft took best ideas in the Industry, added their own
creativity and innovations and produced a coherent system
called Microsoft .NET
 Software strategy for implementing and delivering Web
Services
 A software framework that includes everything required for
developing software for web services
NK SGGS-26 5
• Logical and consistent
• United as or forming a whole
The .NET Framework
 Not a programming language
 A framework that supports programming languages such as
Microsoft Visual C#, Microsoft Visual Basic.NET, Microsoft
Visual J#.NET & Microsoft Visual C++.NET; known as
Compliant languages of .NET Framework
 Supports open standards such as XML (eXtensible Markup
Language), SOAP (Simple Object Access Access Protocol) and
HTTP (Hyper Text Transfer Protocol) for developing web
applications which can interact well with applications of other
platforms
NK SGGS-26 6
The .NET Framework Contd…
 Provides a powerful IDE (Integrated Development
Environment) that supports Drag and Drop feature
 Applications can be run in all platforms such as Linux,
Macintosh and Unix without any hitches; For e.g. build
applications for a distributed environment such as the
Internet or traditional Windows-based applications, server
components that can be run on any device (PC or mobile)
 Availability of libraries assist in developing applications
faster, cheaper and easier
NK SGGS-26 7
The .NET Framework Contd…
 Functionality of .NET Framework supporting many programming
languages is due to the use of the powerful Common Language
Runtime (CLR) engine.
 The application programming codes are first compiled by the
language compiler into MSIL (Microsoft Intermediate Language)
or IL (Intermediate Language) code instead of native codes
 MSIL is an instruction set which is in turn compiled by CLR at
runtime and converted into the native code for running the
application.
NK SGGS-26 8
The .NET Framework Contd…
 The platform – independent feature of .NET Framework can be
attributed to CLR which takes care of runtime services such as:
 Memory Processes
 Security Enforcement
 Integration of Language
 Thread Management
 .NET overcomes one of the biggest challenges of the software
industry by providing language interoperability feature.
NK SGGS-26 9
 Integrates presentation, component and data technologies on
a single platform, enabling users to develop Internet
applications easily
 Components to develop Smart Internet Services like Unified
Banking Services, Electronic Bill Payment, Stock Trading etc.
NK SGGS-26 10
The .NET Framework Contd…
The Origin of .NET Technology
Three significant phases of development:
Inter-process
Communication
Inter-module
Communication
Inter-site
Communication
Phase I
Early 1990s
Phase II
1995
Phase III
Late 1990s
OLE Technology
COM Technology
.NET Technology
Three Generations of Component Model
NK SGGS-26 11
OLE Technology
 Object Linking and Embedding
 Microsoft’s component document technology
 To embed documents from one application into another
application, i.e. dynamically link elements from different
applications within each other
 For e.g. an Excel spreadsheet can be embedded within a MS
Word document; double-clicking the embedded spreadsheet
will launch Excel and allow the user to modify the sheet
NK SGGS-26 12
COM Technology
 Microsoft COM (Component Object Model) technology
enables software components to communicate
 COM is used by developers to create re-usable
components, link components together to build
applications and take advantage of Windows services
 COM objects can be created using a variety of
programming languages
NK SGGS-26 13
COM Technology
 Microsoft provides COM interfaces for many Windows
application programming interfaces such as Direct Show,
Media Foundation, Packaging API, Windows Animation
Manager, Windows Portable Devices, Microsoft Active
Directory (AD)
NK SGGS-26 14
.NET Technology
 A collection of technologies to develop Windows or Web
applications
 Developed by Microsoft and launched in February 2002
 Microsoft’s new Internet strategy
 Originally called NGWS (Next Generation Web Services)
 Most popular, powerful and useful Internet technology
 Improved programming models and provided new and
better Web-based infrastructure
NK SGGS-26 15
.NET Technology
 Can run on any browser and on any platform
 .NET is based on the following standards:
 UDDI (Universal Description Discovery and Integration)
 SOAP (Simple Object Access Protocol)
 HTTP (Hypertext Transfer Protocol)
 XML (eXtensible Markup Language)
NK SGGS-26 16
The .NET Framework Contd…
 One of the tools provided by the .NET infrastructure and
tools component of the .NET platform
 .NET Platform provides a new environment for creating
and running robust, scalable and distributed applications
on the Web
 .NET Framework provides an environment for building,
deploying and running web services and other
applications
NK SGGS-26 17
Common Language Runtime (CLR)
 Virtual machine component of the .NET Framework
 Core of .NET Framework
 A runtime environment for all types of .NET applications
 Responsible for .NET Framework supporting many
programming languages (cross-language interoperability)
 Makes .NET Framework platform-independent
NK SGGS-26 18
Common Language Runtime (CLR)
 Source code of .NET compliant languages is compiled by
the language compiler into CLR’s intermediate language
called IL or MSIL
 MSIL code is platform independent (similar to bytecode in
Java)
 Metadata is also generated during compilation along with
MSIL code
 Metadata is stored in a file known as Manifest file
NK SGGS-26 19
Common Language Runtime (CLR)
 A JIT (Just-In-Time) compiler converts MSIL code into
native code of the machine. This code is machine-
dependent
 CLR manages:
 Memory
 Threads
 Exceptions
 Code execution, safety, verification, compilation
NK SGGS-26 20
Common Language Runtime (CLR)
 Runtime system that provides all the power for .NET
 Foundation of the .NET Platform itself
 Services provided:
 Code Management: Locating and executing code,
managing the stack and heap, managing threads
 Security: Code access security, higher-level user and group
access security system
 Garbage collection and Error Handling
NK SGGS-26 21
Common Language Runtime (CLR)
NK SGGS-26 22
Source Code
.NET Language
Compiler
MSIL and
Metadata
CLR
( J I T )
Native Code
Fig. Converting source code into Native Code
Common Language Runtime (CLR)
CLR consists of components that:
 Loads the IL code
 Compile the IL code into native
code
 Execute and manage the code
 Enforce security and type safety
and provide thread support and
other useful services
Common Type System
Intermedia Language (IL)
Execution Support Functions
Security
Garbage Collection
Class Loader
Memory Layout
Fig. Components of CLR
NK SGGS-26 23
Common Type System (CTS)
 .NET Framework provides multiple language support
using CTS
 CTS is built into the CLR
 CTS supports a variety of types and operations found in
most programming languages, so calling one language
from another does not require type conversion
 Although C# is specially designed for .NET programs, .NET
programs can also be build in VC++, VB.NET
NK SGGS-26 24
Common Type System (CTS) Contd…
 Defines how types are declared, used, and managed in
the common language runtime
 Establishes a framework that helps enable cross-language
integration, type safety, and high-performance code
execution.
 Provides an object-oriented model that supports the
complete implementation of many programming
languages.
NK SGGS-26 25
Common Type System (CTS) Contd…
 Defines rules that languages must follow, which helps
ensure that objects written in different languages can
interact with each other.
 Provides a library that contains the primitive data types
NK SGGS-26 26
Microsoft Intermediate Language (MSIL)
 Also known as IL or Intermedia Language
 It is an instruction set into which all the .NET programs
are compiled
 Contains instructions for loading, storing, initializing and
calling methods
NK SGGS-26 27
 .NET Framework supports two types of coding:
 Managed Code
 Unmanaged Code
 Managed Code
 The code created by the compiler of any of the .NET Framework
languages is called MANAGED CODE
 It is in Intermediate Language (IL), so cannot be run directly on a
machine, but runs under the control of CLR
 Kept in a file called an assembly along with the metadata (that
describes classes, methods and attributes of the code)
Managed and Unmanaged Code
NK SGGS-26 28
 Unmanaged Code
 The code developed outside .NET Framework and compiled
directly into machine language is called UNMANAGED CODE
 Does not run under the control of the CLR, but runs under the
process of operating system
 For e.g., Languages such as C++ generate unmanaged code
 The CLR provides an Interoperability Layer that allows both the
managed and unmanaged code to interoperate with each other
Managed and Unmanaged Code
NK SGGS-26 29
Framework Base Classes
 Constitute Framework Class Libraries (FCLs)
 .NET supplies a library of base classes that can be used to
implement applications quickly.
 Can be used by simply instantiating or by inheriting them,
thus extending their functionality
 Most of these classes are a part of the namespace called
System
 Include classes for mathematical and string operations,
creating dialogs and web pages etc.
NK SGGS-26 30
Framework Base Classes
 Types of classes include:
 System classes such as Security, Net, Text, Threading
 Data and XML Classes such as OleDB, SqlClient etc. for
providing database handling
 Windows Forms and Drawing Classes for drawing, printing,
dialog boxes, User Interface design, image handling, fonts
etc.
 Web Classes that provide support for Web pages, HTML
Controls, Web Forms Controls
NK SGGS-26 31
User and Program Interface
 Tools available include:
 Windows Forms (for creating GUI for desktop applications)
 Web Forms (for creating Web applications)
 Console Applications (for creating Command-line oriented
applications, i.e. without GUI)
 Web Services
 These tools enable users to develop user-friendly,
desktop-based as well as web-based applications
NK SGGS-26 32
Visual Studio .NET
 Also called VS.NET
 Supports an Integrated Development Environment (IDE)
with a rich set of features and productivity tools
 These tools allow developers to build web applications
faster and easier
 Provides support to the development lifecycle (build,
debug and deploy code)
 Used for developing console applications, GUIs, Windows
Forms, Web Services and Web Applications
NK SGGS-26 33
.NET Languages
 .NET Platform is language neutral
 Every .NET compliant language supports same data types, use
the same .NET Framework classes and compile into same
MSIL, use a single CLR to manage execution
 Developers are free to choose best language for a particular
component
 Components written in one language can easily interoperate
with components written in other languages
 For e.g., a class written in C# inherits from a class written in VB
 C# is the programming language specifically designed for the
.NET Platform
NK SGGS-26 34
.NET Languages
 Commonly used languages include:
 VC++
 VB.NET
 C#
 J#
 Jscript.NET
 Third Party languages like COBOL, Pascal, ML, Python,
SmallTalk
 C# is the programming language specifically designed for
the .NET Platform NK SGGS-26 35
Benefits of .NET Approach
 Language Interoperability
 Common Language Runtime
 Language Independence
 Base Class Library
 Automatic Garbage Collection
 Security
 Easy development of Web Applications
 Type Safety
 Managed Multithreading Support
 Multi-Device Support
 Common Type System
 Scalability
NK SGGS-26 36
NK SGGS-26 37

ppt about origin of .net technology .pdf

  • 1.
    Navneet Sandhu PG Departmentof Computer Science Sri Guru Gobind Singh College, Sector-26, Chandigarh
  • 2.
  • 3.
    Introduction to .NETFramework  The .NET Strategy  The Origins of the .NET Technology  The .NET Framework  The Common Language Runtime  Visual Studio .NET  .NET Languages  Benefits of the .NET Approach NK SGGS-26 3
  • 4.
    The .NET Framework:An Introduction  Challenges faced by software vendors:  To develop languages that could integrate with the Web  To build entire frameworks that would allow developers to architect, develop and deploy the applications easily  Major software vendors like IBM, Sun Microsystems and Microsoft rushed to meet this need with a host of products  With .NET, Microsoft created an integrated suite of components that combines the building blocks of the Web – Markup languages and HTTP NK SGGS-26 4
  • 5.
    The .NET Strategy Microsoft took best ideas in the Industry, added their own creativity and innovations and produced a coherent system called Microsoft .NET  Software strategy for implementing and delivering Web Services  A software framework that includes everything required for developing software for web services NK SGGS-26 5 • Logical and consistent • United as or forming a whole
  • 6.
    The .NET Framework Not a programming language  A framework that supports programming languages such as Microsoft Visual C#, Microsoft Visual Basic.NET, Microsoft Visual J#.NET & Microsoft Visual C++.NET; known as Compliant languages of .NET Framework  Supports open standards such as XML (eXtensible Markup Language), SOAP (Simple Object Access Access Protocol) and HTTP (Hyper Text Transfer Protocol) for developing web applications which can interact well with applications of other platforms NK SGGS-26 6
  • 7.
    The .NET FrameworkContd…  Provides a powerful IDE (Integrated Development Environment) that supports Drag and Drop feature  Applications can be run in all platforms such as Linux, Macintosh and Unix without any hitches; For e.g. build applications for a distributed environment such as the Internet or traditional Windows-based applications, server components that can be run on any device (PC or mobile)  Availability of libraries assist in developing applications faster, cheaper and easier NK SGGS-26 7
  • 8.
    The .NET FrameworkContd…  Functionality of .NET Framework supporting many programming languages is due to the use of the powerful Common Language Runtime (CLR) engine.  The application programming codes are first compiled by the language compiler into MSIL (Microsoft Intermediate Language) or IL (Intermediate Language) code instead of native codes  MSIL is an instruction set which is in turn compiled by CLR at runtime and converted into the native code for running the application. NK SGGS-26 8
  • 9.
    The .NET FrameworkContd…  The platform – independent feature of .NET Framework can be attributed to CLR which takes care of runtime services such as:  Memory Processes  Security Enforcement  Integration of Language  Thread Management  .NET overcomes one of the biggest challenges of the software industry by providing language interoperability feature. NK SGGS-26 9
  • 10.
     Integrates presentation,component and data technologies on a single platform, enabling users to develop Internet applications easily  Components to develop Smart Internet Services like Unified Banking Services, Electronic Bill Payment, Stock Trading etc. NK SGGS-26 10 The .NET Framework Contd…
  • 11.
    The Origin of.NET Technology Three significant phases of development: Inter-process Communication Inter-module Communication Inter-site Communication Phase I Early 1990s Phase II 1995 Phase III Late 1990s OLE Technology COM Technology .NET Technology Three Generations of Component Model NK SGGS-26 11
  • 12.
    OLE Technology  ObjectLinking and Embedding  Microsoft’s component document technology  To embed documents from one application into another application, i.e. dynamically link elements from different applications within each other  For e.g. an Excel spreadsheet can be embedded within a MS Word document; double-clicking the embedded spreadsheet will launch Excel and allow the user to modify the sheet NK SGGS-26 12
  • 13.
    COM Technology  MicrosoftCOM (Component Object Model) technology enables software components to communicate  COM is used by developers to create re-usable components, link components together to build applications and take advantage of Windows services  COM objects can be created using a variety of programming languages NK SGGS-26 13
  • 14.
    COM Technology  Microsoftprovides COM interfaces for many Windows application programming interfaces such as Direct Show, Media Foundation, Packaging API, Windows Animation Manager, Windows Portable Devices, Microsoft Active Directory (AD) NK SGGS-26 14
  • 15.
    .NET Technology  Acollection of technologies to develop Windows or Web applications  Developed by Microsoft and launched in February 2002  Microsoft’s new Internet strategy  Originally called NGWS (Next Generation Web Services)  Most popular, powerful and useful Internet technology  Improved programming models and provided new and better Web-based infrastructure NK SGGS-26 15
  • 16.
    .NET Technology  Canrun on any browser and on any platform  .NET is based on the following standards:  UDDI (Universal Description Discovery and Integration)  SOAP (Simple Object Access Protocol)  HTTP (Hypertext Transfer Protocol)  XML (eXtensible Markup Language) NK SGGS-26 16
  • 17.
    The .NET FrameworkContd…  One of the tools provided by the .NET infrastructure and tools component of the .NET platform  .NET Platform provides a new environment for creating and running robust, scalable and distributed applications on the Web  .NET Framework provides an environment for building, deploying and running web services and other applications NK SGGS-26 17
  • 18.
    Common Language Runtime(CLR)  Virtual machine component of the .NET Framework  Core of .NET Framework  A runtime environment for all types of .NET applications  Responsible for .NET Framework supporting many programming languages (cross-language interoperability)  Makes .NET Framework platform-independent NK SGGS-26 18
  • 19.
    Common Language Runtime(CLR)  Source code of .NET compliant languages is compiled by the language compiler into CLR’s intermediate language called IL or MSIL  MSIL code is platform independent (similar to bytecode in Java)  Metadata is also generated during compilation along with MSIL code  Metadata is stored in a file known as Manifest file NK SGGS-26 19
  • 20.
    Common Language Runtime(CLR)  A JIT (Just-In-Time) compiler converts MSIL code into native code of the machine. This code is machine- dependent  CLR manages:  Memory  Threads  Exceptions  Code execution, safety, verification, compilation NK SGGS-26 20
  • 21.
    Common Language Runtime(CLR)  Runtime system that provides all the power for .NET  Foundation of the .NET Platform itself  Services provided:  Code Management: Locating and executing code, managing the stack and heap, managing threads  Security: Code access security, higher-level user and group access security system  Garbage collection and Error Handling NK SGGS-26 21
  • 22.
    Common Language Runtime(CLR) NK SGGS-26 22 Source Code .NET Language Compiler MSIL and Metadata CLR ( J I T ) Native Code Fig. Converting source code into Native Code
  • 23.
    Common Language Runtime(CLR) CLR consists of components that:  Loads the IL code  Compile the IL code into native code  Execute and manage the code  Enforce security and type safety and provide thread support and other useful services Common Type System Intermedia Language (IL) Execution Support Functions Security Garbage Collection Class Loader Memory Layout Fig. Components of CLR NK SGGS-26 23
  • 24.
    Common Type System(CTS)  .NET Framework provides multiple language support using CTS  CTS is built into the CLR  CTS supports a variety of types and operations found in most programming languages, so calling one language from another does not require type conversion  Although C# is specially designed for .NET programs, .NET programs can also be build in VC++, VB.NET NK SGGS-26 24
  • 25.
    Common Type System(CTS) Contd…  Defines how types are declared, used, and managed in the common language runtime  Establishes a framework that helps enable cross-language integration, type safety, and high-performance code execution.  Provides an object-oriented model that supports the complete implementation of many programming languages. NK SGGS-26 25
  • 26.
    Common Type System(CTS) Contd…  Defines rules that languages must follow, which helps ensure that objects written in different languages can interact with each other.  Provides a library that contains the primitive data types NK SGGS-26 26
  • 27.
    Microsoft Intermediate Language(MSIL)  Also known as IL or Intermedia Language  It is an instruction set into which all the .NET programs are compiled  Contains instructions for loading, storing, initializing and calling methods NK SGGS-26 27
  • 28.
     .NET Frameworksupports two types of coding:  Managed Code  Unmanaged Code  Managed Code  The code created by the compiler of any of the .NET Framework languages is called MANAGED CODE  It is in Intermediate Language (IL), so cannot be run directly on a machine, but runs under the control of CLR  Kept in a file called an assembly along with the metadata (that describes classes, methods and attributes of the code) Managed and Unmanaged Code NK SGGS-26 28
  • 29.
     Unmanaged Code The code developed outside .NET Framework and compiled directly into machine language is called UNMANAGED CODE  Does not run under the control of the CLR, but runs under the process of operating system  For e.g., Languages such as C++ generate unmanaged code  The CLR provides an Interoperability Layer that allows both the managed and unmanaged code to interoperate with each other Managed and Unmanaged Code NK SGGS-26 29
  • 30.
    Framework Base Classes Constitute Framework Class Libraries (FCLs)  .NET supplies a library of base classes that can be used to implement applications quickly.  Can be used by simply instantiating or by inheriting them, thus extending their functionality  Most of these classes are a part of the namespace called System  Include classes for mathematical and string operations, creating dialogs and web pages etc. NK SGGS-26 30
  • 31.
    Framework Base Classes Types of classes include:  System classes such as Security, Net, Text, Threading  Data and XML Classes such as OleDB, SqlClient etc. for providing database handling  Windows Forms and Drawing Classes for drawing, printing, dialog boxes, User Interface design, image handling, fonts etc.  Web Classes that provide support for Web pages, HTML Controls, Web Forms Controls NK SGGS-26 31
  • 32.
    User and ProgramInterface  Tools available include:  Windows Forms (for creating GUI for desktop applications)  Web Forms (for creating Web applications)  Console Applications (for creating Command-line oriented applications, i.e. without GUI)  Web Services  These tools enable users to develop user-friendly, desktop-based as well as web-based applications NK SGGS-26 32
  • 33.
    Visual Studio .NET Also called VS.NET  Supports an Integrated Development Environment (IDE) with a rich set of features and productivity tools  These tools allow developers to build web applications faster and easier  Provides support to the development lifecycle (build, debug and deploy code)  Used for developing console applications, GUIs, Windows Forms, Web Services and Web Applications NK SGGS-26 33
  • 34.
    .NET Languages  .NETPlatform is language neutral  Every .NET compliant language supports same data types, use the same .NET Framework classes and compile into same MSIL, use a single CLR to manage execution  Developers are free to choose best language for a particular component  Components written in one language can easily interoperate with components written in other languages  For e.g., a class written in C# inherits from a class written in VB  C# is the programming language specifically designed for the .NET Platform NK SGGS-26 34
  • 35.
    .NET Languages  Commonlyused languages include:  VC++  VB.NET  C#  J#  Jscript.NET  Third Party languages like COBOL, Pascal, ML, Python, SmallTalk  C# is the programming language specifically designed for the .NET Platform NK SGGS-26 35
  • 36.
    Benefits of .NETApproach  Language Interoperability  Common Language Runtime  Language Independence  Base Class Library  Automatic Garbage Collection  Security  Easy development of Web Applications  Type Safety  Managed Multithreading Support  Multi-Device Support  Common Type System  Scalability NK SGGS-26 36
  • 37.