'NET and 'NET Framework - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

'NET and 'NET Framework

Description:

Compiling and Executing Managed Code. Source Code. Language Compiler ... Visual Basic.NET. C . JScript. Other languages will also be available ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 33
Provided by: david2222
Category:
Tags: net | basic | code | framework | source | visual

less

Transcript and Presenter's Notes

Title: 'NET and 'NET Framework


1
.NET and .NET Framework
  • What is .NET?
  • What is .NET Framework?
  • What are .NET Technologies?
  • Application Platforms on .NET
  • .NET vs. JAVA

2
What is .NET?
  • Microsoft .NET is a set of Microsoft software
    technologies
  • for connecting information, people, systems, and
    devices. It
  • enables a high level of software integration
    through the use
  • of Web servicessmall, discrete, building-block
    applications
  • that connect to each other as well as to other,
    larger
  • applications over the Internet.
  • A development platform interfaces, components
    and tools
  • to develop software. The biggest change in the
    Microsoft
  • platform since Windows NT replaced DOS.

3
What is .NET Framework
  • The .NET Framework provides the foundation for
    building and running .NET based application
  • The .NET Framework consists of two components
  • Common language runtime (CLR)
  • .NET Framework class library
  • Any language that conforms to the common language
    specification (CLS) can run on the common
    language runtime

4
Common Language Runtime (CLR)
  • The common language runtime manages the execution
    of code and provides services to simplify the
    development process
  • CLR support for multiple languages, and a managed
    environment where common services, such as
    garbage collection and security are automatically
    provided

5
.NET Framework Class Library
  • The .Net Framework class library exposes features
    of the runtime and provides a library of classes
    that are accessed by all Web, windows-based and
    XML Web service applications
  • .NET Framework class library includes
  • ADO.NET (ActiveX Data Objects)
  • ASP.NET (Active Server Pages)
  • XML Web Services
  • User Interfaces

6
How The .Net Framework Works
  • When you compile an application in Visual Studio
    .NET, it is translated into the runtimes common
    language, Microsoft Intermediate Language (MSIL).
    After the application is compiled, the runtime
    manages the execution of the application.
  • The runtime includes a feature called
    just-in-time (JIT) compilation that translates
    the MSIL code into the machine language of the
    system on which the application will run

7
How The .Net Framework Works
8
Compiling and Executing Managed Code
Source Code
9
.NET Technologies
  • The .NET Framework
  • With support for XML Web services
  • Visual Studio.NET
  • Supporting Visual Basic.NET, C, C, and JScript
  • .NET My Services
  • The .NET Enterprise Servers
  • BizTalk Server 2000
  • SQL Server 2000
  • Commerce Server 2000

10
Application Platforms Today
Browser Apps
Web Services Apps
Other Apps
Local Apps
Operating System
11
The .NET Framework
Browser Apps
Web Services Apps
Other Apps
Local Apps
Windows
12
The Competition The Java Environment
Browser Apps
Web Services Apps
Other Apps
Local Apps
Windows, Solaris, Linux, others
13
.NET and Java Application Platforms
  • .NET
  • The .NET Framework
  • Java
  • Java application servers
  • Products include
  • IBM WebSphere Application Server
  • BEA WebLogic Application Server
  • Sun iPlanet Application Server
  • Oracle Application Server
  • Many others

14
Inside a .NET Framework Application
  • Every .NET Framework application relies on the
    CLR
  • Common language runtime provides
  • A common set of data types
  • An intermediate language (MSIL) generated from
    all CLR-based programming languages
  • A common mechanism for packaging compiled code
  • Software that uses the CLR is called managed code

15
Data Types in the CLR
  • The CLR defines the Common Type System (CTS)
  • All languages built on the CLR use the CTS
  • Types are divided into two categories
  • Value types
  • Relatively simple types
  • Allocated on the stack
  • Reference types
  • More complex types
  • Allocated on the heap
  • Destroyed through garbage collection

16
Illustrating the CTS
Object
ValueType
Class
Interface
Byte
Int16
Single
UInt16
Double
UInt32
Array
Char
Int32
UInt64
Int64
String
Enum
Decimal
Delegate
Structure
Others
Boolean
Others


Reference Types
Value Types
17
.NET and Java Runtime Environments
  • .NET Framework
  • Intermediate language is MSIL
  • Provides just-in-time (JIT) compilation
  • There is no interpreter in the CLR
  • Java
  • Intermediate language is bytecode
  • Original design targeted interpretation
  • Java VMs with JIT compilation are now also used

18
Compilation in the .NET Environment
Class X Class Y Class Z
Source Code
MSIL Code for Class X
MSIL Code for Class Y
MSIL Code for Class Z
Metadata for Classes X, Y and Z
DLL or EXE
19
The Structure of a .NET Framework Application
App Domain
Assembly
Class Y
Class Z
Class X
Method 1
Method 1
Method 1
Method 2
Method 2
Method 2
Method 3
Method 3
Method 4
Stack
Heap
Metadata for Classes X, Y and Z
Garbage Collector
JIT Compiler
Loader
Common Language Runtime
20
Languages in .NET
  • All .NET languages are built on the CLR
  • All have much in common
  • Visual Studio.NET supports
  • C
  • Visual Basic.NET
  • C
  • JScript
  • Other languages will also be available

21
An Interface and Class in C
  • public interface ICalc
  • int add(int x, int y)
  • int subtract(int x, int y)
  • public class Calculator ICalc
  • int add(int x, int y)
  • return x y
  • int subtract(int x, int y)
  • return x y

22
An Interface and Class in Java
  • public interface ICalc
  • int add(int x, int y)
  • int subtract(int x, int y)
  • public class Calculator implements ICalc
  • int add(int x, int y)
  • return x y
  • int subtract(int x, int y)
  • return x y

23
A Simple Comparison Similarities
  • Similarities
  • C-derived syntax
  • Object-oriented
  • Single implementation inheritance
  • Multiple interface inheritance
  • Built-in immutable String type

24
A Simple Comparison Differences
  • C adds
  • Attributes
  • Properties
  • Direct memory access
  • In unsafe code

25
C
  • A new language designed expressly for the .NET
    Framework (That is what Microsoft says)
  • Syntax based on C/C
  • Built on the CLR, with
  • Support for the CTS
  • Classes
  • Inheritance
  • Method overloading

26
VB.NET
  • Redesigned from the ground up for the CLR, with
  • Full support for the CTS
  • All other CLR features
  • Classes
  • Inheritance
  • Method overloading
  • Its functionally very much like C

27
VB.NET Example
  • Class Compute
  • Implements IMath
  •  
  • Function Factorial(ByVal F As Integer) As
    Integer
  • Implements IMath.Factorial
  • Dim I As Integer
  • Dim Result As Integer 1
  • For I 2 To F
  • Result Result I
  • Next
  • Return Result
  • End Function
  •  

28
C
  • C with Managed Extensions can be used to create
    .NET applications
  • Extends the base language
  • Managed C provides
  • Garbage collection
  • Built-in support for interfaces, properties, and
    events
  • Access to all other CLR features
  • C can still create native binaries if desired
  • All other Visual Studio.NET languages produce
    only MSIL

29
.NET Framework Class Library
  • Accessible from any language targeting the CLR
  • Written in C
  • Organized into namespaces
  • All of which are below the System namespace
  • Contains
  • ASP.NET
  • ADO.NET
  • Windows Forms

30
A Small Part of the System Namespace
System

Int32, String,
Data
Windows
Web
XML
EnterpriseServices
UI
Services
Forms
XmlDocument,
ServicedComponent,



Connection, DataSet,
31
.NET vs. Java Standard Libraries
  • .NET Framework class library
  • Defined by Microsoft
  • Somewhat Windows-oriented
  • Organized into a hierarchy of namespaces
  • J2SE, J2EE
  • Defined by Sun and the Java Community Process
  • Not bound to any operating system
  • Defined as packages and interfaces

32
Conclusion
  • The .NET Framework includes
  • The CLR
  • Supporting multiple programming languages
  • The .NET Framework class library
  • Both .NET and Java will survive I guess
  • Which makes both of them better
  • .NET is the future of application development on
    Windows
Write a Comment
User Comments (0)
About PowerShow.com