.NET Over View

download .NET Over View

of 23

Transcript of .NET Over View

  • 8/14/2019 .NET Over View

    1/23

    .NET OverviewNET OverviewBY:BY:

    Suresh Chandra SahuSuresh Chandra Sahu

  • 8/14/2019 .NET Over View

    2/23

    What is .NET ??????hat is .NET ?????? Microsoft .NET is a platform for building, running and experiencing theMicrosoft .NET is a platform for building, running and experiencing the

    next generation of distributed applications. It spans clients, servers andnext generation of distributed applications. It spans clients, servers and

    services and consists of:services and consists of:

    A programming model that enables developers to build XML Web servicesA programming model that enables developers to build XML Web services

    and applicationsand applications

    A set of XML Web services, such as Microsoft .NET My Services (formerlyA set of XML Web services, such as Microsoft .NET My Services (formerly

    code-named 'Hailstorm'), that helps developers deliver a simple andcode-named 'Hailstorm'), that helps developers deliver a simple and

    integrated user experience;integrated user experience;

    A set of servers, including Windows 2000, SQL Server and BizTalkA set of servers, including Windows 2000, SQL Server and BizTalk

    Server, that integrates, runs, operates and manages XML Web servicesServer, that integrates, runs, operates and manages XML Web services

    and applicationsand applications

  • 8/14/2019 .NET Over View

    3/23

    Abstraction of OSbstraction of OS Effort to run a program on many different H/W or OSEffort to run a program on many different H/W or OS

    H/W level achieved through OSH/W level achieved through OS

    The problem at Operating System levelThe problem at Operating System level A tough computer problem can be solved by additionA tough computer problem can be solved by addition

    of a layer of Abstractionof a layer of Abstraction

    Microsoft has done the same by layering CLR+SystemMicrosoft has done the same by layering CLR+System

    calls Library on top of Operating Systemcalls Library on top of Operating System

  • 8/14/2019 .NET Over View

    4/23

    .NET FrameworkNET Framework.NET Framework

    Operating System Operating System

    Hardware Hardware Hardware

    .NET abstracts operating systems, which are abstractinghardware.

    This means that we can write software to target the CLR and that software can run on any operating system orplatform which implements the CLR.

  • 8/14/2019 .NET Over View

    5/23

    .NET FrameworkNET Framework

    CLR (Common language Runtime)CLR (Common language Runtime)

    .NET system Class Libraries.NET system Class Libraries

    ASP+ (Web Forms)ASP+ (Web Forms)

    ADO+ADO+

    C# (C Sharp)C# (C Sharp)

  • 8/14/2019 .NET Over View

    6/23

    .NET FrameworkNET Framework

  • 8/14/2019 .NET Over View

    7/23

    CLRLR

    Heart of the .NET FrameworkHeart of the .NET Framework Provides an environment in which programs can runProvides an environment in which programs can run Support many programming languages in a commonSupport many programming languages in a common

    mannermanner ..NETNET applications are compiled to a commonapplications are compiled to a common

    language known as Microsoft Intermediatelanguage known as Microsoft IntermediateLanguage, or "IL".Language, or "IL".

    The CLR, then, handles compiling the IL to machineThe CLR, then, handles compiling the IL to machinelanguagelanguage

    IL contains methods, properties and fields related toIL contains methods, properties and fields related tothe components that are compiledthe components that are compiled

  • 8/14/2019 .NET Over View

    8/23

    Compilationompilation Great FlexibilityGreat Flexibility

    Root of many .NET capabilityRoot of many .NET capability

    MSIL Microsoft Intermediate LanguageMSIL Microsoft Intermediate Language

    All languages that work with .NET have compilers thatAll languages that work with .NET have compilers thatgenerate MSIL rather than machine codegenerate MSIL rather than machine code

    MSIL and Metadata will be compiled into machineMSIL and Metadata will be compiled into machinecodecode

  • 8/14/2019 .NET Over View

    9/23

    Compilation .ompilation .Code Compiler

    IL Metadata

    JIT Compiler

    Execution

  • 8/14/2019 .NET Over View

    10/23

    Compilation Exampleompilation Example A developer build an application in VB.NETA developer build an application in VB.NET

    Compilation process generates IL code ratherCompilation process generates IL code ratherthan binary machine codethan binary machine code

    When user actually runs the application, theWhen user actually runs the application, theCLR invokes a just-in time (JIT) compilerCLR invokes a just-in time (JIT) compiler

    This compiler runs on the users computer toThis compiler runs on the users computer tocompile the IL to machine codecompile the IL to machine code

  • 8/14/2019 .NET Over View

    11/23

    Metadataetadata Provides an exact description of the componentProvides an exact description of the component

    that were compiled to ILthat were compiled to IL

    COM inability to describe the componentCOM inability to describe the component Data is kept in XML so easily accessible andData is kept in XML so easily accessible and

    understandableunderstandable

    Describe components interface and so can beDescribe components interface and so can be

    created and called by any languagecreated and called by any language

    Eliminates any reliance on the windows registryEliminates any reliance on the windows registry

  • 8/14/2019 .NET Over View

    12/23

    Key design goals ofey design goals ofCLRLR

    Simpler and Faster developmentSimpler and Faster development

    Automatic Handling of memory ManagementAutomatic Handling of memory Management

    and process communicationand process communication Tool supportTool support

    Simple and safer deploymentSimple and safer deployment

    Cross Language integrationCross Language integration Versioning and deployment supportVersioning and deployment support

  • 8/14/2019 .NET Over View

    13/23

    Simple and Fasterimple and Fasterdevelopmentevelopment Less code more reuseLess code more reuse

    Provides rich set of functionalityProvides rich set of functionality

    Programs in .NET use this functionalityPrograms in .NET use this functionality

    and so less handwrittingand so less handwritting

  • 8/14/2019 .NET Over View

    14/23

    Memory managementemory managementand Processnd Processcommunicationommunication

    Unnecessary to use malloc to set aside space for an arrayUnnecessary to use malloc to set aside space for an arrayin C++.in C++.

    Need to just simple declaration statementNeed to just simple declaration statement

    Handles references counting on instantiationHandles references counting on instantiation

    Automatic garbage collection for collecting objects noAutomatic garbage collection for collecting objects nolonger referenced by the applicationlonger referenced by the application

  • 8/14/2019 .NET Over View

    15/23

    Tool supportool support Designed to support multiple languagesDesigned to support multiple languages

    Furnishes a rich set of object models that areFurnishes a rich set of object models that areuseful to tools like designers, wizards ..useful to tools like designers, wizards ..

    Third party tools can be easily incorporatedThird party tools can be easily incorporated

    Cross language integrationCross language integration

  • 8/14/2019 .NET Over View

    16/23

    Simple and saferimple and saferdeploymenteployment

    Deployment is very easy because:Deployment is very easy because:

    Applications in .NET are composed of assemblies which contains IL and metadata asApplications in .NET are composed of assemblies which contains IL and metadata as

    previously statedpreviously stated

    So both code and a complete descriptor of the code are in one package and selfSo both code and a complete descriptor of the code are in one package and self

    describing.describing.

    So there is no need to register anything in the registrySo there is no need to register anything in the registry

    Application produced in .NET framework can be easily copied and run usingApplication produced in .NET framework can be easily copied and run using

    XCOPYXCOPY

  • 8/14/2019 .NET Over View

    17/23

    Cross Languageross LanguageIntegrationntegration

    Enable code written in one language toEnable code written in one language tointegrate with code written in other languageintegrate with code written in other language

    Include cross language inheritance, exceptionInclude cross language inheritance, exceptionhandling .handling .

    This can be done because there is a need toThis can be done because there is a need toget the reference of other component throughget the reference of other component throughMetadata and metadata is languageMetadata and metadata is languageindependentindependent

  • 8/14/2019 .NET Over View

    18/23

    Versioning Servicesersioning Services CLR supports side by side execution ofCLR supports side by side execution of

    multiple versions of the samemultiple versions of the same

    component.component.

    If one program want to use theIf one program want to use the

    component with particular version that itcomponent with particular version that itcan get it from the metadata informationcan get it from the metadata information

  • 8/14/2019 .NET Over View

    19/23

    Class Librarieslass Libraries

  • 8/14/2019 .NET Over View

    20/23

    Class Librarieslass Libraries Base classes: input/output , stringBase classes: input/output , string

    manipulation, security management, networkmanipulation, security management, networkcommunications, thread management, textcommunications, thread management, textmanagement and other functions.management and other functions.

    Data classes support persistent dataData classes support persistent datamanagement and include SQL classes formanagement and include SQL classes formanipulating persistent data stores throughmanipulating persistent data stores througha standard SQL interface.a standard SQL interface.

    XML classes enable XML data manipulationXML classes enable XML data manipulationand XML searching and translations.and XML searching and translations.

  • 8/14/2019 .NET Over View

    21/23

    Class Librarieslass Libraries Web Forms include classes that enable you to rapidlyWeb Forms include classes that enable you to rapidly

    develop web GUI applications.develop web GUI applications.

    Windows Forms support a set of classes that allow youWindows Forms support a set of classes that allow youto develop Windows GUI applications facilitatingto develop Windows GUI applications facilitating

    drag-and-drop GUI development and providing adrag-and-drop GUI development and providing a

    common, consistent development interface across allcommon, consistent development interface across all

    languages supported by the .NET Frameworklanguages supported by the .NET Framework

  • 8/14/2019 .NET Over View

    22/23

    Win Formsin Forms .NET provides a single, unified way to.NET provides a single, unified way to

    create user interfaces outside of acreate user interfaces outside of a

    browser environment -browser environment - Win FormWin Formss

    Win Forms provide a language-neutralWin Forms provide a language-neutral

    way to create forms, add controls, andway to create forms, add controls, and

    respond to the user's actionsrespond to the user's actions

    Win Forms are not based on ActiveXWin Forms are not based on ActiveX They are instances of classes in the .NETThey are instances of classes in the .NET

    system class library.system class library.

  • 8/14/2019 .NET Over View

    23/23

    Thank You.hank You.