An Introduction to.net

Embed Size (px)

Citation preview

  • 8/14/2019 An Introduction to.net

    1/38

    An Introduction to .NET

    ASP.NEThttp://sdetu/courses/sdetc101/

    Lecture 04

    Thursday, February 14, 2008

    http://sdetu/courses/sdetc101/http://sdetu/courses/sdetc101/
  • 8/14/2019 An Introduction to.net

    2/38

    14 Feb 2008 ASP.NET 2

    Agenda

    Quick recap

    Introduction to .NET

    Introduction to ASP.NET

  • 8/14/2019 An Introduction to.net

    3/38

    14 Feb 2008 ASP.NET 3

    Introduction to .NET

    .NET ?

    Business strategy from Microsoft to converge personal

    computing with the web.

  • 8/14/2019 An Introduction to.net

    4/38

    14 Feb 2008 ASP.NET 4

    What is a framework?

    A set of software routines that provide a foundation structure

    for an application.

    Frameworks take the tedium out of writing an application

    from scratch.

    Object-oriented application frameworks, which are the norm

    today, are structured as a class library.

  • 8/14/2019 An Introduction to.net

    5/38

    14 Feb 2008 ASP.NET 5

    .NET Framework

    .NET + Framework = .NET Framework

    It is an environment for building, deploying, running webservices and other applications.

  • 8/14/2019 An Introduction to.net

    6/38

    14 Feb 2008 ASP.NET 6

    Objective of .NET Framework

    To provide consistent Object Oriented programming

    environment.

    Provide code execution environment:

    Which reduces security flaws.

    Which reduces version conflicts.

    Which increases performance of application.

    Which can be used for widely varying types of applications, such as

    Windows-based applications and Web-based applications.

  • 8/14/2019 An Introduction to.net

    7/3814 Feb 2008 ASP.NET 7

    What is .NET Framework made up of?

    The class Libraries which take out tedium in developers work.

    The Common Language Runtime which manages the code which is

    executing.

    Memory Management.

    Thread Management.

    Exception handling.

    Garbage collection

    Security

  • 8/14/2019 An Introduction to.net

    8/38

    14 Feb 2008 ASP.NET 8

    What is .NET Framework?

    The middle man

    Operating System + Hardware

    .NET Framework

    .NET Application

  • 8/14/2019 An Introduction to.net

    9/38

    14 Feb 2008 ASP.NET 9

    .NET Frameworkommon Language Runtime

    Operating SystemOperating System

    Common Language RuntimeCommon Language Runtime

    CLR manages code execution at runtime Memory management, thread management, etc. Code-based security Role-based security

  • 8/14/2019 An Introduction to.net

    10/38

    14 Feb 2008 ASP.NET 10

    .NET Frameworkase Class Library

    Operating SystemOperating System

    Common Language RuntimeCommon Language Runtime

    .NET Framework (Base Class Library).NET Framework (Base Class Library)

    Object-oriented collection of reusable types

    Collections, I/O, Strings,

  • 8/14/2019 An Introduction to.net

    11/38

    14 Feb 2008 ASP.NET 11

    .NET Frameworkta Access Layer

    Operating SystemOperating System

    Common Language RuntimeCommon Language Runtime

    .NET Framework (Base Class Library).NET Framework (Base Class Library)

    ADO .NET and XMLADO .NET and XML

    Access relational databases

    Disconnected data model

    Works with XML

  • 8/14/2019 An Introduction to.net

    12/38

    14 Feb 2008 ASP.NET 12

    .NET FrameworkP.NET & Windows Forms

    Operating SystemOperating System

    Common Language RuntimeCommon Language Runtime

    .NET Framework (Base Class Library).NET Framework (Base Class Library)

    ADO .NET and XMLADO .NET and XML

    ASP .NETASP .NETWeb Forms Web ServicesWeb Forms Web Services

    Mobile Internet ToolkitMobile Internet Toolkit

    WindowsWindows

    FormsForms

    Create applications front-end Web-based user

    interface, Windows GUI, Web services,

  • 8/14/2019 An Introduction to.net

    13/38

    14 Feb 2008 ASP.NET 13

    .NET Frameworkommon Language Specification

    Operating SystemOperating System

    Common Language RuntimeCommon Language Runtime

    .NET Framework (Base Class Library).NET Framework (Base Class Library)

    ADO .NET and XMLADO .NET and XML

    ASP .NETASP .NETWeb Forms Web ServicesWeb Forms Web Services

    Mobile Internet ToolkitMobile Internet Toolkit

    WindowsWindows

    FormsForms

    Common Language SpecificationCommon Language SpecificationC++C++ C#C# VBVB PerlPerl J#J#

  • 8/14/2019 An Introduction to.net

    14/38

    14 Feb 2008 ASP.NET 14

    .NET Frameworkisual Studio .NET

    Operating SystemOperating System

    Common Language RuntimeCommon Language Runtime

    .NET Framework (Base Class Library).NET Framework (Base Class Library)

    ADO .NET and XMLADO .NET and XML

    ASP .NETASP .NETWeb Forms Web ServicesWeb Forms Web Services

    Mobile Internet ToolkitMobile Internet Toolkit

    WindowsWindows

    FormsForms

    Common Language SpecificationCommon Language Specification

    C++C++ C#C# VBVB PerlPerl J#J#

    V

    isualStudio

    .NET

    V

    isualStudio

    .NET

  • 8/14/2019 An Introduction to.net

    15/38

    14 Feb 2008 ASP.NET 15

    .NET Framework Architecture

  • 8/14/2019 An Introduction to.net

    16/38

    14 Feb 2008 ASP.NET 16

    Common Language Runtime (CLR)

    The core runtime engine in the Microsoft .NET Framework for

    executing applications.

    .NET equivalent of the Java Virtual Machine, although JVM

    currently supports only the Java language.

    Activates objects, performs security checks on them, lays them

    out in memory, executes them, and garbage-collects them.

    Code running in CLR is referred to as managed code.

  • 8/14/2019 An Introduction to.net

    17/38

  • 8/14/2019 An Introduction to.net

    18/38

    14 Feb 2008 ASP.NET 18

    Jargon Buster

    Managed Code:code that is written to target the

    services of the managed runtime execution

    environment (like CLR)

    Why managed???Managed refers toa method of

    exchanging information between the program and the

    runtime environment

    Then Unmanaged Code???

    Code that is directly executed by the OperatingSystem is known as un-managed code.

  • 8/14/2019 An Introduction to.net

    19/38

    14 Feb 2008 ASP.NET 19

    Languages Supported by .NET

    Perl

    Python

    COBOL

    Jscript

    Eiffel Java

    APL

    Haskell

    Pascal

    ML

    Ada

    C

    C++

    Visual Basic

    C#

    SmallTalk

    Oberon

    Scheme

    Mercury

    Oz

    RPG

    Objective Caml

  • 8/14/2019 An Introduction to.net

    20/38

  • 8/14/2019 An Introduction to.net

    21/38

    14 Feb 2008 ASP.NET 21

    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 process interpretive.

  • 8/14/2019 An Introduction to.net

    22/38

    14 Feb 2008 ASP.NET 22

    JIT Compilation

    Dynamically compiles IL code to managed native code that is optimized

    for execution on a target Operating System

    For optimization reasons, JIT compilation occurs only the first time a

    method is invoked.

    The compiled native code lies in memory until process shuts down and

    garbage-collection takes place.

  • 8/14/2019 An Introduction to.net

    23/38

    14 Feb 2008 ASP.NET 23

    .NET Framework Architecture

  • 8/14/2019 An Introduction to.net

    24/38

    14 Feb 2008 ASP.NET 24

    What CLR gives to your Applications

    CLR makes your applications:

    Platform Independent

    Hardware Independent

    Language Independent

  • 8/14/2019 An Introduction to.net

    25/38

    14 Feb 2008 ASP.NET 25

    The .NET Framework and Visual Studio .NET

    Base Class LibraryBase Class Library

    Common Language SpecificationCommon Language Specification

    Common Language RuntimeCommon Language Runtime

    ADO.NET: Data and XMLADO.NET: Data and XML

    Visual BasicVisual Basic C++C++ C#C#

    VisualStudio

    .NET

    Vi

    sualStudio

    .NET

    ASP.NET: Web ServicesASP.NET: Web Services

    and Web Formsand Web Forms

    JScriptJScript

    WindowsWindows

    FormsForms

  • 8/14/2019 An Introduction to.net

    26/38

    14 Feb 2008 ASP.NET 26

    ASP.NET

    Base Class LibraryBase Class Library

    Common Language SpecificationCommon Language Specification

    Common Language RuntimeCommon Language Runtime

    ADO.NET: Data and XMLADO.NET: Data and XML

    Vi

    sualStudio

    .NET

    VisualStudio

    .NET

    ASP.NET: Web ServicesASP.NET: Web Services

    and Web Formsand Web FormsWindowsWindows

    FormsForms

    Visual BasicVisual Basic C++C++ C#C# JScriptJScript

  • 8/14/2019 An Introduction to.net

    27/38

    14 Feb 2008 ASP.NET 27

    10 Reasons You Love ASP.NET!

    1. Its really, really fast!

    2. Deploy and upgrade running apps with XCOPY

    3. Great tools support

    4. Automatically detects and recovers from errors

    5. Web farm scalable session state

    6. Built-in output caching

    7. Supports wide range of mobile devices

    8. Uses compiled languages

    9. Makes building web services easy

    10. Much simpler page development model

  • 8/14/2019 An Introduction to.net

    28/38

    ASP NET

  • 8/14/2019 An Introduction to.net

    29/38

    14 Feb 2008 ASP.NET 29

    ASP.NETArchitecture (Page Request)

    ASPX

    .ASPX.ASPX

    ASP NET

  • 8/14/2019 An Introduction to.net

    30/38

    14 Feb 2008 ASP.NET 30

    ASP.NETArchitecture (First Time)

    .ASPX.ASPXCompiledCompiled

    ASP NET

  • 8/14/2019 An Introduction to.net

    31/38

    14 Feb 2008 ASP.NET 31

    ASP.NETArchitecture (Compiled Only Once)

    .ASPX.ASPXCompiledCompiled

  • 8/14/2019 An Introduction to.net

    32/38

    14 Feb 2008 ASP.NET 32

    ASP.NETArchitecture (Any Modifications)

    .ASPX.ASPXCompiledCompiled .ASPX.ASPXCompiledCompiled

  • 8/14/2019 An Introduction to.net

    33/38

    14 Feb 2008 ASP.NET 33

    Visual BasicVisual BasicSourceSource

    codecodeCompilerCompiler

    C++C++C#C#

    CompilerCompilerCompilerCompiler

    AssemblyAssemblyIL CodeIL Code

    AssemblyAssemblyIL CodeIL Code

    AssemblyAssemblyIL CodeIL Code

    Operating System ServicesOperating System Services

    Common Language RuntimeCommon Language Runtime

    JIT CompilerJIT Compiler

    Native CodeNative Code

    ManagedManagedcodecode

    UnmanagedUnmanaged

    ComponentComponent

    ASP.NET Execution Model

  • 8/14/2019 An Introduction to.net

    34/38

    14 Feb 2008 ASP.NET 34

    ASP.NET Features

    ASPX, ASP side by side

    Simplified programming model

    Simplified deployment

    Better performance

    Caching

    Security

    Powerful controls

  • 8/14/2019 An Introduction to.net

    35/38

    14 Feb 2008 ASP.NET 35

    ASP.NET Features

    Simplified browser support

    Simplified form validation

    Code behind pages

    More powerful data access

    Web services

    Better session management

  • 8/14/2019 An Introduction to.net

    36/38

    14 Feb 2008 ASP.NET 36

    ASP.NET Features

    XCOPY Deployment.

    Simplified configuration deployment.

    Custom server controls.

    Code Behind Logic.

    Event Delegation Model.

  • 8/14/2019 An Introduction to.net

    37/38

    14 Feb 2008 ASP.NET 37

    Summary

    Got an Idea what is .NET?

    Why .NET is getting so popular ?

    What is ASP.NET?

    How it works ?

    Hope you started loving .NET !!!

  • 8/14/2019 An Introduction to.net

    38/38

    http://www.mtech.edu/outreach/EYH/EHY%20Thank%20you.gif