SlideShare una empresa de Scribd logo
1 de 63
.NET Overview.NET Overview
Presented byPresented by
Greg SohlGreg Sohl
AgendaAgenda
.NET from 20,000 feet.NET from 20,000 feet
Major .NET PiecesMajor .NET Pieces
Programming in .NETProgramming in .NET
The Common Language Runtime (CLR)The Common Language Runtime (CLR)
The Framework Class LibraryThe Framework Class Library
Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability
ASP.NETASP.NET
ToolsTools
Sample ApplicationsSample Applications
What to ExpectWhat to Expect
Gain a general understanding of what .NETGain a general understanding of what .NET
is, does and the facilities it provides.is, does and the facilities it provides.
AgendaAgenda
.NET from 20,000 feet.NET from 20,000 feet
Major .NET PiecesMajor .NET Pieces
Programming in .NETProgramming in .NET
The Common Language Runtime (CLR)The Common Language Runtime (CLR)
The Framework Class LibraryThe Framework Class Library
Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability
ASP.NETASP.NET
ToolsTools
Sample ApplicationsSample Applications
.NET from 20,000 Feet.NET from 20,000 Feet
HistoryHistory

Application styles and expectationsApplication styles and expectations

API SetsAPI Sets

Java / J2EEJava / J2EE
.NET from 20,000 Feet.NET from 20,000 Feet
What it isWhat it is

It’s a Software Development SystemIt’s a Software Development System

It’s a Runtime SystemIt’s a Runtime System
Addresses Major Software IssuesAddresses Major Software Issues

DLL HellDLL Hell

Installation ComplexityInstallation Complexity

Software Security – Safety of using softwareSoftware Security – Safety of using software
It’s all new, right?It’s all new, right?
AgendaAgenda
.NET from 20,000 feet.NET from 20,000 feet
Major .NET PiecesMajor .NET Pieces
Programming in .NETProgramming in .NET
The Common Language Runtime (CLR)The Common Language Runtime (CLR)
The Framework Class LibraryThe Framework Class Library
Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability
ASP.NETASP.NET
ToolsTools
Sample ApplicationsSample Applications
Major .NET PiecesMajor .NET Pieces
.NET Framework.NET Framework

Common Language RuntimeCommon Language Runtime

.NET Framework Class Library.NET Framework Class Library
LanguagesLanguages
HostsHosts
.NET Servers.NET Servers
Tools – Visual Studio.NETTools – Visual Studio.NET
Hosts
Major .NET PiecesMajor .NET Pieces
Common Language RuntimeCommon Language Runtime
Framework Class LibraryFramework Class Library
VBVB C++C++ C#C#
VisualVisual
Studio.NETStudio.NET
JScriptJScript ……
.NETEnterprise.NETEnterprise
ServersServers
IEIE ShellShell IIS / ASP.NETIIS / ASP.NET
AgendaAgenda
.NET from 20,000 feet.NET from 20,000 feet
Major .NET PiecesMajor .NET Pieces
Programming in .NETProgramming in .NET
The Common Language Runtime (CLR)The Common Language Runtime (CLR)
The Framework Class LibraryThe Framework Class Library
Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability
ASP.NETASP.NET
ToolsTools
Sample ApplicationsSample Applications
Comparing EnvironmentsComparing Environments
The J2EE/.NET Pet Shop ComparisonThe J2EE/.NET Pet Shop Comparison
AgendaAgenda
.NET from 20,000 feet.NET from 20,000 feet
Major .NET PiecesMajor .NET Pieces
Programming in .NETProgramming in .NET
The Common Language Runtime (CLR)The Common Language Runtime (CLR)
The Framework Class LibraryThe Framework Class Library
Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability
ASP.NETASP.NET
ToolsTools
Sample ApplicationsSample Applications
Programming in .NETProgramming in .NET
Language neutral designLanguage neutral design
Supported by many languagesSupported by many languages

C#, VB.NET, C++C#, VB.NET, C++

JScript.NETJScript.NET

Visual J++Visual J++

Delphi (Pascal)Delphi (Pascal)

COBOL, Perl, Eiffel, Python,COBOL, Perl, Eiffel, Python,
Smalltalk,Smalltalk,
Programming in .NETProgramming in .NET
Common Type SystemCommon Type System

Defines how types are declared,Defines how types are declared,
used, and managed in the runtimeused, and managed in the runtime

Defines .NETs OO ModelDefines .NETs OO Model
All Types inherit from System.ObjectAll Types inherit from System.Object

Provides a common set of TypesProvides a common set of Types
that “can be” implemented bythat “can be” implemented by
programming languagesprogramming languages
Programming in .NETProgramming in .NET
Anatomy of a type
Type definitions are composed of zero or more
member declarations that make the type useful

Fields have storage and hold values of a given
type

Methods have signatures and code and represent
operations

Constructors are special methods invoked at init-
time

Properties and events are hints about method
semantics

Nested types provide implementation support for
their surrounding type

Access to members can be restricted to intra-
type or intraassembly for encapsulation
Programming in .NETProgramming in .NET
Common Type SystemCommon Type System
Programming in .NETProgramming in .NET
The Common
Language
Specification (CLS)
subsets the
universally supported
types
Programming in .NETProgramming in .NET
Assemblies and the .NET Framework

The Common Language Runtime requires all
types to belong to an assembly. Assemblies
act as the smallest distribution unit for
component code in the .NET Framework.
Programming in .NETProgramming in .NET
Assemblies defined

Assemblies are used to package and
distribute executable code
Assemblies are the atom of deployment in the CLR
Assemblies are collections of type definitions
Type names are scoped by their containing
assembly
Security Boundary
Version Boundary
Programming in .NETProgramming in .NET
Assemblies and modules

An assembly consists of one or more physical files
known as modules
A module is an executable file containing code and metadata
Each module may be produced using different programming
languages
Exactly one module in an assembly contains an assembly
manifest
CSC.EXE's /t:module and /addmodule switches support
module-level compilation/references
The assembly linker al.exe can link multiple modules and
create the manifest
Programming in .NETProgramming in .NET
Programming in .NETProgramming in .NET
CompilationCompilation

Intermediate Language (IL)Intermediate Language (IL)

Just-in-Time CompilationJust-in-Time Compilation
Programming in .NETProgramming in .NET
Assembly ContentsAssembly Contents

Only the assembly manifestOnly the assembly manifest
is requiredis required
Programming in .NETProgramming in .NET
Language of Choice – C#Language of Choice – C#
Recognition of other language useRecognition of other language use

JScript.NETJScript.NET

VB.NETVB.NET

Delphi.NETDelphi.NET

Fujitsu COBOL.NETFujitsu COBOL.NET
AgendaAgenda
.NET from 20,000 feet.NET from 20,000 feet
Major .NET PiecesMajor .NET Pieces
Programming in .NETProgramming in .NET
The Common Language Runtime (CLR)The Common Language Runtime (CLR)
The Framework Class LibraryThe Framework Class Library
Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability
ASP.NETASP.NET
ToolsTools
Sample ApplicationsSample Applications
Common Language RuntimeCommon Language Runtime
.NET Components.NET Components
Operating SystemOperating System
Common Language SpecificationCommon Language Specification
Common Language RuntimeCommon Language Runtime
Framework Class Library (BCL)Framework Class Library (BCL)
VBVB C++C++ C#C#
VisualStudio.NETVisualStudio.NET
ASP.NET: Web ServicesASP.NET: Web Services
and Web Formsand Web Forms
JScriptJScript ……
WindowsWindows
FormsForms
XML, ADO.NET, etc.XML, ADO.NET, etc.
CLR EnvironmentCLR Environment
CommonCommon LanguageLanguage RuntimeRuntime
.NET PE File.NET PE File.NET PE File.NET PE File .NET PE File.NET PE File
PE FilePE File
Native Image SectionNative Image Section
.data, .rdata, .rsrc, .text.data, .rdata, .rsrc, .text
CLR DataCLR Data
CLR HeaderCLR Header
MetadataMetadata ILIL
PE/COFF HeadersPE/COFF Headers
MetadataMetadata
Assembly name, version, culture, andAssembly name, version, culture, and
public keypublic key
Types that it referencesTypes that it references
Types that it exportsTypes that it exports
Security requirements for executionSecurity requirements for execution
Descriptions of classes, interfaces,Descriptions of classes, interfaces,
methods, properties, fields, events, globalmethods, properties, fields, events, global
methods, etc..methods, etc..
Intermediate Language (IL)Intermediate Language (IL)
Generated by all .NET compilersGenerated by all .NET compilers
MSIL Instruction Set SpecificationMSIL Instruction Set Specification
The IL Assembly Language Programmer’sThe IL Assembly Language Programmer’s
ReferenceReference
Core of .NET programmingCore of .NET programming
Fully supports Object Oriented featuresFully supports Object Oriented features

Data abstraction, inheritance, polymorphismData abstraction, inheritance, polymorphism
Also supports exceptions and eventsAlso supports exceptions and events
CLR ExecutablesCLR Executables
Hello World in 2 languagesHello World in 2 languages

C#.NETC#.NET
using System;using System;
Class MainAppClass MainApp
{public static void Main(){public static void Main()
{ Console.WriteLine(“C# Hello, World!”);}{ Console.WriteLine(“C# Hello, World!”);}
}}

VB.NETVB.NET
Imports SystemImports System
Public Module modmainPublic Module modmain
Sub Main()Sub Main()
Console.WriteLine(“VB Hello, World!”)Console.WriteLine(“VB Hello, World!”)
End SubEnd Sub
End ModuleEnd Module
Examining MetadataExamining Metadata
IL disassembler ILDADM.EXEIL disassembler ILDADM.EXE

Tree viewTree view

Displays the ManifestDisplays the Manifest

CTL-d to dump to diskCTL-d to dump to disk
Reflection ClassesReflection Classes
System.Reflection namespaceSystem.Reflection namespace
Allows you to examine programmaticallyAllows you to examine programmatically
the manifest of an assemblythe manifest of an assembly
Thru Reflection.Emit you can createThru Reflection.Emit you can create
program modules on the flyprogram modules on the fly
CLR ExecutionCLR Execution
Class LoaderClass Loader
.NET PE Files (IL and metadata).NET PE Files (IL and metadata)
JIT Compilers
VerifierVerifier
JITJIT
Execution support and managementExecution support and management
Gargage collection, security engine,Gargage collection, security engine,
Code manager, exception manager, threadingCode manager, exception manager, threading
Class LoaderClass Loader
Loads .NET classes into memory andLoads .NET classes into memory and
prepares them for execution - searches:prepares them for execution - searches:

.config file for the application.config file for the application

GAC Global Assembly CacheGAC Global Assembly Cache

MetadataMetadata
Caches the type information so it doesn’tCaches the type information so it doesn’t
have to load the class againhave to load the class again
Finally - initializes static variables andFinally - initializes static variables and
instantiates an object of the loaded classinstantiates an object of the loaded class
JIT CompilerJIT Compiler
Converts IL to managed native codeConverts IL to managed native code
Dynamically compile code that is optimized forDynamically compile code that is optimized for
the target machinethe target machine
Only the first time the method is invoked - readsOnly the first time the method is invoked - reads
the stub the class-loader created to flag athe stub the class-loader created to flag a
method for compilationmethod for compilation
Stays in memory until the process shuts downStays in memory until the process shuts down
ngen.exe – For pre jittingngen.exe – For pre jitting
Common Language RuntimeCommon Language Runtime
The .NET ShowThe .NET Show

Inside the CLRInside the CLR
CLR – Common Language RuntimeCLR – Common Language Runtime
Core of the .NET architectureCore of the .NET architecture
Virtual Execution Engine manages codeVirtual Execution Engine manages code
Loads modulesLoads modules
Verifies typesVerifies types
JIT compilesJIT compiles
Garbage collection, exception handling,Garbage collection, exception handling,
security, debugging support, interopsecurity, debugging support, interop
SummarySummary
Let’s Take a Break!Let’s Take a Break!
AgendaAgenda
.NET from 20,000 feet.NET from 20,000 feet
Major .NET PiecesMajor .NET Pieces
Programming in .NETProgramming in .NET
The Common Language Runtime (CLR)The Common Language Runtime (CLR)
The Framework Class LibraryThe Framework Class Library
Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability
ASP.NETASP.NET
ToolsTools
Sample ApplicationsSample Applications
Framework Class LibraryFramework Class Library
Operating SystemOperating System
Common Language SpecificationCommon Language Specification
Common Language RuntimeCommon Language Runtime
Framework Class Library (BCL)Framework Class Library (BCL)
VBVB C++C++ C#C#
VisualStudio.NETVisualStudio.NET
ASP.NET: Web ServicesASP.NET: Web Services
and Web Formsand Web Forms
JScriptJScript ……
WindowsWindows
FormsForms
XML, ADO.NET, etc.XML, ADO.NET, etc.
Framework Class LibraryFramework Class Library
The .NET ShowThe .NET Show

Understanding the FrameworkUnderstanding the Framework
Framework Class LibraryFramework Class Library
ADO.NET ArchitectureADO.NET Architecture
DataReaderDataReader
SQL Server and otherSQL Server and other
OLE DB data storeOLE DB data store
DataSetDataSet
ConnectionConnection
CommandCommand
CommandCommand
CommandCommand
CommandCommand
ConnectionConnection
Data-Related Components
DataStores
DataAdapter
Managed-Provider Components
Framework Class LibraryFramework Class Library
ADO.NET BenefitsADO.NET Benefits
InteroperabilityInteroperability

Don’t need COM on both sidesDon’t need COM on both sides

Uses XML to transfer data, even through firewallsUses XML to transfer data, even through firewalls
ScalabilityScalability

Disconnected datasetsDisconnected datasets
ProductivityProductivity

Visual Studio.NET component designerVisual Studio.NET component designer

Type safetyType safety
PerformancePerformance

Disconnected datasetsDisconnected datasets

No need for type conversionsNo need for type conversions
Framework Class LibraryFramework Class Library
Important ADO.NET Data ObjectsImportant ADO.NET Data Objects
DataSetDataSet
DataTableCollectionDataTableCollection
DataTableDataTable
DataRowCollectionDataRowCollection
DataRowDataRow
DataColumnCollectionDataColumnCollection
DataColumnDataColumn
DataViewDataView
DataRelationCollectionDataRelationCollection
DataRelationDataRelation
Framework Class LibraryFramework Class Library
ADO.NETADO.NET
XML Classes make the dataset extremelyXML Classes make the dataset extremely
portableportable

ReadXmlReadXml

WriteXmlWriteXml

WriteXmlSchemaWriteXmlSchema
Framework Class LibraryFramework Class Library
ADO.NET Managed ProvidersADO.NET Managed Providers
Common Interface for accessing dataCommon Interface for accessing data

Implementation ofImplementation of
System.Data.Common.DbDataAdapterSystem.Data.Common.DbDataAdapter
objectsobjects
SQL Server, OLE DB ship with .NETSQL Server, OLE DB ship with .NET
Oracle & ODBC are now availableOracle & ODBC are now available
Other vendors are building providers forOther vendors are building providers for
other databasesother databases
IdbCommandIdbCommand
IdbCommandIdbCommandOleDbCommandOleDbCommand SqlCommandSqlCommand
IDbConnectionIDbConnection
OleDbConnectionOleDbConnection SqlConnectionSqlConnection
IDataParameterCollectionIDataParameterCollection
OleDbParameterCollectionOleDbParameterCollection SQLParameterCollectionSQLParameterCollection
Framework Class LibraryFramework Class Library
ADO.NET Reader ObjectADO.NET Reader Object
New in ADO.NETNew in ADO.NET
Data Reader similar to a stream objectData Reader similar to a stream object
Very efficientVery efficient

Forward onlyForward only

Sequential OrderSequential Order
Recommended method of populating theRecommended method of populating the
datasetdataset
Framework Class LibraryFramework Class Library
Bertrans Meyer’s .NET Training CourseBertrans Meyer’s .NET Training Course

A Survey of the LibrariesA Survey of the Libraries
Framework Class LibraryFramework Class Library
Distributed Application SupportDistributed Application Support

.NET Remote Invocation Services.NET Remote Invocation Services
Web ServicesWeb Services

System. Web.Services.WebServiceSystem. Web.Services.WebService
Remoting ServicesRemoting Services

System.RemotingSystem.Remoting

Message QueuesMessage Queues

ASP.NET as an Application ServerASP.NET as an Application Server
ASP.NETASP.NET
New Web Programming ModelNew Web Programming Model

Totally .NET – Do web programming in anyTotally .NET – Do web programming in any
.NET language..NET language.
Plug-in to IISPlug-in to IIS
Compiled ExecutionCompiled Execution
Tool SupportTool Support
Class & Control LibraryClass & Control Library
Host for Remoting & Web ServicesHost for Remoting & Web Services
AgendaAgenda
.NET from 20,000 feet.NET from 20,000 feet
Major .NET PiecesMajor .NET Pieces
Programming in .NETProgramming in .NET
The Common Language Runtime (CLR)The Common Language Runtime (CLR)
The Framework Class LibraryThe Framework Class Library
Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability
ASP.NETASP.NET
ToolsTools
Sample ApplicationsSample Applications
Managed, Unmanaged andManaged, Unmanaged and
InteroperabilityInteroperability
Managed Code = IL code run by the CLRManaged Code = IL code run by the CLR
Unmanaged Code = COM Objects, Win32Unmanaged Code = COM Objects, Win32
applications, Active-X Controls, i.e.applications, Active-X Controls, i.e.
anything else under Windowsanything else under Windows
Interop – the ability to run managed codeInterop – the ability to run managed code
from unmanaged code or run unmanagedfrom unmanaged code or run unmanaged
code from managed codecode from managed code
Interop – Calling unmanaged DLLInterop – Calling unmanaged DLL
from .NETfrom .NET
Calling Unmanaged MessageBoxCalling Unmanaged MessageBox
using System.Runtime.InteropServices;using System.Runtime.InteropServices;
public class Win32 {public class Win32 {
[DllImport("user32.dll", CharSet=CharSet.Auto)][DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern int MessageBox(int hWnd, String text,public static extern int MessageBox(int hWnd, String text,
String caption, uint type);String caption, uint type);
}}
public class HelloWorld { public static void Main()public class HelloWorld { public static void Main()
{ Win32.MessageBox(0, "Hello World", "Platform Invoke{ Win32.MessageBox(0, "Hello World", "Platform Invoke
Sample", 0); }Sample", 0); }
}}
Using a COM WrapperUsing a COM Wrapper
AgendaAgenda
.NET from 20,000 feet.NET from 20,000 feet
Major .NET PiecesMajor .NET Pieces
Programming in .NETProgramming in .NET
The Common Language Runtime (CLR)The Common Language Runtime (CLR)
The Framework Class LibraryThe Framework Class Library
Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability
ASP.NETASP.NET
ToolsTools
Sample ApplicationsSample Applications
.NET Tools.NET Tools
Visual Studio .NETVisual Studio .NET
ILDASMILDASM
.NET Framework Configuration.NET Framework Configuration
SQL ServerSQL Server
AgendaAgenda
.NET from 20,000 feet.NET from 20,000 feet
Major .NET PiecesMajor .NET Pieces
Programming in .NETProgramming in .NET
The Common Language Runtime (CLR)The Common Language Runtime (CLR)
The Framework Class LibraryThe Framework Class Library
Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability
ASP.NETASP.NET
ToolsTools
Sample ApplicationsSample Applications
Sample ApplicationsSample Applications
Duwamish 7 BookstoreDuwamish 7 Bookstore
Fitch & Mather Online BrokerageFitch & Mather Online Brokerage
DiggerDigger
ResourcesResources
MSDN (msdn.microsoft.com/net)MSDN (msdn.microsoft.com/net)
ASP.Net (www.asp.net)ASP.Net (www.asp.net)
www.gotdotnet.comwww.gotdotnet.com
www.sellsbrothers.comwww.sellsbrothers.com
www.windowsforms.netwww.windowsforms.net
www.c-sharpcorner.comwww.c-sharpcorner.com
.NET Patterns and Practices.NET Patterns and Practices

msdn.microsoft.com/practices/msdn.microsoft.com/practices/
.NET Six-Week Series.NET Six-Week Series

msdn.microsoft.com/net/guide/msdn.microsoft.com/net/guide/
Books! We have a number of books in house.Books! We have a number of books in house.
Questions?Questions?

Más contenido relacionado

La actualidad más candente

Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#rahulsahay19
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftTalentica Software
 
DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet IntroductionWei Sun
 
The .NET Platform - A Brief Overview
The .NET Platform - A Brief OverviewThe .NET Platform - A Brief Overview
The .NET Platform - A Brief OverviewCarlos Lopes
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net frameworkArun Prasad
 
dot net technology
dot net technologydot net technology
dot net technologyImran Khan
 
Components of .NET Framework
Components of .NET FrameworkComponents of .NET Framework
Components of .NET FrameworkRoshith S Pai
 
Overview of microsoft dot net platforms
Overview of microsoft dot net platformsOverview of microsoft dot net platforms
Overview of microsoft dot net platformsAbhijit B.
 
01 intro to programming in .net
01   intro to programming in .net01   intro to programming in .net
01 intro to programming in .netFelisha Hosein
 

La actualidad más candente (18)

Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thrift
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet Introduction
 
Programming in c#
Programming in c#Programming in c#
Programming in c#
 
The .NET Platform - A Brief Overview
The .NET Platform - A Brief OverviewThe .NET Platform - A Brief Overview
The .NET Platform - A Brief Overview
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
 
dot net technology
dot net technologydot net technology
dot net technology
 
Components of .NET Framework
Components of .NET FrameworkComponents of .NET Framework
Components of .NET Framework
 
.Net language support
.Net language support.Net language support
.Net language support
 
Overview of microsoft dot net platforms
Overview of microsoft dot net platformsOverview of microsoft dot net platforms
Overview of microsoft dot net platforms
 
.net framework
.net framework.net framework
.net framework
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
DOT Net overview
DOT Net overviewDOT Net overview
DOT Net overview
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 
1.Philosophy of .NET
1.Philosophy of .NET1.Philosophy of .NET
1.Philosophy of .NET
 
01 intro to programming in .net
01   intro to programming in .net01   intro to programming in .net
01 intro to programming in .net
 
Namespaces in C#
Namespaces in C#Namespaces in C#
Namespaces in C#
 

Similar a .NET Overview (20)

Nakov dot net-framework-overview-english
Nakov dot net-framework-overview-englishNakov dot net-framework-overview-english
Nakov dot net-framework-overview-english
 
Visual studio
Visual studioVisual studio
Visual studio
 
Net Framework Overview
Net Framework OverviewNet Framework Overview
Net Framework Overview
 
Microsoft .NET Framework
Microsoft .NET FrameworkMicrosoft .NET Framework
Microsoft .NET Framework
 
Introdot Netc Sharp En
Introdot Netc Sharp EnIntrodot Netc Sharp En
Introdot Netc Sharp En
 
Introduction to Visual Studio.NET
Introduction to Visual Studio.NETIntroduction to Visual Studio.NET
Introduction to Visual Studio.NET
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
 
c#.pptx
c#.pptxc#.pptx
c#.pptx
 
1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)
 
.Net overview
.Net overview.Net overview
.Net overview
 
.Net Overview
.Net Overview.Net Overview
.Net Overview
 
Net framework
Net frameworkNet framework
Net framework
 
.Net overview
.Net overview.Net overview
.Net overview
 
.Net overview
.Net overview.Net overview
.Net overview
 
Session2(Mod)
Session2(Mod)Session2(Mod)
Session2(Mod)
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Microsoft.Net
Microsoft.NetMicrosoft.Net
Microsoft.Net
 

Más de Greg Sohl

A DSL for Your API
A DSL for Your APIA DSL for Your API
A DSL for Your APIGreg Sohl
 
Cool .NET tools, techniques and libraries
Cool .NET tools, techniques and librariesCool .NET tools, techniques and libraries
Cool .NET tools, techniques and librariesGreg Sohl
 
RESTful APIs in .NET
RESTful APIs in .NETRESTful APIs in .NET
RESTful APIs in .NETGreg Sohl
 
What’s new in Visual Studio 2010 debugging
What’s new in Visual Studio 2010 debuggingWhat’s new in Visual Studio 2010 debugging
What’s new in Visual Studio 2010 debuggingGreg Sohl
 
Automated Unit Testing and TDD
Automated Unit Testing and TDDAutomated Unit Testing and TDD
Automated Unit Testing and TDDGreg Sohl
 
Analyzing .Net Application Memory Usage And Issues
Analyzing .Net Application Memory Usage And IssuesAnalyzing .Net Application Memory Usage And Issues
Analyzing .Net Application Memory Usage And IssuesGreg Sohl
 
Application Security Part 1 Threat Defense In Client Server Applications ...
Application Security   Part 1   Threat Defense In Client Server Applications ...Application Security   Part 1   Threat Defense In Client Server Applications ...
Application Security Part 1 Threat Defense In Client Server Applications ...Greg Sohl
 
.NET Recommended Resources
.NET Recommended Resources.NET Recommended Resources
.NET Recommended ResourcesGreg Sohl
 
Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .NetGreg Sohl
 

Más de Greg Sohl (9)

A DSL for Your API
A DSL for Your APIA DSL for Your API
A DSL for Your API
 
Cool .NET tools, techniques and libraries
Cool .NET tools, techniques and librariesCool .NET tools, techniques and libraries
Cool .NET tools, techniques and libraries
 
RESTful APIs in .NET
RESTful APIs in .NETRESTful APIs in .NET
RESTful APIs in .NET
 
What’s new in Visual Studio 2010 debugging
What’s new in Visual Studio 2010 debuggingWhat’s new in Visual Studio 2010 debugging
What’s new in Visual Studio 2010 debugging
 
Automated Unit Testing and TDD
Automated Unit Testing and TDDAutomated Unit Testing and TDD
Automated Unit Testing and TDD
 
Analyzing .Net Application Memory Usage And Issues
Analyzing .Net Application Memory Usage And IssuesAnalyzing .Net Application Memory Usage And Issues
Analyzing .Net Application Memory Usage And Issues
 
Application Security Part 1 Threat Defense In Client Server Applications ...
Application Security   Part 1   Threat Defense In Client Server Applications ...Application Security   Part 1   Threat Defense In Client Server Applications ...
Application Security Part 1 Threat Defense In Client Server Applications ...
 
.NET Recommended Resources
.NET Recommended Resources.NET Recommended Resources
.NET Recommended Resources
 
Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .Net
 

Último

Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 

Último (20)

Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 

.NET Overview

  • 1. .NET Overview.NET Overview Presented byPresented by Greg SohlGreg Sohl
  • 2. AgendaAgenda .NET from 20,000 feet.NET from 20,000 feet Major .NET PiecesMajor .NET Pieces Programming in .NETProgramming in .NET The Common Language Runtime (CLR)The Common Language Runtime (CLR) The Framework Class LibraryThe Framework Class Library Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability ASP.NETASP.NET ToolsTools Sample ApplicationsSample Applications
  • 3. What to ExpectWhat to Expect Gain a general understanding of what .NETGain a general understanding of what .NET is, does and the facilities it provides.is, does and the facilities it provides.
  • 4. AgendaAgenda .NET from 20,000 feet.NET from 20,000 feet Major .NET PiecesMajor .NET Pieces Programming in .NETProgramming in .NET The Common Language Runtime (CLR)The Common Language Runtime (CLR) The Framework Class LibraryThe Framework Class Library Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability ASP.NETASP.NET ToolsTools Sample ApplicationsSample Applications
  • 5. .NET from 20,000 Feet.NET from 20,000 Feet HistoryHistory  Application styles and expectationsApplication styles and expectations  API SetsAPI Sets  Java / J2EEJava / J2EE
  • 6. .NET from 20,000 Feet.NET from 20,000 Feet What it isWhat it is  It’s a Software Development SystemIt’s a Software Development System  It’s a Runtime SystemIt’s a Runtime System Addresses Major Software IssuesAddresses Major Software Issues  DLL HellDLL Hell  Installation ComplexityInstallation Complexity  Software Security – Safety of using softwareSoftware Security – Safety of using software It’s all new, right?It’s all new, right?
  • 7. AgendaAgenda .NET from 20,000 feet.NET from 20,000 feet Major .NET PiecesMajor .NET Pieces Programming in .NETProgramming in .NET The Common Language Runtime (CLR)The Common Language Runtime (CLR) The Framework Class LibraryThe Framework Class Library Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability ASP.NETASP.NET ToolsTools Sample ApplicationsSample Applications
  • 8. Major .NET PiecesMajor .NET Pieces .NET Framework.NET Framework  Common Language RuntimeCommon Language Runtime  .NET Framework Class Library.NET Framework Class Library LanguagesLanguages HostsHosts .NET Servers.NET Servers Tools – Visual Studio.NETTools – Visual Studio.NET
  • 9. Hosts Major .NET PiecesMajor .NET Pieces Common Language RuntimeCommon Language Runtime Framework Class LibraryFramework Class Library VBVB C++C++ C#C# VisualVisual Studio.NETStudio.NET JScriptJScript …… .NETEnterprise.NETEnterprise ServersServers IEIE ShellShell IIS / ASP.NETIIS / ASP.NET
  • 10. AgendaAgenda .NET from 20,000 feet.NET from 20,000 feet Major .NET PiecesMajor .NET Pieces Programming in .NETProgramming in .NET The Common Language Runtime (CLR)The Common Language Runtime (CLR) The Framework Class LibraryThe Framework Class Library Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability ASP.NETASP.NET ToolsTools Sample ApplicationsSample Applications
  • 11. Comparing EnvironmentsComparing Environments The J2EE/.NET Pet Shop ComparisonThe J2EE/.NET Pet Shop Comparison
  • 12. AgendaAgenda .NET from 20,000 feet.NET from 20,000 feet Major .NET PiecesMajor .NET Pieces Programming in .NETProgramming in .NET The Common Language Runtime (CLR)The Common Language Runtime (CLR) The Framework Class LibraryThe Framework Class Library Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability ASP.NETASP.NET ToolsTools Sample ApplicationsSample Applications
  • 13. Programming in .NETProgramming in .NET Language neutral designLanguage neutral design Supported by many languagesSupported by many languages  C#, VB.NET, C++C#, VB.NET, C++  JScript.NETJScript.NET  Visual J++Visual J++  Delphi (Pascal)Delphi (Pascal)  COBOL, Perl, Eiffel, Python,COBOL, Perl, Eiffel, Python, Smalltalk,Smalltalk,
  • 14. Programming in .NETProgramming in .NET Common Type SystemCommon Type System  Defines how types are declared,Defines how types are declared, used, and managed in the runtimeused, and managed in the runtime  Defines .NETs OO ModelDefines .NETs OO Model All Types inherit from System.ObjectAll Types inherit from System.Object  Provides a common set of TypesProvides a common set of Types that “can be” implemented bythat “can be” implemented by programming languagesprogramming languages
  • 15. Programming in .NETProgramming in .NET Anatomy of a type Type definitions are composed of zero or more member declarations that make the type useful  Fields have storage and hold values of a given type  Methods have signatures and code and represent operations  Constructors are special methods invoked at init- time  Properties and events are hints about method semantics  Nested types provide implementation support for their surrounding type  Access to members can be restricted to intra- type or intraassembly for encapsulation
  • 16. Programming in .NETProgramming in .NET Common Type SystemCommon Type System
  • 17. Programming in .NETProgramming in .NET The Common Language Specification (CLS) subsets the universally supported types
  • 18. Programming in .NETProgramming in .NET Assemblies and the .NET Framework  The Common Language Runtime requires all types to belong to an assembly. Assemblies act as the smallest distribution unit for component code in the .NET Framework.
  • 19. Programming in .NETProgramming in .NET Assemblies defined  Assemblies are used to package and distribute executable code Assemblies are the atom of deployment in the CLR Assemblies are collections of type definitions Type names are scoped by their containing assembly Security Boundary Version Boundary
  • 20. Programming in .NETProgramming in .NET Assemblies and modules  An assembly consists of one or more physical files known as modules A module is an executable file containing code and metadata Each module may be produced using different programming languages Exactly one module in an assembly contains an assembly manifest CSC.EXE's /t:module and /addmodule switches support module-level compilation/references The assembly linker al.exe can link multiple modules and create the manifest
  • 22. Programming in .NETProgramming in .NET CompilationCompilation  Intermediate Language (IL)Intermediate Language (IL)  Just-in-Time CompilationJust-in-Time Compilation
  • 23. Programming in .NETProgramming in .NET Assembly ContentsAssembly Contents  Only the assembly manifestOnly the assembly manifest is requiredis required
  • 24. Programming in .NETProgramming in .NET Language of Choice – C#Language of Choice – C# Recognition of other language useRecognition of other language use  JScript.NETJScript.NET  VB.NETVB.NET  Delphi.NETDelphi.NET  Fujitsu COBOL.NETFujitsu COBOL.NET
  • 25. AgendaAgenda .NET from 20,000 feet.NET from 20,000 feet Major .NET PiecesMajor .NET Pieces Programming in .NETProgramming in .NET The Common Language Runtime (CLR)The Common Language Runtime (CLR) The Framework Class LibraryThe Framework Class Library Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability ASP.NETASP.NET ToolsTools Sample ApplicationsSample Applications
  • 26. Common Language RuntimeCommon Language Runtime .NET Components.NET Components Operating SystemOperating System Common Language SpecificationCommon Language Specification Common Language RuntimeCommon Language Runtime Framework Class Library (BCL)Framework Class Library (BCL) VBVB C++C++ C#C# VisualStudio.NETVisualStudio.NET ASP.NET: Web ServicesASP.NET: Web Services and Web Formsand Web Forms JScriptJScript …… WindowsWindows FormsForms XML, ADO.NET, etc.XML, ADO.NET, etc.
  • 27. CLR EnvironmentCLR Environment CommonCommon LanguageLanguage RuntimeRuntime .NET PE File.NET PE File.NET PE File.NET PE File .NET PE File.NET PE File
  • 28. PE FilePE File Native Image SectionNative Image Section .data, .rdata, .rsrc, .text.data, .rdata, .rsrc, .text CLR DataCLR Data CLR HeaderCLR Header MetadataMetadata ILIL PE/COFF HeadersPE/COFF Headers
  • 29. MetadataMetadata Assembly name, version, culture, andAssembly name, version, culture, and public keypublic key Types that it referencesTypes that it references Types that it exportsTypes that it exports Security requirements for executionSecurity requirements for execution Descriptions of classes, interfaces,Descriptions of classes, interfaces, methods, properties, fields, events, globalmethods, properties, fields, events, global methods, etc..methods, etc..
  • 30. Intermediate Language (IL)Intermediate Language (IL) Generated by all .NET compilersGenerated by all .NET compilers MSIL Instruction Set SpecificationMSIL Instruction Set Specification The IL Assembly Language Programmer’sThe IL Assembly Language Programmer’s ReferenceReference Core of .NET programmingCore of .NET programming Fully supports Object Oriented featuresFully supports Object Oriented features  Data abstraction, inheritance, polymorphismData abstraction, inheritance, polymorphism Also supports exceptions and eventsAlso supports exceptions and events
  • 31. CLR ExecutablesCLR Executables Hello World in 2 languagesHello World in 2 languages  C#.NETC#.NET using System;using System; Class MainAppClass MainApp {public static void Main(){public static void Main() { Console.WriteLine(“C# Hello, World!”);}{ Console.WriteLine(“C# Hello, World!”);} }}  VB.NETVB.NET Imports SystemImports System Public Module modmainPublic Module modmain Sub Main()Sub Main() Console.WriteLine(“VB Hello, World!”)Console.WriteLine(“VB Hello, World!”) End SubEnd Sub End ModuleEnd Module
  • 32. Examining MetadataExamining Metadata IL disassembler ILDADM.EXEIL disassembler ILDADM.EXE  Tree viewTree view  Displays the ManifestDisplays the Manifest  CTL-d to dump to diskCTL-d to dump to disk
  • 33. Reflection ClassesReflection Classes System.Reflection namespaceSystem.Reflection namespace Allows you to examine programmaticallyAllows you to examine programmatically the manifest of an assemblythe manifest of an assembly Thru Reflection.Emit you can createThru Reflection.Emit you can create program modules on the flyprogram modules on the fly
  • 34. CLR ExecutionCLR Execution Class LoaderClass Loader .NET PE Files (IL and metadata).NET PE Files (IL and metadata) JIT Compilers VerifierVerifier JITJIT Execution support and managementExecution support and management Gargage collection, security engine,Gargage collection, security engine, Code manager, exception manager, threadingCode manager, exception manager, threading
  • 35. Class LoaderClass Loader Loads .NET classes into memory andLoads .NET classes into memory and prepares them for execution - searches:prepares them for execution - searches:  .config file for the application.config file for the application  GAC Global Assembly CacheGAC Global Assembly Cache  MetadataMetadata Caches the type information so it doesn’tCaches the type information so it doesn’t have to load the class againhave to load the class again Finally - initializes static variables andFinally - initializes static variables and instantiates an object of the loaded classinstantiates an object of the loaded class
  • 36. JIT CompilerJIT Compiler Converts IL to managed native codeConverts IL to managed native code Dynamically compile code that is optimized forDynamically compile code that is optimized for the target machinethe target machine Only the first time the method is invoked - readsOnly the first time the method is invoked - reads the stub the class-loader created to flag athe stub the class-loader created to flag a method for compilationmethod for compilation Stays in memory until the process shuts downStays in memory until the process shuts down ngen.exe – For pre jittingngen.exe – For pre jitting
  • 37. Common Language RuntimeCommon Language Runtime The .NET ShowThe .NET Show  Inside the CLRInside the CLR
  • 38. CLR – Common Language RuntimeCLR – Common Language Runtime Core of the .NET architectureCore of the .NET architecture Virtual Execution Engine manages codeVirtual Execution Engine manages code Loads modulesLoads modules Verifies typesVerifies types JIT compilesJIT compiles Garbage collection, exception handling,Garbage collection, exception handling, security, debugging support, interopsecurity, debugging support, interop SummarySummary
  • 39. Let’s Take a Break!Let’s Take a Break!
  • 40. AgendaAgenda .NET from 20,000 feet.NET from 20,000 feet Major .NET PiecesMajor .NET Pieces Programming in .NETProgramming in .NET The Common Language Runtime (CLR)The Common Language Runtime (CLR) The Framework Class LibraryThe Framework Class Library Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability ASP.NETASP.NET ToolsTools Sample ApplicationsSample Applications
  • 41. Framework Class LibraryFramework Class Library Operating SystemOperating System Common Language SpecificationCommon Language Specification Common Language RuntimeCommon Language Runtime Framework Class Library (BCL)Framework Class Library (BCL) VBVB C++C++ C#C# VisualStudio.NETVisualStudio.NET ASP.NET: Web ServicesASP.NET: Web Services and Web Formsand Web Forms JScriptJScript …… WindowsWindows FormsForms XML, ADO.NET, etc.XML, ADO.NET, etc.
  • 42. Framework Class LibraryFramework Class Library The .NET ShowThe .NET Show  Understanding the FrameworkUnderstanding the Framework
  • 43. Framework Class LibraryFramework Class Library ADO.NET ArchitectureADO.NET Architecture DataReaderDataReader SQL Server and otherSQL Server and other OLE DB data storeOLE DB data store DataSetDataSet ConnectionConnection CommandCommand CommandCommand CommandCommand CommandCommand ConnectionConnection Data-Related Components DataStores DataAdapter Managed-Provider Components
  • 44. Framework Class LibraryFramework Class Library ADO.NET BenefitsADO.NET Benefits InteroperabilityInteroperability  Don’t need COM on both sidesDon’t need COM on both sides  Uses XML to transfer data, even through firewallsUses XML to transfer data, even through firewalls ScalabilityScalability  Disconnected datasetsDisconnected datasets ProductivityProductivity  Visual Studio.NET component designerVisual Studio.NET component designer  Type safetyType safety PerformancePerformance  Disconnected datasetsDisconnected datasets  No need for type conversionsNo need for type conversions
  • 45. Framework Class LibraryFramework Class Library Important ADO.NET Data ObjectsImportant ADO.NET Data Objects DataSetDataSet DataTableCollectionDataTableCollection DataTableDataTable DataRowCollectionDataRowCollection DataRowDataRow DataColumnCollectionDataColumnCollection DataColumnDataColumn DataViewDataView DataRelationCollectionDataRelationCollection DataRelationDataRelation
  • 46. Framework Class LibraryFramework Class Library ADO.NETADO.NET XML Classes make the dataset extremelyXML Classes make the dataset extremely portableportable  ReadXmlReadXml  WriteXmlWriteXml  WriteXmlSchemaWriteXmlSchema
  • 47. Framework Class LibraryFramework Class Library ADO.NET Managed ProvidersADO.NET Managed Providers Common Interface for accessing dataCommon Interface for accessing data  Implementation ofImplementation of System.Data.Common.DbDataAdapterSystem.Data.Common.DbDataAdapter objectsobjects SQL Server, OLE DB ship with .NETSQL Server, OLE DB ship with .NET Oracle & ODBC are now availableOracle & ODBC are now available Other vendors are building providers forOther vendors are building providers for other databasesother databases
  • 49. Framework Class LibraryFramework Class Library ADO.NET Reader ObjectADO.NET Reader Object New in ADO.NETNew in ADO.NET Data Reader similar to a stream objectData Reader similar to a stream object Very efficientVery efficient  Forward onlyForward only  Sequential OrderSequential Order Recommended method of populating theRecommended method of populating the datasetdataset
  • 50. Framework Class LibraryFramework Class Library Bertrans Meyer’s .NET Training CourseBertrans Meyer’s .NET Training Course  A Survey of the LibrariesA Survey of the Libraries
  • 51. Framework Class LibraryFramework Class Library Distributed Application SupportDistributed Application Support  .NET Remote Invocation Services.NET Remote Invocation Services Web ServicesWeb Services  System. Web.Services.WebServiceSystem. Web.Services.WebService Remoting ServicesRemoting Services  System.RemotingSystem.Remoting  Message QueuesMessage Queues  ASP.NET as an Application ServerASP.NET as an Application Server
  • 52. ASP.NETASP.NET New Web Programming ModelNew Web Programming Model  Totally .NET – Do web programming in anyTotally .NET – Do web programming in any .NET language..NET language. Plug-in to IISPlug-in to IIS Compiled ExecutionCompiled Execution Tool SupportTool Support Class & Control LibraryClass & Control Library Host for Remoting & Web ServicesHost for Remoting & Web Services
  • 53. AgendaAgenda .NET from 20,000 feet.NET from 20,000 feet Major .NET PiecesMajor .NET Pieces Programming in .NETProgramming in .NET The Common Language Runtime (CLR)The Common Language Runtime (CLR) The Framework Class LibraryThe Framework Class Library Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability ASP.NETASP.NET ToolsTools Sample ApplicationsSample Applications
  • 54. Managed, Unmanaged andManaged, Unmanaged and InteroperabilityInteroperability Managed Code = IL code run by the CLRManaged Code = IL code run by the CLR Unmanaged Code = COM Objects, Win32Unmanaged Code = COM Objects, Win32 applications, Active-X Controls, i.e.applications, Active-X Controls, i.e. anything else under Windowsanything else under Windows Interop – the ability to run managed codeInterop – the ability to run managed code from unmanaged code or run unmanagedfrom unmanaged code or run unmanaged code from managed codecode from managed code
  • 55. Interop – Calling unmanaged DLLInterop – Calling unmanaged DLL from .NETfrom .NET
  • 56. Calling Unmanaged MessageBoxCalling Unmanaged MessageBox using System.Runtime.InteropServices;using System.Runtime.InteropServices; public class Win32 {public class Win32 { [DllImport("user32.dll", CharSet=CharSet.Auto)][DllImport("user32.dll", CharSet=CharSet.Auto)] public static extern int MessageBox(int hWnd, String text,public static extern int MessageBox(int hWnd, String text, String caption, uint type);String caption, uint type); }} public class HelloWorld { public static void Main()public class HelloWorld { public static void Main() { Win32.MessageBox(0, "Hello World", "Platform Invoke{ Win32.MessageBox(0, "Hello World", "Platform Invoke Sample", 0); }Sample", 0); } }}
  • 57. Using a COM WrapperUsing a COM Wrapper
  • 58. AgendaAgenda .NET from 20,000 feet.NET from 20,000 feet Major .NET PiecesMajor .NET Pieces Programming in .NETProgramming in .NET The Common Language Runtime (CLR)The Common Language Runtime (CLR) The Framework Class LibraryThe Framework Class Library Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability ASP.NETASP.NET ToolsTools Sample ApplicationsSample Applications
  • 59. .NET Tools.NET Tools Visual Studio .NETVisual Studio .NET ILDASMILDASM .NET Framework Configuration.NET Framework Configuration SQL ServerSQL Server
  • 60. AgendaAgenda .NET from 20,000 feet.NET from 20,000 feet Major .NET PiecesMajor .NET Pieces Programming in .NETProgramming in .NET The Common Language Runtime (CLR)The Common Language Runtime (CLR) The Framework Class LibraryThe Framework Class Library Managed code, Unmanaged code and InteroperabilityManaged code, Unmanaged code and Interoperability ASP.NETASP.NET ToolsTools Sample ApplicationsSample Applications
  • 61. Sample ApplicationsSample Applications Duwamish 7 BookstoreDuwamish 7 Bookstore Fitch & Mather Online BrokerageFitch & Mather Online Brokerage DiggerDigger
  • 62. ResourcesResources MSDN (msdn.microsoft.com/net)MSDN (msdn.microsoft.com/net) ASP.Net (www.asp.net)ASP.Net (www.asp.net) www.gotdotnet.comwww.gotdotnet.com www.sellsbrothers.comwww.sellsbrothers.com www.windowsforms.netwww.windowsforms.net www.c-sharpcorner.comwww.c-sharpcorner.com .NET Patterns and Practices.NET Patterns and Practices  msdn.microsoft.com/practices/msdn.microsoft.com/practices/ .NET Six-Week Series.NET Six-Week Series  msdn.microsoft.com/net/guide/msdn.microsoft.com/net/guide/ Books! We have a number of books in house.Books! We have a number of books in house.

Notas del editor

  1. History Application Styles Single User Multi-user sharing files Client/Server Internet – The network is the computer APIs DOS – API int 0x21 calls – single tasking Windows – Event driven programming, Windows API, long API names RAD development systems – VB, Delphi, PB, etc. Win32 – Event driven programming, introduced threading model, OOP Early 90’s VB encapsulation of windows events MFC Components – Mid 90’s MS introduces COM bastardized API sets Writing components was tedious VB and ATL made consuming components easier Versioning issues Many APIs added to Windows over the years – very inconsistent programming model Differences within single API sets – File I/O character string types Windows, Menus and Controls vs. Device Contexts, Pens, Fonts and Brushes Hodgepodge of disconnected API development Java
  2. Enter .NET Software Development System .NET is a fresh start. Object oriented API replaces the previous flat Win32 API Component-based to the core Replaces COM and DCOM Language Neutral Class / runtime library - .NET Framework Runtime System Powerful runtime sandbox, very similar to the Java runtime Addresses Software Issues DLL Hell, versioning Installation – Touches too many places Start Menu Registry Shortcuts Files loaded in Directories Security Web Apps downloading code No way to limit what an application can access or do
  3. J2EE and .NET Application Server and Web Services Benchmark Middleware Company, October 2002 - The Middleware Company specializes in advanced enterprise Java technology training and consulting.
  4. They accomplished Language Neutrality through several techniques Common Type System Defines how types are managed What is a type All languages have types, such as integers, floats and pointers OOP Basis Common set of Types http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconthenetframeworkclasslibrary.asp
  5. Types have Members Fields Methods Properties Events Visibility
  6. Value types Value types directly contain their data, and instances of value types are either allocated on the stack or allocated inline in a structure. Value types can be built-in (implemented by the runtime), user-defined, or enumerations. For a list of built-in value types, see the .NET Framework Class Library. Variables that are value types each have their own copy of the data, and therefore operations on one variable do not affect other variables. Reference types Reference types store a reference to the value's memory address, and are allocated on the heap. Reference types can be self-describing types, pointer types, or interface types. The type of a reference type can be determined from values of self-describing types. Self-describing types are further split into arrays and class types. The class types are user-defined classes, boxed value types, and delegates. Variables that are reference types can refer to the same object; therefore, operations on one variable can affect the same object referred to by another variable.
  7. CLS rules define a subset of the Common Type System Establishes requirements for CLS compliance If your component uses only CLS features in the API that it exposes to other code (including derived classes), the component is guaranteed to be accessible from any programming language that supports the CLS. Components that adhere to the CLS rules and use only the features included in the CLS are said to be CLS-compliant components. CLS prohibits unsigned integral types CLS prohibits pointer types and jagged arrays CLS prohibits overloading based on case or member kind Language-specific keywords must be "escapable" http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconthenetframeworkclasslibrary.asp
  8. All Types that are created by .NET programs get placed in an Assembly. Assemblies are somewhat analogous to Win32 EXEs and DLLs, but they are much more than that. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconthenetframeworkclasslibrary.asp?frame=true
  9. Assemblies are a fundamental part of programming with the .NET Framework. An assembly performs the following functions: It contains code that the common language runtime executes. Microsoft intermediate language (MSIL) code in a portable executable (PE) file will not be executed if it does not have an associated assembly manifest. Note that each assembly can have only one entry point (that is, DllMain, WinMain, or Main). It forms a deployment unit. When an application starts, only the assemblies that the application initially calls must be present. Other assemblies, such as localization resources or assemblies containing utility classes, can be retrieved on demand. This allows applications to be kept simple and thin when first downloaded. For more information about deploying assemblies, see Deploying Applications. It forms a type boundary. Every type's identity includes the name of the assembly in which it resides. A type called MyType loaded in the scope of one assembly is not the same as a type called MyType loaded in the scope of another assembly. It forms a reference scope boundary. The assembly stores information about what Types can be seen inside and outside the assembly. It forms a security boundary. An assembly is the unit at which permissions are requested and granted. It forms a version boundary. The assembly is the smallest versionable unit in the common language runtime; all types and resources in the same assembly are versioned as a unit. It is the unit at which side-by-side execution is supported. For more information about running multiple versions of the same assembly, see Side-by-Side Execution.
  10. Assemblies are made up of Modules. A Module is the smallest compilable unit in .NET. Typically, an Assembly contains only one Module. This is all that is supported in VS.NET. To create a multi-module assembly, you must use the command line tools. See slide for info.
  11. The most important component of the .NET Framework is the Common Language Runtime or CLR. A program that runs on the Windows operating system. The CLR was written from scratch and was not an add-on like MFC or ATL. It manages and executes code written in .NET languages. It activates objects, performs security checks on them, lays them out in memory, executes them and performs garbage collection on them. Conceptually the CLR is roughly the equivalent to the JVM - 2 major differences 1st difference Java compiler creates bytecode – and the JVM interprets the code .NET Compilers create IL which are JITted into platform specific machine code. 2nd difference JVM runs on many different platforms CLR runs on MS Windows
  12. The two pieces that actually run in the environment are the CLR and your application – the assemblies you created as EXE’s or DLL’s The CLR is the runtime engine that loads the required classes performs just-in-time compilation on needed methods, enforces security checks, and performs other runtime functions like garbage collection.
  13. Windows executable exe or dll must conform to the PE/COFF format An updated loader knows how to load these and then check for the CLR Header In the CLR Header there is an imported fuction _CorExeMain which is implemented by mscoree.dll , the core execution engine of the CLR. So the CLR gets started up and windows surrenders control to it . It will then execute your main() function
  14. Bring up hello.exe in ildasm
  15. Class loader finds and loads the class that exposes main() and instantiates and object of the class The first time a type is referenced Verifier – runtime type verifier – checks the metadata to assure it is well-formed (valid) Checks the IL code to make sure the type signatures are used correctly Done when invoked not at load time
  16. Datastore – SQL SERVER or Oracle Managed provider components connections and commands are objects for managing connections and duh commands (sql statements) Data reader object fast forward only read only record set (snapshot) similar to a server side cursor in ADO Recordset DataSet Readwrite disconnected DataAdapter high level abstraction of the command and connection classes
  17. Can set up tables and the relationships between the tables and use the class methods to Manipulate the data just as you would through an external dbms In memory database
  18. To write your own managed provider you would implement these common classes
  19. Both implement the system.data.xxx class
  20. Web Services XML Web services allow applications to communicate and share data over the Internet, regardless of operating system or programming language.  .NET makes exposing and calling XML Web Services simple Makes it simple to publish any functionality as a Web Methods Integration into Visual Studio.NET Remoting Communication between Application Domains Same Process Diff Process Diff Machines Remote Objects Hosted By Any Managed .EXE IIS .NET Component Services (COM+) http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpsamples/html/remoting_advanced.asp Choosing Your Methodology Web Services for interop Remoting when doing all .NET Message Queues Message Queuing, Microsoft's messaging technology, provides messaging and message queue facilities for any application and among any combination of computers that have Microsoft Windows installed, regardless of whether they are on the same network or online at the same time. For example, suppose you have a retail point-of-sale application that must run 24 hours a day, seven days a week. If the database system behind the application goes down your sales staff might need to start taking orders manually. Using Message Queuing, you can set up the system so that the orders that cannot be processed during the downtime are automatically put into a queue and processed as soon as the database comes back up. http://www.microsoft.com/msmq/
  21. http://www.asp.net
  22. 1. Locates the DLL containing the function. 2. Loads the DLL into memory. 3. Locates the address of the function in memory and pushes its arguments onto the stack, marshaling data as required. Note    Locating and loading the DLL, and locating the address of the function in memory occur only on the first call to the function. 4. Transfers control to the unmanaged function. 5. Platform invoke throws exceptions generated by the unmanaged function to the managed caller.
  23. To call managed (.NET) components from unmanaged code, a com wrapper class is needed to