SlideShare a Scribd company logo
Nakov dot net-framework-overview-english
.NET Enterprise Vision
ERP & Billing
Customer
Service
Sales
Users
Any device,
Any place,
Any time
XML Web
Services
Integrate business
applications and
processes
Back Office
Heterogeneous
application and
server
infrastructure
Scheduling
Authentication
Notification
So what is .NET?
 .NET is a platform that provides a.NET is a platform that provides a
standardizedstandardized set of servicesset of services..
 It’s just like Windows, exceptIt’s just like Windows, except
distributed over the Internetdistributed over the Internet..
 It exports a common interface so thatIt exports a common interface so that
it’s programs can be run on anyit’s programs can be run on any
systemsystem that supports .NET.that supports .NET.
 A specific software frameworkA specific software framework
 Includes aIncludes a common runtimecommon runtime
.NET Framework.NET Framework
 Programming model for .NETProgramming model for .NET
 Platform for runningPlatform for running .NET managed code.NET managed code
in a virtual machine.in a virtual machine.
 ProvidesProvides a very good environment toa very good environment to
develop networked applications and Webdevelop networked applications and Web
ServicesServices
 Provides programming API and unifiedProvides programming API and unified
language-independentlanguage-independent developmentdevelopment
frameworkframework
The Core of .NETThe Core of .NET Framework:Framework:
FCL & CLRFCL & CLR
 Common Language RuntimeCommon Language Runtime
 Garbage collectionGarbage collection
 Language integrationLanguage integration
 Multiple versioning supportMultiple versioning support
(no more DLL hell!)(no more DLL hell!)
 Integrated securityIntegrated security
 Framework Class LibraryFramework Class Library
 Provides the core functionality:Provides the core functionality:
ASP.NET, Web Services, ADO.NET,ASP.NET, Web Services, ADO.NET,
Windows Forms, IO, XML,Windows Forms, IO, XML, etc.etc.
.NET Framework.NET Framework
Common Language RuntimeCommon Language Runtime
Operating SystemOperating System
Common Language RuntimeCommon Language Runtime
 CLR manages codeCLR manages code executionexecution
at runtimeat runtime
 Memory management, threadMemory management, thread
management, etc.management, etc.
.NET Framework.NET Framework
Base Class LibraryBase Class Library
Operating SystemOperating System
Common Language RuntimeCommon Language Runtime
.NET Framework (Base Class Library).NET Framework (Base Class Library)
 Object-oriented collection ofObject-oriented collection of
reusable typesreusable types
 Collections, I/O, Strings, …Collections, I/O, Strings, …
.NET Framework.NET Framework
Data Access LayerData 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 databasesAccess relational databases
 Disconnected data modelDisconnected data model
 Work with XMLWork with XML
.NET Framework.NET Framework
ASP.NET & Windows FormsASP.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 .NET
Web Forms Web ServicesWeb Forms Web Services
Mobile Internet ToolkitMobile Internet Toolkit
WindowsWindows
FormsForms
 Create application’s front-end –Create application’s front-end –
Web-based user interface,Web-based user interface,
Windows GUI, Web services, …Windows GUI, Web services, …
.NET Framework.NET Framework
Programming LanguagesProgramming Languages
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 .NET
Web Forms Web ServicesWeb Forms Web Services
Mobile Internet ToolkitMobile Internet Toolkit
WindowsWindows
FormsForms
C++C++ C#C# VB.NETVB.NET PerlPerl J#J# ……
 Use your favorite languageUse your favorite language
.NET Framework.NET Framework
Common Language SpecificationCommon 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 .NET
Web 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# ……
.NET Framework.NET Framework
Visual Studio .NETVisual 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 .NET
Web 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# ……
VisualStudio.NETVisualStudio.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 .NET
Web Services Web FormsWeb Services Web Forms
Mobile Internet ToolkitMobile Internet Toolkit
WindowsWindows
FormsForms
Common Language SpecificationCommon Language Specification
C++C++ C#C# VBVB PerlPerl J#J# ……
VisualStudio.NETVisualStudio.NET
Open LanguageOpen Language
SpecificationSpecification
C# Language –C# Language –
Submitted to ECMASubmitted to ECMA
XML-basedXML-based
data accessdata access
Web services –Web services –
XML, SOAP-basedXML, SOAP-based
.NET Framework.NET Framework
Standards ComplianceStandards Compliance
Common Language RuntimeCommon Language Runtime
 ManagesManages running coderunning code – like a virtual– like a virtual
machinemachine
 ThreadingThreading
 Memory managementMemory management
 No interpreter:No interpreter: JIT-compiler producesJIT-compiler produces
native codenative code – during the program– during the program
installation or at run timeinstallation or at run time
 Fine-grained evidence-basedFine-grained evidence-based securitysecurity
 Code access securityCode access security
 Code can be verifiedCode can be verified to guarantee type safetyto guarantee type safety
 No unsafe casts, no un-initialized variablesNo unsafe casts, no un-initialized variables
and no out-of-bounds array indexingand no out-of-bounds array indexing
 Role-based securityRole-based security
CLR Execution ModelCLR Execution Model
Managed CodeManaged Code
 Code that targets the CLR is referred toCode that targets the CLR is referred to
asas managed codemanaged code
 All managed code has the features ofAll managed code has the features of
the CLRthe CLR
 Object-orientedObject-oriented
 Type-safeType-safe
 Cross-language integrationCross-language integration
 Cross language exception handlingCross language exception handling
 Multiple version supportMultiple version support
 Managed code is represented in specialManaged code is represented in special
Intermediate Language (IL)Intermediate Language (IL)
Automatic Memory ManagementAutomatic Memory Management
 The CLR manages memory for managed codeThe CLR manages memory for managed code
 All allocations of objects and buffers made fromAll allocations of objects and buffers made from
aa Managed HeapManaged Heap
 Unused objectsUnused objects and buffers are cleaned upand buffers are cleaned up
automatically throughautomatically through Garbage CollectionGarbage Collection
 Some of the worst bugs in softwareSome of the worst bugs in software
developmentdevelopment are not possibleare not possible with managedwith managed
codecode
 Leaked memory or objectsLeaked memory or objects
 References to freed or non-existent objectsReferences to freed or non-existent objects
 Reading ofReading of uninitialised variablesuninitialised variables
 PointerlessPointerless environmentenvironment
Multiple Language SupportMultiple Language Support
 IL (MSIL or CIL) – Intermediate LanguageIL (MSIL or CIL) – Intermediate Language
 It is low-level (machine) language, likeIt is low-level (machine) language, like
Assembler, but is Object-orientedAssembler, but is Object-oriented
 CTS is aCTS is a rich type system built into the CLRrich type system built into the CLR
 Implements various types (Implements various types (intint, float, string, …), float, string, …)
 And operations on those typesAnd operations on those types
 CLS is a set of specifications that allCLS is a set of specifications that all
languages and libraries need to followlanguages and libraries need to follow
 This will ensureThis will ensure interoperability betweeninteroperability between
languageslanguages
Example of MSIL CodeExample of MSIL Code
.method private hidebysig static void Main().method private hidebysig static void Main()
cil managedcil managed
{{
.entrypoint.entrypoint
// Code size 11 (0xb)// Code size 11 (0xb)
.maxstack 8.maxstack 8
IL_0000: ldstr "Hello, world!"IL_0000: ldstr "Hello, world!"
IL_0005: call voidIL_0005: call void
[mscorlib]System.Console::WriteLine(string)[mscorlib]System.Console::WriteLine(string)
IL_000a: retIL_000a: ret
} // end of method HelloWorld::Main} // end of method HelloWorld::Main
Common Type System (CTS)Common Type System (CTS)
 All .NET languages have the same primitiveAll .NET languages have the same primitive
data types. Andata types. An intint in C# is the same as anin C# is the same as an intint
in VB.NETin VB.NET
 When communicating between modulesWhen communicating between modules
written inwritten in any .NET languageany .NET language, the types are, the types are
guaranteed to be compatible on the binaryguaranteed to be compatible on the binary
levellevel
 Types can be:Types can be:
 Value types – passed by value, stored in theValue types – passed by value, stored in the
stackstack
 Reference types – passed by reference, storedReference types – passed by reference, stored
in the heapin the heap
Common LanguageCommon Language
Specification (CLS)Specification (CLS)
 Any language that conforms to the CLSAny language that conforms to the CLS
is a .NET languageis a .NET language
 A language that conforms to theA language that conforms to the CLSCLS
has the ability to take full advantage ofhas the ability to take full advantage of
the Framework Class Library (FCLthe Framework Class Library (FCL))
.NET Languages.NET Languages
 Languages provided by MicrosoftLanguages provided by Microsoft
 C++, C#, J#, VB.NET,C++, C#, J#, VB.NET, JScriptJScript
 Third-parties languagesThird-parties languages
 Perl, Python, Pascal, APL, COBOL, Eiffel,Perl, Python, Pascal, APL, COBOL, Eiffel,
Haskell, ML, Oberon, Scheme, SmalltalkHaskell, ML, Oberon, Scheme, Smalltalk……
 Advanced multi-language featuresAdvanced multi-language features
 Cross-language inheritance and exceptionsCross-language inheritance and exceptions
handlinghandling
 Object system is built in, not bolted onObject system is built in, not bolted on
 No additional rules or API to learnNo additional rules or API to learn
C# LanguageC# Language
 Type safe and Object Oriented LanguageType safe and Object Oriented Language
 Mixture betweenMixture between C++, Java and DelphiC++, Java and Delphi
 Component-orientedComponent-oriented
 Properties, Methods, EventsProperties, Methods, Events
 Attributes, XML documentationAttributes, XML documentation
 All in one place, no header files, IDL, etc.All in one place, no header files, IDL, etc.
 Can be embedded in ASP+ pagesCan be embedded in ASP+ pages
 Everything really is an objectEverything really is an object
 Primitive types aren’t magicPrimitive types aren’t magic
 Unified type system == Deep simplicityUnified type system == Deep simplicity
 Improved extensibility and reusabilityImproved extensibility and reusability
C# Language – ExampleC# Language – Example
using System;using System;
class HelloWorldclass HelloWorld
{{
public static void main()public static void main()
{{
Console.WriteLine(“Hello, world!”);Console.WriteLine(“Hello, world!”);
}}
}}
Code Compilation and ExecutionCode Compilation and Execution
CompilationCompilation
BeforeBefore
installation orinstallation or
the first timethe first time
each method iseach method is
calledcalled
ExecutionExecution
JITJIT
CompilerCompiler
NativeNative
CodeCode
MSILMSIL
CodeCode
MetadataMetadata
SourceSource
CodeCode
LanguageLanguage
CompilerCompiler
Also calledAlso called
AssemblyAssembly
(.EXE or(.EXE or
.DLL file).DLL file)
C# Working PrincipalC# Working Principal
AssembliesAssemblies
 DLL or EXE fileDLL or EXE file
 Smallest deployable unit in the CLRSmallest deployable unit in the CLR
 HaveHave unique version numberunique version number
 No version conflicts (known as DLL hell)No version conflicts (known as DLL hell)
 Contains IL code to be executedContains IL code to be executed
 Security boundarySecurity boundary – permissions are granted– permissions are granted
at the assembly levelat the assembly level
 Type boundaryType boundary – all types include the– all types include the
assembly name.assembly name.
 Self-describing manifestSelf-describing manifest – metadata that– metadata that
describes the types in the assemblydescribes the types in the assembly
Metadata in AssemblyMetadata in Assembly
Type DescriptionsType Descriptions
ClassesClasses
Base classesBase classes
Implemented interfacesImplemented interfaces
Data membersData members
MethodsMethods
ClassesClasses
Base classesBase classes
Implemented interfacesImplemented interfaces
Data membersData members
MethodsMethods
NameName
VersionVersion
CultureCulture
NameName
VersionVersion
CultureCulture
Assembly DescriptionAssembly Description
Other assembliesOther assemblies
Security PermissionsSecurity Permissions
Exported TypesExported Types
Other assembliesOther assemblies
Security PermissionsSecurity Permissions
Exported TypesExported Types
ApplicationsApplications
 One or more assembliesOne or more assemblies
 Assemblies conflict resolutionAssemblies conflict resolution
 Using metadataUsing metadata
 Local (preferred)Local (preferred)
 Global Assembly Cache (GAC)Global Assembly Cache (GAC)
 Different applications may useDifferent applications may use
different versions of an assemblydifferent versions of an assembly
 Easier software updatesEasier software updates
 Easier software removalEasier software removal
Visual Studio .NETVisual Studio .NET
 Development tool that contains a rich set ofDevelopment tool that contains a rich set of
productivity and debugging featuresproductivity and debugging features
 Supports managed and unmanagedSupports managed and unmanaged
applicationsapplications
 Supports C#, C++, VB.NET, …Supports C#, C++, VB.NET, …
 Many useful tools and wizardsMany useful tools and wizards
 Windows Forms DesignerWindows Forms Designer
 ASP.NET Web Forms DesignerASP.NET Web Forms Designer
 Web Services supportWeb Services support
 SQL Server integration with ADO.NET andSQL Server integration with ADO.NET and
XMLXML
VS.NET – Single DevelopmentVS.NET – Single Development
Environment & Skill SetEnvironment & Skill Set
 From Visual Studio.NET you can:From Visual Studio.NET you can:
 Write codeWrite code
 Design user interfaceDesign user interface
 Study documentationStudy documentation
 DebugDebug
 TestTest
 DeployDeploy
 Same tools for all languagesSame tools for all languages
 Same tools for all platformsSame tools for all platforms
.NET VERSION.NET VERSION
CLR ARCHITECTURECLR ARCHITECTURE
Visual Studio .NETVisual Studio .NET
The .NET Framework LibraryThe .NET Framework Library
Base Class LibraryBase Class Library
ADO.NET and XMLADO.NET and XML
Web Forms Web ServicesWeb Forms Web Services
Mobile Internet ToolkitMobile Internet Toolkit
WindowsWindows
FormsForms
ASP.NETASP.NET
SystemSystem
GlobalizationGlobalization
DiagnosticsDiagnostics
ConfigurationConfiguration
CollectionsCollections
ResourcesResources
ReflectionReflection
NetNet
IOIO
ThreadingThreading
TextText
ServiceProcessServiceProcess
SecuritySecurity RuntimeRuntime
InteropServicesInteropServices
RemotingRemoting
SerializationSerialization
System.DataSystem.Data
DesignDesign
ADOADO
SQLTypesSQLTypes
SQLSQL
System.XmlSystem.Xml
XPathXPath
XSLTXSLT SerializationSerialization
System.WebSystem.Web
ConfigurationConfiguration SessionStateSessionState
CachingCaching SecuritySecurity
ServicesServices UIUI
HtmlControlsHtmlControls
WebControlsWebControls
DescriptionDescription
DiscoveryDiscovery
ProtocolsProtocols System.DrawingSystem.Drawing
ImagingImaging
Drawing2DDrawing2D
TextText
PrintingPrinting
System.WinFormsSystem.WinForms
DesignDesign ComponentModelComponentModel
.NET Framework Namespaces.NET Framework Namespaces
Base Class Library NamespacesBase Class Library Namespaces
SystemSystem
ThreadingThreading
TextText
ServiceProcessServiceProcess
SecuritySecurity
ResourcesResources
ReflectionReflection
NetNet
IOIO
GlobalizationGlobalization
DiagnosticsDiagnostics
ConfigurationConfiguration
CollectionsCollections
RuntimeRuntime
SerializationSerialization
RemotingRemoting
InteropServicesInteropServices
Base Class LibraryBase Class Library
 Data typesData types, conversions, formatting, conversions, formatting
 CollectionsCollections:: ArrayList, HashtableArrayList, Hashtable, etc., etc.
 GlobalizationGlobalization: Cultures, sorting, etc.: Cultures, sorting, etc.
 I/OI/O: Binary and text streams, files, etc.: Binary and text streams, files, etc.
 NetworkingNetworking: HTTP, TCP/IP sockets, etc.: HTTP, TCP/IP sockets, etc.
 ReflectionReflection: Metadata and IL emit: Metadata and IL emit
 SecuritySecurity: Permissions, cryptography: Permissions, cryptography
 Text:Text: Encodings, regular expressionsEncodings, regular expressions
Data And XML NamespacesData And XML Namespaces
System.DataSystem.Data
SQLTypesSQLTypes
SQLClientSQLClient
CommonCommon
OleDbOleDb
System.XmlSystem.Xml
SerializationSerialization
XPathXPath
XSLTXSLT
ADO.NET And XMLADO.NET And XML
 ADO.NET consumesADO.NET consumes all types of dataall types of data
 XML (hierarchical), relational, etc.XML (hierarchical), relational, etc.
 Powerful in-memory data cache (DataSet)Powerful in-memory data cache (DataSet)
 DataSet contains various data objects:DataSet contains various data objects:
tables, views, relations, constraints, etc.tables, views, relations, constraints, etc.
 Lightweight, stateless, disconnectedLightweight, stateless, disconnected
 Supports both relational and XML accessSupports both relational and XML access
 High-performance, low overhead streamHigh-performance, low overhead stream
accessaccess
 Great XML support including:Great XML support including:
 W3C DOM, XSL/T, XPath, and SchemaW3C DOM, XSL/T, XPath, and Schema
VS.NET – DataSet DesignerVS.NET – DataSet Designer
Windows Forms NamespacesWindows Forms Namespaces
System.DrawingSystem.Drawing
Drawing2DDrawing2D
ImagingImaging
PrintingPrinting
TextText
System.Windows.FormsSystem.Windows.Forms
DesignDesign ComponentModelComponentModel
Windows FormsWindows Forms
 Windows Forms is framework for
building rich GUI applications
 RAD (Rapid Application Development)
 component-based
 event-driven
 Rich set of controls
 Data aware components
 ActiveX® Support
 Printing support
 Unicode support
 UI inheritance
Windows FormsWindows Forms
 CombinesCombines VB and Delphi formsVB and Delphi forms with thewith the
power of MFCpower of MFC
 Delegation as well as subclassingDelegation as well as subclassing
 Advanced featuresAdvanced features
 Visual forms inheritance, automatic layoutVisual forms inheritance, automatic layout
 Advanced graphics support – GDI+Advanced graphics support – GDI+
 Easy access toEasy access to Win32Win32®®
APIAPI
 Controls can be hosted in IE 5.xControls can be hosted in IE 5.x
 No installation, registration orNo installation, registration or GUIDsGUIDs
 Code access securityCode access security
VS.NET – Windows FormsVS.NET – Windows Forms
DesignerDesigner
DemoDemo
 Create simple databaseCreate simple database
application with:application with:
 Windows FormsWindows Forms
 ADO.NETADO.NET
 MS SQL ServerMS SQL Server
 Visual Studio .NETVisual Studio .NET
ASP.NET NamespacesASP.NET Namespaces
System.WebSystem.Web
CachingCaching
ConfigurationConfiguration
ServicesServices UIUI
SessionStateSessionState
HtmlControlsHtmlControls
WebControlsWebControls
DescriptionDescription
DiscoveryDiscovery
SecuritySecurity
ProtocolsProtocols
Framework for building Web applicationsFramework for building Web applications
and Web services in any .NET languageand Web services in any .NET language
 C#, C++, VB.NET,C#, C++, VB.NET, JScriptJScript, etc., etc.
Automatic multiple clients supportAutomatic multiple clients support
 DHTML, HTML 3.2, WML, small devicesDHTML, HTML 3.2, WML, small devices
Compilation of ASP.NET Web applicationsCompilation of ASP.NET Web applications
into .NET assembliesinto .NET assemblies
 Cached the first time when calledCached the first time when called
 All subsequent calls use the cached versionAll subsequent calls use the cached version
Separation of code and contentSeparation of code and content
 Developers and designers can work independentlyDevelopers and designers can work independently
ASP.NETASP.NET
ASP.NETASP.NET
 Rich page architecture – “Web Forms”Rich page architecture – “Web Forms”
 Rich set of ASP.NET server controlsRich set of ASP.NET server controls
 Data validationData validation
 Data bound gridsData bound grids
 Event-driven execution modelEvent-driven execution model
 Great Web-services supportGreat Web-services support
 Easy to deployEasy to deploy
 High reliability and availabilityHigh reliability and availability
 High performance and scalabilityHigh performance and scalability
 Scalable handling of state informationScalable handling of state information
VS.NET – Web Forms DesignerVS.NET – Web Forms Designer
DemoDemo
 Create simple Web-basedCreate simple Web-based
database application with:database application with:
 ASP.NET (Web Forms)ASP.NET (Web Forms)
 ADO.NETADO.NET
 MS SQL ServerMS SQL Server
 Visual Studio .NETVisual Studio .NET
Web ServicesWeb Services
 Technical definitionTechnical definition – “A programmable– “A programmable
application component accessible viaapplication component accessible via
standard Web protocols”standard Web protocols”
 Built on XML and SOAPBuilt on XML and SOAP
 Expose functionality from Web SitesExpose functionality from Web Sites
 Almost like component programming overAlmost like component programming over
the Webthe Web
 Functionality exposed using XML/HTMLFunctionality exposed using XML/HTML
 Standard Web Services includeStandard Web Services include
 CalendarCalendar
 MSN PassportMSN Passport
XML Web Services FoundationXML Web Services Foundation
Ubiquitous Communications: InternetUbiquitous Communications: Internet
Universal Data Format:Universal Data Format: XMLXML
Service Interactions:Service Interactions: SOAPSOAP
Publish, Find, Use Services:Publish, Find, Use Services: UDDIUDDI
 Simple, Open, Broad Industry SupportSimple, Open, Broad Industry Support
 Open standards:Open standards:
ASP.NET Web ServicesASP.NET Web Services
 Simple programming modelSimple programming model
 AuthorAuthor .ASMX files.ASMX files with class methodswith class methods
 ASP.NET compiles on demand, generatesASP.NET compiles on demand, generates
WSDL contract, exposes HTML test pageWSDL contract, exposes HTML test page
 IncomingIncoming HTTP/SOAP messagesHTTP/SOAP messages invokeinvoke
methodsmethods
 No special HTTP, SOAP or XML knowledgeNo special HTTP, SOAP or XML knowledge
requiredrequired
 Supports multiple message wire formatsSupports multiple message wire formats
 HTTP GET, POST, and SOAP RequestsHTTP GET, POST, and SOAP Requests
Web Service Example in C#Web Service Example in C#
ParcelTracker.asmxParcelTracker.asmx
<%@ WebService Language="C#" %><%@ WebService Language="C#" %>
using System;using System;
using System.Web.Services;using System.Web.Services;
public class ParcelTrackerWebServicepublic class ParcelTrackerWebService
{{
[WebMethod][WebMethod]
public string GetOrderStatus(int orderNumber)public string GetOrderStatus(int orderNumber)
{{
//// Implementation hereImplementation here
}}
}}
<%@ WebService Language="C#" %><%@ WebService Language="C#" %>
using System;using System;
using System.Web.Services;using System.Web.Services;
public class ParcelTrackerWebServicepublic class ParcelTrackerWebService
{{
[WebMethod][WebMethod]
public string GetOrderStatus(int orderNumber)public string GetOrderStatus(int orderNumber)
{{
//// Implementation hereImplementation here
}}
}}
.NET Framework on Linux.NET Framework on Linux
 Mono ProjectMono Project
 Open Source C# compiler, CLR and FrameworkOpen Source C# compiler, CLR and Framework
Class LibraryClass Library
 Runs on various platforms and hardware:Runs on various platforms and hardware:
 Linux, Unix, FreeBSD, Windows – JIT-Linux, Unix, FreeBSD, Windows – JIT-
compiler for x86compiler for x86
 s390, SPARCs390, SPARC,, PowerPCPowerPC – interpreter for these– interpreter for these
hardware architectureshardware architectures
 Supports also:Supports also:
 ADO.NET and XMLADO.NET and XML
 Windows Forms (not fully)Windows Forms (not fully)
 ASP.NETASP.NET
 Web ServicesWeb Services
.NET Framework on Linux (2).NET Framework on Linux (2)
 Mono ProjectMono Project
 Runs .NET portable executables on Linux, e.g.Runs .NET portable executables on Linux, e.g.
mono myapp.exemono myapp.exe
 Compiles .NET applications to portableCompiles .NET applications to portable
executables, e.g.executables, e.g.
mcs myapp.csmcs myapp.cs
 The obtained .exe file can taken and run onThe obtained .exe file can taken and run on
WindowsWindows
 DotGNU Portable.NETDotGNU Portable.NET
 Build and execute .NET applications onBuild and execute .NET applications on
GNU/LinuxGNU/Linux,, Windows, Solaris, NetBSD, FreeBSD,Windows, Solaris, NetBSD, FreeBSD,
and MacOS Xand MacOS X
SummarySummary
 .NET Framework is a code execution platform.NET Framework is a code execution platform
– the environment which .NET programs run– the environment which .NET programs run
 .NET Framework consists of two primary.NET Framework consists of two primary
parts: Common Language Runtime and .NETparts: Common Language Runtime and .NET
Class LibrariesClass Libraries
 The CLS (Common Language Specification)The CLS (Common Language Specification)
allows different languages to interactallows different languages to interact
seamlessly.seamlessly.
 The CTS (Common Type System) allows allThe CTS (Common Type System) allows all
languages to share base data types.languages to share base data types.
Summary (2)Summary (2)
 .NET languages are compiled to MSIL by.NET languages are compiled to MSIL by
their respective compilerstheir respective compilers
 MSIL code is compiled to machine code byMSIL code is compiled to machine code by
the JIT compilerthe JIT compiler
 All .NET languages have equal access to theAll .NET languages have equal access to the
FCL (Framework Class Library) which is aFCL (Framework Class Library) which is a
rich set of classes for developing softwarerich set of classes for developing software
 Base Class Library is set of basic classes:Base Class Library is set of basic classes:
Collections, I/O, Networking, Security, etc.Collections, I/O, Networking, Security, etc.
 ADO.NET provides .NET applications withADO.NET provides .NET applications with
access to relational databasesaccess to relational databases
Summary (3)Summary (3)
 .NET has great XML support including: DOM,.NET has great XML support including: DOM,
XSLT,XSLT, XPathXPath, and, and XSchemaXSchema
 Windows Forms provides GUI interface forWindows Forms provides GUI interface for
the .NET applicationsthe .NET applications
 ASP.NET allows creating web interface toASP.NET allows creating web interface to
.NET applications.NET applications
 Web Services expose functionality from webWeb Services expose functionality from web
sites and make it remotely accessiblesites and make it remotely accessible
through standard XML-based protocolsthrough standard XML-based protocols
 Visual Studio .NET is powerful developmentVisual Studio .NET is powerful development
IDE for all .NET languages and technologiesIDE for all .NET languages and technologies
.NET Framework – Resources.NET Framework – Resources
 Visit following web sites:Visit following web sites:
 ..NET Framework Home Site –NET Framework Home Site –
http://msdn.microsoft.com/netframework/http://msdn.microsoft.com/netframework/
 The Microsoft .NET Framework Community –The Microsoft .NET Framework Community –
http://www.gotdotnet.com/http://www.gotdotnet.com/
 ASP.NET –ASP.NET – http://www.asp.net/http://www.asp.net/
 .NET Windows Forms –.NET Windows Forms –
http://www.windowsforms.net/http://www.windowsforms.net/
 Code Project – http://www.codeproject.net/Code Project – http://www.codeproject.net/
 Mono – Open Source .NET Framework –Mono – Open Source .NET Framework –
http://www.go-mono.org/http://www.go-mono.org/
 Rotor – Shared Source .NET CLI –Rotor – Shared Source .NET CLI –
http://msdn.microsoft.com/net/sscli/http://msdn.microsoft.com/net/sscli/
 Read the news groups:Read the news groups:
 news://news://msnews.microsoft.commsnews.microsoft.com//microsoft.public.microsoft.public.
dotnet.frameworkdotnet.framework
Questions?Questions?

More Related Content

PPT
Net Framework Overview
PPSX
Introductionto .netframework by Priyanka Pinglikar
PPT
.NET Framework Overview
PPTX
Net serialization
PPT
DotNet Introduction
PPT
Net framework
PPTX
Introduction to .net FrameWork by QuontraSolutions
PPT
Microsoft .NET Framework
Net Framework Overview
Introductionto .netframework by Priyanka Pinglikar
.NET Framework Overview
Net serialization
DotNet Introduction
Net framework
Introduction to .net FrameWork by QuontraSolutions
Microsoft .NET Framework

What's hot (20)

PPTX
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
PPT
Introduction to ,NET Framework
PPTX
.Net Framework Introduction
PPTX
Introduction to .NET by QuontraSolutions
PPT
Introduction to .NET
PPT
Nakov - .NET Framework Overview - English
PDF
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
PPT
Introduction .NET Framework
PPTX
Microsoft dot net framework
PPT
Introduction to .net
PPTX
.Net framework
PPSX
Introduction to .net framework
PPTX
Net Fundamentals
PPT
.Net overview|Introduction Of .net
PPTX
dot net technology
PDF
2.Getting Started with C#.Net-(C#)
PPT
DOT Net overview
PDF
1..Net Framework Architecture-(c#)
PPT
Migrating To Visual Studio 2008 & .Net Framework 3.5
PPT
ASP.NET 01 - Introduction
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
Introduction to ,NET Framework
.Net Framework Introduction
Introduction to .NET by QuontraSolutions
Introduction to .NET
Nakov - .NET Framework Overview - English
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
Introduction .NET Framework
Microsoft dot net framework
Introduction to .net
.Net framework
Introduction to .net framework
Net Fundamentals
.Net overview|Introduction Of .net
dot net technology
2.Getting Started with C#.Net-(C#)
DOT Net overview
1..Net Framework Architecture-(c#)
Migrating To Visual Studio 2008 & .Net Framework 3.5
ASP.NET 01 - Introduction
Ad

Similar to Nakov dot net-framework-overview-english (20)

PPTX
.Net Framework
PPTX
Synapse india sharing info on dotnet framework part2
PPTX
Presentation1
PPT
Visula C# Programming Lecture 1
PPT
.NET Overview
PPT
.Netframework
PPT
Microsoft .NET (dotnet) Framework 2003 - 2004 overview and web services…
PPT
Best DotNet Training in Delhi
PPT
Synapse india reviews sharing asp.net
PPT
Modified.net overview
PPT
Introduction To Dotnet
PDF
Lecture - The .Net Technology and Framework
PPTX
Session2 (3)
PPT
.Net overview
PPTX
Introduction to dot net framework
PPT
Microsoft.Net
PPT
Introduction to .NET Framework
DOCX
Chapter 1 introduction to .net
PPT
Introduction to .NET Framework
PPT
C# wrokig based topics for students in advanced programming
.Net Framework
Synapse india sharing info on dotnet framework part2
Presentation1
Visula C# Programming Lecture 1
.NET Overview
.Netframework
Microsoft .NET (dotnet) Framework 2003 - 2004 overview and web services…
Best DotNet Training in Delhi
Synapse india reviews sharing asp.net
Modified.net overview
Introduction To Dotnet
Lecture - The .Net Technology and Framework
Session2 (3)
.Net overview
Introduction to dot net framework
Microsoft.Net
Introduction to .NET Framework
Chapter 1 introduction to .net
Introduction to .NET Framework
C# wrokig based topics for students in advanced programming
Ad

Recently uploaded (20)

PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Modernizing your data center with Dell and AMD
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
A Presentation on Artificial Intelligence
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
Encapsulation_ Review paper, used for researhc scholars
Unlocking AI with Model Context Protocol (MCP)
Chapter 3 Spatial Domain Image Processing.pdf
Machine learning based COVID-19 study performance prediction
MYSQL Presentation for SQL database connectivity
Modernizing your data center with Dell and AMD
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Empathic Computing: Creating Shared Understanding
The Rise and Fall of 3GPP – Time for a Sabbatical?
The AUB Centre for AI in Media Proposal.docx
Per capita expenditure prediction using model stacking based on satellite ima...
Reach Out and Touch Someone: Haptics and Empathic Computing
“AI and Expert System Decision Support & Business Intelligence Systems”
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
A Presentation on Artificial Intelligence
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Spectral efficient network and resource selection model in 5G networks
Mobile App Security Testing_ A Comprehensive Guide.pdf
20250228 LYD VKU AI Blended-Learning.pptx

Nakov dot net-framework-overview-english

  • 2. .NET Enterprise Vision ERP & Billing Customer Service Sales Users Any device, Any place, Any time XML Web Services Integrate business applications and processes Back Office Heterogeneous application and server infrastructure Scheduling Authentication Notification
  • 3. So what is .NET?  .NET is a platform that provides a.NET is a platform that provides a standardizedstandardized set of servicesset of services..  It’s just like Windows, exceptIt’s just like Windows, except distributed over the Internetdistributed over the Internet..  It exports a common interface so thatIt exports a common interface so that it’s programs can be run on anyit’s programs can be run on any systemsystem that supports .NET.that supports .NET.  A specific software frameworkA specific software framework  Includes aIncludes a common runtimecommon runtime
  • 4. .NET Framework.NET Framework  Programming model for .NETProgramming model for .NET  Platform for runningPlatform for running .NET managed code.NET managed code in a virtual machine.in a virtual machine.  ProvidesProvides a very good environment toa very good environment to develop networked applications and Webdevelop networked applications and Web ServicesServices  Provides programming API and unifiedProvides programming API and unified language-independentlanguage-independent developmentdevelopment frameworkframework
  • 5. The Core of .NETThe Core of .NET Framework:Framework: FCL & CLRFCL & CLR  Common Language RuntimeCommon Language Runtime  Garbage collectionGarbage collection  Language integrationLanguage integration  Multiple versioning supportMultiple versioning support (no more DLL hell!)(no more DLL hell!)  Integrated securityIntegrated security  Framework Class LibraryFramework Class Library  Provides the core functionality:Provides the core functionality: ASP.NET, Web Services, ADO.NET,ASP.NET, Web Services, ADO.NET, Windows Forms, IO, XML,Windows Forms, IO, XML, etc.etc.
  • 6. .NET Framework.NET Framework Common Language RuntimeCommon Language Runtime Operating SystemOperating System Common Language RuntimeCommon Language Runtime  CLR manages codeCLR manages code executionexecution at runtimeat runtime  Memory management, threadMemory management, thread management, etc.management, etc.
  • 7. .NET Framework.NET Framework Base Class LibraryBase Class Library Operating SystemOperating System Common Language RuntimeCommon Language Runtime .NET Framework (Base Class Library).NET Framework (Base Class Library)  Object-oriented collection ofObject-oriented collection of reusable typesreusable types  Collections, I/O, Strings, …Collections, I/O, Strings, …
  • 8. .NET Framework.NET Framework Data Access LayerData 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 databasesAccess relational databases  Disconnected data modelDisconnected data model  Work with XMLWork with XML
  • 9. .NET Framework.NET Framework ASP.NET & Windows FormsASP.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 .NET Web Forms Web ServicesWeb Forms Web Services Mobile Internet ToolkitMobile Internet Toolkit WindowsWindows FormsForms  Create application’s front-end –Create application’s front-end – Web-based user interface,Web-based user interface, Windows GUI, Web services, …Windows GUI, Web services, …
  • 10. .NET Framework.NET Framework Programming LanguagesProgramming Languages 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 .NET Web Forms Web ServicesWeb Forms Web Services Mobile Internet ToolkitMobile Internet Toolkit WindowsWindows FormsForms C++C++ C#C# VB.NETVB.NET PerlPerl J#J# ……  Use your favorite languageUse your favorite language
  • 11. .NET Framework.NET Framework Common Language SpecificationCommon 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 .NET Web 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# ……
  • 12. .NET Framework.NET Framework Visual Studio .NETVisual 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 .NET Web 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# …… VisualStudio.NETVisualStudio.NET
  • 13. 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 .NET Web Services Web FormsWeb Services Web Forms Mobile Internet ToolkitMobile Internet Toolkit WindowsWindows FormsForms Common Language SpecificationCommon Language Specification C++C++ C#C# VBVB PerlPerl J#J# …… VisualStudio.NETVisualStudio.NET Open LanguageOpen Language SpecificationSpecification C# Language –C# Language – Submitted to ECMASubmitted to ECMA XML-basedXML-based data accessdata access Web services –Web services – XML, SOAP-basedXML, SOAP-based .NET Framework.NET Framework Standards ComplianceStandards Compliance
  • 14. Common Language RuntimeCommon Language Runtime  ManagesManages running coderunning code – like a virtual– like a virtual machinemachine  ThreadingThreading  Memory managementMemory management  No interpreter:No interpreter: JIT-compiler producesJIT-compiler produces native codenative code – during the program– during the program installation or at run timeinstallation or at run time  Fine-grained evidence-basedFine-grained evidence-based securitysecurity  Code access securityCode access security  Code can be verifiedCode can be verified to guarantee type safetyto guarantee type safety  No unsafe casts, no un-initialized variablesNo unsafe casts, no un-initialized variables and no out-of-bounds array indexingand no out-of-bounds array indexing  Role-based securityRole-based security
  • 15. CLR Execution ModelCLR Execution Model
  • 16. Managed CodeManaged Code  Code that targets the CLR is referred toCode that targets the CLR is referred to asas managed codemanaged code  All managed code has the features ofAll managed code has the features of the CLRthe CLR  Object-orientedObject-oriented  Type-safeType-safe  Cross-language integrationCross-language integration  Cross language exception handlingCross language exception handling  Multiple version supportMultiple version support  Managed code is represented in specialManaged code is represented in special Intermediate Language (IL)Intermediate Language (IL)
  • 17. Automatic Memory ManagementAutomatic Memory Management  The CLR manages memory for managed codeThe CLR manages memory for managed code  All allocations of objects and buffers made fromAll allocations of objects and buffers made from aa Managed HeapManaged Heap  Unused objectsUnused objects and buffers are cleaned upand buffers are cleaned up automatically throughautomatically through Garbage CollectionGarbage Collection  Some of the worst bugs in softwareSome of the worst bugs in software developmentdevelopment are not possibleare not possible with managedwith managed codecode  Leaked memory or objectsLeaked memory or objects  References to freed or non-existent objectsReferences to freed or non-existent objects  Reading ofReading of uninitialised variablesuninitialised variables  PointerlessPointerless environmentenvironment
  • 18. Multiple Language SupportMultiple Language Support  IL (MSIL or CIL) – Intermediate LanguageIL (MSIL or CIL) – Intermediate Language  It is low-level (machine) language, likeIt is low-level (machine) language, like Assembler, but is Object-orientedAssembler, but is Object-oriented  CTS is aCTS is a rich type system built into the CLRrich type system built into the CLR  Implements various types (Implements various types (intint, float, string, …), float, string, …)  And operations on those typesAnd operations on those types  CLS is a set of specifications that allCLS is a set of specifications that all languages and libraries need to followlanguages and libraries need to follow  This will ensureThis will ensure interoperability betweeninteroperability between languageslanguages
  • 19. Example of MSIL CodeExample of MSIL Code .method private hidebysig static void Main().method private hidebysig static void Main() cil managedcil managed {{ .entrypoint.entrypoint // Code size 11 (0xb)// Code size 11 (0xb) .maxstack 8.maxstack 8 IL_0000: ldstr "Hello, world!"IL_0000: ldstr "Hello, world!" IL_0005: call voidIL_0005: call void [mscorlib]System.Console::WriteLine(string)[mscorlib]System.Console::WriteLine(string) IL_000a: retIL_000a: ret } // end of method HelloWorld::Main} // end of method HelloWorld::Main
  • 20. Common Type System (CTS)Common Type System (CTS)  All .NET languages have the same primitiveAll .NET languages have the same primitive data types. Andata types. An intint in C# is the same as anin C# is the same as an intint in VB.NETin VB.NET  When communicating between modulesWhen communicating between modules written inwritten in any .NET languageany .NET language, the types are, the types are guaranteed to be compatible on the binaryguaranteed to be compatible on the binary levellevel  Types can be:Types can be:  Value types – passed by value, stored in theValue types – passed by value, stored in the stackstack  Reference types – passed by reference, storedReference types – passed by reference, stored in the heapin the heap
  • 21. Common LanguageCommon Language Specification (CLS)Specification (CLS)  Any language that conforms to the CLSAny language that conforms to the CLS is a .NET languageis a .NET language  A language that conforms to theA language that conforms to the CLSCLS has the ability to take full advantage ofhas the ability to take full advantage of the Framework Class Library (FCLthe Framework Class Library (FCL))
  • 22. .NET Languages.NET Languages  Languages provided by MicrosoftLanguages provided by Microsoft  C++, C#, J#, VB.NET,C++, C#, J#, VB.NET, JScriptJScript  Third-parties languagesThird-parties languages  Perl, Python, Pascal, APL, COBOL, Eiffel,Perl, Python, Pascal, APL, COBOL, Eiffel, Haskell, ML, Oberon, Scheme, SmalltalkHaskell, ML, Oberon, Scheme, Smalltalk……  Advanced multi-language featuresAdvanced multi-language features  Cross-language inheritance and exceptionsCross-language inheritance and exceptions handlinghandling  Object system is built in, not bolted onObject system is built in, not bolted on  No additional rules or API to learnNo additional rules or API to learn
  • 23. C# LanguageC# Language  Type safe and Object Oriented LanguageType safe and Object Oriented Language  Mixture betweenMixture between C++, Java and DelphiC++, Java and Delphi  Component-orientedComponent-oriented  Properties, Methods, EventsProperties, Methods, Events  Attributes, XML documentationAttributes, XML documentation  All in one place, no header files, IDL, etc.All in one place, no header files, IDL, etc.  Can be embedded in ASP+ pagesCan be embedded in ASP+ pages  Everything really is an objectEverything really is an object  Primitive types aren’t magicPrimitive types aren’t magic  Unified type system == Deep simplicityUnified type system == Deep simplicity  Improved extensibility and reusabilityImproved extensibility and reusability
  • 24. C# Language – ExampleC# Language – Example using System;using System; class HelloWorldclass HelloWorld {{ public static void main()public static void main() {{ Console.WriteLine(“Hello, world!”);Console.WriteLine(“Hello, world!”); }} }}
  • 25. Code Compilation and ExecutionCode Compilation and Execution CompilationCompilation BeforeBefore installation orinstallation or the first timethe first time each method iseach method is calledcalled ExecutionExecution JITJIT CompilerCompiler NativeNative CodeCode MSILMSIL CodeCode MetadataMetadata SourceSource CodeCode LanguageLanguage CompilerCompiler Also calledAlso called AssemblyAssembly (.EXE or(.EXE or .DLL file).DLL file)
  • 26. C# Working PrincipalC# Working Principal
  • 27. AssembliesAssemblies  DLL or EXE fileDLL or EXE file  Smallest deployable unit in the CLRSmallest deployable unit in the CLR  HaveHave unique version numberunique version number  No version conflicts (known as DLL hell)No version conflicts (known as DLL hell)  Contains IL code to be executedContains IL code to be executed  Security boundarySecurity boundary – permissions are granted– permissions are granted at the assembly levelat the assembly level  Type boundaryType boundary – all types include the– all types include the assembly name.assembly name.  Self-describing manifestSelf-describing manifest – metadata that– metadata that describes the types in the assemblydescribes the types in the assembly
  • 28. Metadata in AssemblyMetadata in Assembly Type DescriptionsType Descriptions ClassesClasses Base classesBase classes Implemented interfacesImplemented interfaces Data membersData members MethodsMethods ClassesClasses Base classesBase classes Implemented interfacesImplemented interfaces Data membersData members MethodsMethods NameName VersionVersion CultureCulture NameName VersionVersion CultureCulture Assembly DescriptionAssembly Description Other assembliesOther assemblies Security PermissionsSecurity Permissions Exported TypesExported Types Other assembliesOther assemblies Security PermissionsSecurity Permissions Exported TypesExported Types
  • 29. ApplicationsApplications  One or more assembliesOne or more assemblies  Assemblies conflict resolutionAssemblies conflict resolution  Using metadataUsing metadata  Local (preferred)Local (preferred)  Global Assembly Cache (GAC)Global Assembly Cache (GAC)  Different applications may useDifferent applications may use different versions of an assemblydifferent versions of an assembly  Easier software updatesEasier software updates  Easier software removalEasier software removal
  • 30. Visual Studio .NETVisual Studio .NET  Development tool that contains a rich set ofDevelopment tool that contains a rich set of productivity and debugging featuresproductivity and debugging features  Supports managed and unmanagedSupports managed and unmanaged applicationsapplications  Supports C#, C++, VB.NET, …Supports C#, C++, VB.NET, …  Many useful tools and wizardsMany useful tools and wizards  Windows Forms DesignerWindows Forms Designer  ASP.NET Web Forms DesignerASP.NET Web Forms Designer  Web Services supportWeb Services support  SQL Server integration with ADO.NET andSQL Server integration with ADO.NET and XMLXML
  • 31. VS.NET – Single DevelopmentVS.NET – Single Development Environment & Skill SetEnvironment & Skill Set  From Visual Studio.NET you can:From Visual Studio.NET you can:  Write codeWrite code  Design user interfaceDesign user interface  Study documentationStudy documentation  DebugDebug  TestTest  DeployDeploy  Same tools for all languagesSame tools for all languages  Same tools for all platformsSame tools for all platforms
  • 35. The .NET Framework LibraryThe .NET Framework Library Base Class LibraryBase Class Library ADO.NET and XMLADO.NET and XML Web Forms Web ServicesWeb Forms Web Services Mobile Internet ToolkitMobile Internet Toolkit WindowsWindows FormsForms ASP.NETASP.NET
  • 36. SystemSystem GlobalizationGlobalization DiagnosticsDiagnostics ConfigurationConfiguration CollectionsCollections ResourcesResources ReflectionReflection NetNet IOIO ThreadingThreading TextText ServiceProcessServiceProcess SecuritySecurity RuntimeRuntime InteropServicesInteropServices RemotingRemoting SerializationSerialization System.DataSystem.Data DesignDesign ADOADO SQLTypesSQLTypes SQLSQL System.XmlSystem.Xml XPathXPath XSLTXSLT SerializationSerialization System.WebSystem.Web ConfigurationConfiguration SessionStateSessionState CachingCaching SecuritySecurity ServicesServices UIUI HtmlControlsHtmlControls WebControlsWebControls DescriptionDescription DiscoveryDiscovery ProtocolsProtocols System.DrawingSystem.Drawing ImagingImaging Drawing2DDrawing2D TextText PrintingPrinting System.WinFormsSystem.WinForms DesignDesign ComponentModelComponentModel .NET Framework Namespaces.NET Framework Namespaces
  • 37. Base Class Library NamespacesBase Class Library Namespaces SystemSystem ThreadingThreading TextText ServiceProcessServiceProcess SecuritySecurity ResourcesResources ReflectionReflection NetNet IOIO GlobalizationGlobalization DiagnosticsDiagnostics ConfigurationConfiguration CollectionsCollections RuntimeRuntime SerializationSerialization RemotingRemoting InteropServicesInteropServices
  • 38. Base Class LibraryBase Class Library  Data typesData types, conversions, formatting, conversions, formatting  CollectionsCollections:: ArrayList, HashtableArrayList, Hashtable, etc., etc.  GlobalizationGlobalization: Cultures, sorting, etc.: Cultures, sorting, etc.  I/OI/O: Binary and text streams, files, etc.: Binary and text streams, files, etc.  NetworkingNetworking: HTTP, TCP/IP sockets, etc.: HTTP, TCP/IP sockets, etc.  ReflectionReflection: Metadata and IL emit: Metadata and IL emit  SecuritySecurity: Permissions, cryptography: Permissions, cryptography  Text:Text: Encodings, regular expressionsEncodings, regular expressions
  • 39. Data And XML NamespacesData And XML Namespaces System.DataSystem.Data SQLTypesSQLTypes SQLClientSQLClient CommonCommon OleDbOleDb System.XmlSystem.Xml SerializationSerialization XPathXPath XSLTXSLT
  • 40. ADO.NET And XMLADO.NET And XML  ADO.NET consumesADO.NET consumes all types of dataall types of data  XML (hierarchical), relational, etc.XML (hierarchical), relational, etc.  Powerful in-memory data cache (DataSet)Powerful in-memory data cache (DataSet)  DataSet contains various data objects:DataSet contains various data objects: tables, views, relations, constraints, etc.tables, views, relations, constraints, etc.  Lightweight, stateless, disconnectedLightweight, stateless, disconnected  Supports both relational and XML accessSupports both relational and XML access  High-performance, low overhead streamHigh-performance, low overhead stream accessaccess  Great XML support including:Great XML support including:  W3C DOM, XSL/T, XPath, and SchemaW3C DOM, XSL/T, XPath, and Schema
  • 41. VS.NET – DataSet DesignerVS.NET – DataSet Designer
  • 42. Windows Forms NamespacesWindows Forms Namespaces System.DrawingSystem.Drawing Drawing2DDrawing2D ImagingImaging PrintingPrinting TextText System.Windows.FormsSystem.Windows.Forms DesignDesign ComponentModelComponentModel
  • 43. Windows FormsWindows Forms  Windows Forms is framework for building rich GUI applications  RAD (Rapid Application Development)  component-based  event-driven  Rich set of controls  Data aware components  ActiveX® Support  Printing support  Unicode support  UI inheritance
  • 44. Windows FormsWindows Forms  CombinesCombines VB and Delphi formsVB and Delphi forms with thewith the power of MFCpower of MFC  Delegation as well as subclassingDelegation as well as subclassing  Advanced featuresAdvanced features  Visual forms inheritance, automatic layoutVisual forms inheritance, automatic layout  Advanced graphics support – GDI+Advanced graphics support – GDI+  Easy access toEasy access to Win32Win32®® APIAPI  Controls can be hosted in IE 5.xControls can be hosted in IE 5.x  No installation, registration orNo installation, registration or GUIDsGUIDs  Code access securityCode access security
  • 45. VS.NET – Windows FormsVS.NET – Windows Forms DesignerDesigner
  • 46. DemoDemo  Create simple databaseCreate simple database application with:application with:  Windows FormsWindows Forms  ADO.NETADO.NET  MS SQL ServerMS SQL Server  Visual Studio .NETVisual Studio .NET
  • 47. ASP.NET NamespacesASP.NET Namespaces System.WebSystem.Web CachingCaching ConfigurationConfiguration ServicesServices UIUI SessionStateSessionState HtmlControlsHtmlControls WebControlsWebControls DescriptionDescription DiscoveryDiscovery SecuritySecurity ProtocolsProtocols
  • 48. Framework for building Web applicationsFramework for building Web applications and Web services in any .NET languageand Web services in any .NET language  C#, C++, VB.NET,C#, C++, VB.NET, JScriptJScript, etc., etc. Automatic multiple clients supportAutomatic multiple clients support  DHTML, HTML 3.2, WML, small devicesDHTML, HTML 3.2, WML, small devices Compilation of ASP.NET Web applicationsCompilation of ASP.NET Web applications into .NET assembliesinto .NET assemblies  Cached the first time when calledCached the first time when called  All subsequent calls use the cached versionAll subsequent calls use the cached version Separation of code and contentSeparation of code and content  Developers and designers can work independentlyDevelopers and designers can work independently ASP.NETASP.NET
  • 49. ASP.NETASP.NET  Rich page architecture – “Web Forms”Rich page architecture – “Web Forms”  Rich set of ASP.NET server controlsRich set of ASP.NET server controls  Data validationData validation  Data bound gridsData bound grids  Event-driven execution modelEvent-driven execution model  Great Web-services supportGreat Web-services support  Easy to deployEasy to deploy  High reliability and availabilityHigh reliability and availability  High performance and scalabilityHigh performance and scalability  Scalable handling of state informationScalable handling of state information
  • 50. VS.NET – Web Forms DesignerVS.NET – Web Forms Designer
  • 51. DemoDemo  Create simple Web-basedCreate simple Web-based database application with:database application with:  ASP.NET (Web Forms)ASP.NET (Web Forms)  ADO.NETADO.NET  MS SQL ServerMS SQL Server  Visual Studio .NETVisual Studio .NET
  • 52. Web ServicesWeb Services  Technical definitionTechnical definition – “A programmable– “A programmable application component accessible viaapplication component accessible via standard Web protocols”standard Web protocols”  Built on XML and SOAPBuilt on XML and SOAP  Expose functionality from Web SitesExpose functionality from Web Sites  Almost like component programming overAlmost like component programming over the Webthe Web  Functionality exposed using XML/HTMLFunctionality exposed using XML/HTML  Standard Web Services includeStandard Web Services include  CalendarCalendar  MSN PassportMSN Passport
  • 53. XML Web Services FoundationXML Web Services Foundation Ubiquitous Communications: InternetUbiquitous Communications: Internet Universal Data Format:Universal Data Format: XMLXML Service Interactions:Service Interactions: SOAPSOAP Publish, Find, Use Services:Publish, Find, Use Services: UDDIUDDI  Simple, Open, Broad Industry SupportSimple, Open, Broad Industry Support  Open standards:Open standards:
  • 54. ASP.NET Web ServicesASP.NET Web Services  Simple programming modelSimple programming model  AuthorAuthor .ASMX files.ASMX files with class methodswith class methods  ASP.NET compiles on demand, generatesASP.NET compiles on demand, generates WSDL contract, exposes HTML test pageWSDL contract, exposes HTML test page  IncomingIncoming HTTP/SOAP messagesHTTP/SOAP messages invokeinvoke methodsmethods  No special HTTP, SOAP or XML knowledgeNo special HTTP, SOAP or XML knowledge requiredrequired  Supports multiple message wire formatsSupports multiple message wire formats  HTTP GET, POST, and SOAP RequestsHTTP GET, POST, and SOAP Requests
  • 55. Web Service Example in C#Web Service Example in C# ParcelTracker.asmxParcelTracker.asmx <%@ WebService Language="C#" %><%@ WebService Language="C#" %> using System;using System; using System.Web.Services;using System.Web.Services; public class ParcelTrackerWebServicepublic class ParcelTrackerWebService {{ [WebMethod][WebMethod] public string GetOrderStatus(int orderNumber)public string GetOrderStatus(int orderNumber) {{ //// Implementation hereImplementation here }} }} <%@ WebService Language="C#" %><%@ WebService Language="C#" %> using System;using System; using System.Web.Services;using System.Web.Services; public class ParcelTrackerWebServicepublic class ParcelTrackerWebService {{ [WebMethod][WebMethod] public string GetOrderStatus(int orderNumber)public string GetOrderStatus(int orderNumber) {{ //// Implementation hereImplementation here }} }}
  • 56. .NET Framework on Linux.NET Framework on Linux  Mono ProjectMono Project  Open Source C# compiler, CLR and FrameworkOpen Source C# compiler, CLR and Framework Class LibraryClass Library  Runs on various platforms and hardware:Runs on various platforms and hardware:  Linux, Unix, FreeBSD, Windows – JIT-Linux, Unix, FreeBSD, Windows – JIT- compiler for x86compiler for x86  s390, SPARCs390, SPARC,, PowerPCPowerPC – interpreter for these– interpreter for these hardware architectureshardware architectures  Supports also:Supports also:  ADO.NET and XMLADO.NET and XML  Windows Forms (not fully)Windows Forms (not fully)  ASP.NETASP.NET  Web ServicesWeb Services
  • 57. .NET Framework on Linux (2).NET Framework on Linux (2)  Mono ProjectMono Project  Runs .NET portable executables on Linux, e.g.Runs .NET portable executables on Linux, e.g. mono myapp.exemono myapp.exe  Compiles .NET applications to portableCompiles .NET applications to portable executables, e.g.executables, e.g. mcs myapp.csmcs myapp.cs  The obtained .exe file can taken and run onThe obtained .exe file can taken and run on WindowsWindows  DotGNU Portable.NETDotGNU Portable.NET  Build and execute .NET applications onBuild and execute .NET applications on GNU/LinuxGNU/Linux,, Windows, Solaris, NetBSD, FreeBSD,Windows, Solaris, NetBSD, FreeBSD, and MacOS Xand MacOS X
  • 58. SummarySummary  .NET Framework is a code execution platform.NET Framework is a code execution platform – the environment which .NET programs run– the environment which .NET programs run  .NET Framework consists of two primary.NET Framework consists of two primary parts: Common Language Runtime and .NETparts: Common Language Runtime and .NET Class LibrariesClass Libraries  The CLS (Common Language Specification)The CLS (Common Language Specification) allows different languages to interactallows different languages to interact seamlessly.seamlessly.  The CTS (Common Type System) allows allThe CTS (Common Type System) allows all languages to share base data types.languages to share base data types.
  • 59. Summary (2)Summary (2)  .NET languages are compiled to MSIL by.NET languages are compiled to MSIL by their respective compilerstheir respective compilers  MSIL code is compiled to machine code byMSIL code is compiled to machine code by the JIT compilerthe JIT compiler  All .NET languages have equal access to theAll .NET languages have equal access to the FCL (Framework Class Library) which is aFCL (Framework Class Library) which is a rich set of classes for developing softwarerich set of classes for developing software  Base Class Library is set of basic classes:Base Class Library is set of basic classes: Collections, I/O, Networking, Security, etc.Collections, I/O, Networking, Security, etc.  ADO.NET provides .NET applications withADO.NET provides .NET applications with access to relational databasesaccess to relational databases
  • 60. Summary (3)Summary (3)  .NET has great XML support including: DOM,.NET has great XML support including: DOM, XSLT,XSLT, XPathXPath, and, and XSchemaXSchema  Windows Forms provides GUI interface forWindows Forms provides GUI interface for the .NET applicationsthe .NET applications  ASP.NET allows creating web interface toASP.NET allows creating web interface to .NET applications.NET applications  Web Services expose functionality from webWeb Services expose functionality from web sites and make it remotely accessiblesites and make it remotely accessible through standard XML-based protocolsthrough standard XML-based protocols  Visual Studio .NET is powerful developmentVisual Studio .NET is powerful development IDE for all .NET languages and technologiesIDE for all .NET languages and technologies
  • 61. .NET Framework – Resources.NET Framework – Resources  Visit following web sites:Visit following web sites:  ..NET Framework Home Site –NET Framework Home Site – http://msdn.microsoft.com/netframework/http://msdn.microsoft.com/netframework/  The Microsoft .NET Framework Community –The Microsoft .NET Framework Community – http://www.gotdotnet.com/http://www.gotdotnet.com/  ASP.NET –ASP.NET – http://www.asp.net/http://www.asp.net/  .NET Windows Forms –.NET Windows Forms – http://www.windowsforms.net/http://www.windowsforms.net/  Code Project – http://www.codeproject.net/Code Project – http://www.codeproject.net/  Mono – Open Source .NET Framework –Mono – Open Source .NET Framework – http://www.go-mono.org/http://www.go-mono.org/  Rotor – Shared Source .NET CLI –Rotor – Shared Source .NET CLI – http://msdn.microsoft.com/net/sscli/http://msdn.microsoft.com/net/sscli/  Read the news groups:Read the news groups:  news://news://msnews.microsoft.commsnews.microsoft.com//microsoft.public.microsoft.public. dotnet.frameworkdotnet.framework

Editor's Notes

  • #14: Inside the .NET Framework Standards Compliance Microsoft .NET is built on standards. Both the Common Language Infrastructure, CLI and Visual C# have been submitted to the ECMA for approval and adoption. The data and Web services are built on XML and SOAP. .Net Framework supports Web standards: HTML- Hyper-Text Markup Language XML - Extensible Markup Language, the universal format for structured documents and data on the Web. WSDL- Web Services Description Language (WSDL) SOAP - Simple Object Access Protocol, a simple, XML-based protocol for exchanging structured and type information on the Web. The protocol contains no application or transport semantics, which makes it highly modular and extensible. (SOAP currently still has no encryption support either) XPATH - XML Path Language XSLT - XSL Transformations (XSLT), is an XML-based language that enables you to transform one class of XML document to another.
  • #15: The Common Language Runtime Features The Common Language Runtime (CLR) is the execution engine for .NET Framework applications. It provides a number of services including: Code management (loading and execution) Application memory isolation Verification of type safety Conversion of IL to native code Access to metadata (enhanced type information) Managing memory for managed objects Enforcement of Code Access Security Exception handling including cross-language exceptions Interoperation between managed code, COM objects and pre-existing DLLs (unmanaged code and data) Automation of object layout Support for developer services (profiling, debugging, etc.) Native Code is code compiled to processor-specific machine code. Managed Code runs under a &amp;quot;contract of cooperation&amp;quot; with the CLR and it must supply the metadata necessary for the CLR to provide services such as memory management, cross-language integration, Code Access Security and automatic lifetime control of objects. All code based on Microsoft Intermediate Language (MSIL) executes as managed code. Microsoft Intermediate Language (MSIL) is used as the output of a number of compilers and as the input to a Just-In-Time (JIT) compiler. The CLR includes several JIT compilers for converting MSIL to native code.
  • #26: The Common Language Runtime Compilation and Execution The above diagram illustrates the process used to compile and execute managed code, or code that uses the CLR. Source code written in Visual C#, Visual Basic .NET or another language that targets the CLR is first transformed into MSIL by the appropriate language compiler. Before execution, this MSIL is compiled by the Just-in-Time (JIT) complier into native code for the processor on which the code will operate. The default is to JIT compile each method when it is first called, but it is also possible to “preJIT” MSIL code to native code at assembly install-time. With this option, all methods are compiled before the application is loaded so as to avoid the overhead of JIT compilation on each initial method call. You use the Native Image Generator (Ngen.exe) to create a native image from a managed assembly and install it into the native image cache. Once the code is compiled and cached, the CLR does not need to re-compile the MSIL code until the assembly is updated, the Just-In-Time compiled code is removed from the cache, or the machine is restarted. All languages targeting the CLR *should* exhibit a similar performance. While some compilers may produce better MSIL code, large variations in execution speed are unlikely.
  • #38: First, let’s drill into the Base Framework. The Base Framework is the most important part of the .NET Framework… primarily because it is the part that I worked on. But seriously, the Base Framework is super important because no matter what kind of application you are building are using you’ll end up needing to use this functionality. The system namespace contains all the base data types for the platform. Ints, floats, are defined here – arrays, strings, the root object and so forth. Within that, we have a whole slew of various base services that are consistently available in the base platform. Collections: growable arrays, hash table IO: file, streams NET: stuff that allows you to do tcpip, sockets
  • #40: On top of the base classes we have the Data and Xml support. The ADO.NET supports both the tightly connected ADO style record set support that many applications use today as well as a new more loosely coupled model called that uses DataSets. This model allows for a more distributed nature style of programming that is becoming more common. We also provide the SQLTypes namespace that provide datatypes that map directly onto the types that you&amp;apos;re accustomed to when you do database programming, say in TSQL. Nullable datatypes. Things that can basically have an int value, or be NULL. In the System.xml namespace we have all of the xml support. It truly is a world class set of functionality we’re providing here. There is of course a parser, and an xml writer – both of which are fully w3c compliant. There is a w3c dom implementation. On top of that there is an xslt for doing xsl transformations. We have an implementation of xpath that allows you to navigate data graphs in xml. And we have the serialization namespace that provides all of the core infrastructure for moving objects to xml representation and vice versa.
  • #43: For your Smart client development we have Windows Forms. Windows Forms are a combination of the best from both Visual Basic and MFC. It gives you both a RAD compositional model, along with inheritance all with a completely object oriented framework. So you can build components through inheritance, then you can visually aggregate these components using a visual forms designer like you’re used to in VB. It provides a very rich component model that has a lot of design time support so you can fairly easily build new components that can have very rich and seamless integration into the platform and into any available visual design tools. Finally, in the system.drawing namespace you can find the implementation of GDI+. GDI+ is the next generation of the GDI 2D graphics support in the system. It has some really cool features for things such as alpha blending, anti-aliasing…and native support for jpeg, gif, tif and all of the web formats.
  • #48: For development of applications and services that run on the server, we have the ASP.NET architecture. In System.Web.UI we have support for dynamically generating UI on the server and sending it down to clients. This is commonly in HTML, but it could also be in DHTML or even WAP for cell phones. The ASP.NET model allows you to build applications in much the same way you build client applications today: Just click and drag buttons and even higher level controls on a form. The infrastructure provides all the state management and other support. In System.Web.Services you’ll find the infrastructure for building great Xml based web services. With this support you just write classes and methods and the infrastructure handles turning the calls into SOAP. At the bottom you will find at the lower level things that are shared between web services and web ui: things like caching, configuration, security, state management and so forth.