Sei sulla pagina 1di 5

Overview of the .

NET Framework

Agenda
Category of programmers
Understanding Important Terminologies
What is .NET?
Framework Components, Versions, Version Dependency, Version Compatibility
The Core of .NET Framework
Types of MS.NET Application
Understanding MSIL and PE
BCL / FCL
CLR

Category of Programmers

System Programmers: One who programs directly for a given hardware e.g. Device Drivers or extremely
low level o/p services.

Application Programmers: One who programs applications used by people for their requirements – e.g.
Calculator, Calendar, MS-Office like packages, Accounting Packages etc…

Note: .NET is for Application programming and not for System programming.

Some Important Terminologies

Platform: Platform is an environment for developing and executing application.

Framework: Framework is ready to use collection of Classes and Interfaces used for developing a
particular type of application.

Operating System: A collection of many assembly language programs which either directly or indirectly
(through device driver) would submit instructions to the hardware.

What is .NET?

MS.Net is a Framework built on open internet protocols & standards with tools and services that meld
computing and communication in new ways.

It’s an environment for developing and running software applications featuring ease of development of
web based services, rich standard runtime services available to components written in variety of
programming languages & provides inter language & inter machine inoperability.

Framework Components

MS.NET Framework Runtime: Used for both Development and Production of .NET applications

MS.NET Framework SDK: Mostly used only for Development of .NET application
Visual Studio.NET:
 IDE and RAD Tool for developing .NET applications
 Not needed on Production machine
 Common environment for multiple languages like VB.NET, C#, VC++
 Can be used any type of MS.NET Application
 Can be used also for non .net based applications like PHP pages. For this we need a plug-in
to be installed over Studio.

MS.NET Framework Versions

 Version 1.0 in Year 2002


 Version 1.1 in Year 2003
 Version 2.0 in Year 2005
 Version 3.0 in Year 2006
 Version 3.5 in Year 2007
 Version 4.0 in Year 2010
 Version 4.5 in Year 2012
 All versions can be installed side by side on same machine.

Versions Dependency

 1.0 is a standalone version


 1.1 is also a standalone version
 2.0 is also a standalone version
 3.0 is installed over 2.0
 3.5 is installed over 3.0
 4.0 is also standalone versions.
 When .NET 4.5 is installed it effectively replaces .NET 4.0 on the machine

Version Compatibility

 Doesn't support Forward or Backward compatibility.


 The version used on development machine and production machine must be same.
 If 1.1 has been used for development and on the production machine even if 2.0 is installed and
if 1.1 is not, then the application will not work.

The Core of .NET Framework

 Application Services
 Framework / Base Class Library
 Provides the core functionality: ASP.NET, Web Services, ADO.NET, Windows Forms, IO, XML,
etc.
 Common Language Runtime
 Garbage collection
 Language integration
 Multiple versioning support (no more DLL hell!)
 Integrated security
MS.NET Framework Stack

Types of MS.NET Application


1. Console Based Applications (e.g. Compiler)
2. Windows Application (WinForms)
3. GUI Rich Windows Application (WPF)
4. Windows Services
5. ASP.NET Web Applications (ASPX / MVC)
6. SOA using WCF
7. Mobile / Smart Device Applications

Understanding MSIL and PE


MSIL:
 It stands for Microsoft intermediate language, also known as Common Intermediate
Language (CIL).
 MSIL instructions are pure platform independent.
 MSIL is an intermediate instruction set which is processor and hardware independent.
 The source code when compiled gives MSIL which is an input to the operating system and with
the help of CLR is converted into native code which is processor specific.

PE: Portable Executable (PE) is a Microsoft Win32 compatible format file for .Net applications which
contains the MSIL code and Metadata in binary form. It has the extension .exe or .dll. PE has COFF
(Common Object File Format) specification

Metadata: Metadata is binary information describing your program that is stored either in a common
language runtime portable executable (PE) file or in memory. When you compile your code into a PE file,
metadata is inserted into one portion of the file, and your code is converted to Microsoft intermediate
language (MSIL) and inserted into another portion of the file. Every type and member that is defined
and referenced in a module or assembly is described within metadata. When code is executed, the
runtime loads metadata into memory and references it to discover information about your code's
classes, members, inheritance, and so on.

Metadata describes every type and member defined in your code in a language-neutral manner.
Metadata stores the following information:
 Description of the assembly.
o Identity (name, version, culture, public key).
o The types that are exported.
o Other assemblies that this assembly depends on.
o Security permissions needed to run.
 Description of types.
o Name, visibility, base class, and interfaces implemented.
o Members (methods, fields, properties, events, nested types).
 Attributes.
o Additional descriptive elements that modify types and members.

.NET Base Class Libraries (also called as Framework Class Libraries)


The .NET base class library is a collection of object-oriented types and interfaces that provide object
models and services for many of the complex programming tasks you will face. Most of the types
presented by the .NET base class library are fully extensible, allowing you to build types that incorporate
your own functionality into your managed code. These class libraries are distributed with MS.NET
Framework and works with any language under the common language runtime environment. Therefore
if you are familiar with one .NET language then you can easily migrate to other .NET Languages. All the
base class libraries are grouped under the root namespace System.

Namespace: A namespace is a logical collection of classes and other types with unique name. The
structure of the namespace is like a tree where all the related classes are like leaves.
The most important namespaces in the .NET class library are:

 System
 System.IO
 System.Collections
 System.Threading
 System.Reflection
 System.Security
 System.Net
 System.Data
 System.XML
 System.Web
 System.Web.Services
 System.Windows.Forms
 System.Drawing
 System.Globalization
 System.Resources
Common Language Runtime (CLR)
The Common Language Runtime (CLR), the virtual-machine component of Microsoft's .NET framework,
manages the execution of .NET programs. It does Memory management, threads management, and runs
the code on different platforms (Client or Server).

CLR provides the following benefits for the


application developers:

 Vastly simplified development.


 Seamless integration of the code written in
various languages.
 Evidence-based security with code identity.
 Assembly-based deployment that eliminates
DLL Hell.
 Side-by-side versioning of reusable
components.
 Code reuse through implementation
inheritance.
 Automatic object lifetime management.
 Self describing objects.

Components in CLR

 Code Execution
 Common Type System (CTS)
 Automatic Memory Management
 JIT Compiler
 Garbage Collector
 Security Manager
 Class Loader

Potrebbero piacerti anche