Introduction. What is.Net? The hype: “Microsoft.Net is a set of Microsoft software technologies...

20
Introduction
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    222
  • download

    3

Transcript of Introduction. What is.Net? The hype: “Microsoft.Net is a set of Microsoft software technologies...

Introduction

What is .Net?What is .Net?• The hype:

“Microsoft .Net is a set of Microsoft software technologies for connecting information, people, systems, and devices. It enables a high level of software integration through the use of XML Web services – small, discrete, building-block applications that connect to each other as well as to other applications over the Internet.”

• The hype:“Microsoft .Net is a set of Microsoft software technologies for connecting information, people, systems, and devices. It enables a high level of software integration through the use of XML Web services – small, discrete, building-block applications that connect to each other as well as to other applications over the Internet.”

What is .Net, really?What is .Net, really?

• .Net is a platform that provides a standardized set of services.– It’s just like Windows, except distributed over

the Internet.– It exports a common interface so that it’s

programs can be run on any system that supports .Net.

• .Net is a platform that provides a standardized set of services.– It’s just like Windows, except distributed over

the Internet.– It exports a common interface so that it’s

programs can be run on any system that supports .Net.

Goals of .NetGoals of .Net

• Maintain Microsoft dominance…?

• Tie all devices to the Internet

• Software as a service

• Data and applications accessible on all devices

– Truly compile once, run anywhere– Scalability

• Maintain Microsoft dominance…?

• Tie all devices to the Internet

• Software as a service

• Data and applications accessible on all devices

– Truly compile once, run anywhere– Scalability

How Does It All Work?How Does It All Work?

• Based on 3 protocols:– HTTP– XML– SOAP

• XML (eXtensible Markup Language)– Separates data and view– Good, general way of describing data

• Based on 3 protocols:– HTTP– XML– SOAP

• XML (eXtensible Markup Language)– Separates data and view– Good, general way of describing data

Simple Object Access ProtocolSimple Object Access Protocol

• Definition:“Simple and lightweight mechanism for exchanging structured and typed information between peers in a decentralized, distributed environment.”

• Based on XML and HTTP– SOAP defined through XML– XML piggybacks on top of HTTP– Because it uses HTTP, firewalls aren’t a

problem

• Definition:“Simple and lightweight mechanism for exchanging structured and typed information between peers in a decentralized, distributed environment.”

• Based on XML and HTTP– SOAP defined through XML– XML piggybacks on top of HTTP– Because it uses HTTP, firewalls aren’t a

problem

.Net Platform.Net Platform

• .Net Framework and Visual Studio .Net

• Mobile Internet Toolkit– Set of programming interfaces that enable

developers to target mobile devices like smart phones and PDAs

• Building Block Services (ie, Passport)

• .Net Framework and Visual Studio .Net

• Mobile Internet Toolkit– Set of programming interfaces that enable

developers to target mobile devices like smart phones and PDAs

• Building Block Services (ie, Passport)

.Net Framework.Net Framework

• Programming model for .Net

• Platform for running managed code in a virtual machine

• Provides a very good environment to develop networked applications and Web Services

• Programming model for .Net

• Platform for running managed code in a virtual machine

• Provides a very good environment to develop networked applications and Web Services

.Net Framework Contents.Net Framework Contents

• Common Language Runtime• Manages running code • Verifies type safety• Provides garbage collection, error handling

– Provides common type system– Provides access to system resources

• Win32 API, COM, etc.

• A collection of unified classes• ASP.NET• ADO.NET• Access to Windows Functions: System, System.Drawing,

System.Web, System.XML...

• Common Language Runtime• Manages running code • Verifies type safety• Provides garbage collection, error handling

– Provides common type system– Provides access to system resources

• Win32 API, COM, etc.

• A collection of unified classes• ASP.NET• ADO.NET• Access to Windows Functions: System, System.Drawing,

System.Web, System.XML...

Inside the .Net FrameworkInside the .Net Framework

CLRCLRExecutes code, maintains Executes code, maintains security, handles component security, handles component “plumbing” and dependencies“plumbing” and dependencies

Visual Basic .NETVisual Basic .NET C#C#

ASPASP.NET.NET

ADOADO.NET.NET

Enterprise Enterprise ServicesServices

CLRCLR

MSMQMSMQ COM+COM+ ActiveActiveDirectoryDirectory IISIIS WMIWMI

Win32Win32

XML Web Services and Scripting XML Web Services and Scripting High-productivity environmentHigh-productivity environmentfor building and operating XML for building and operating XML Web servicesWeb services

XML and Data Access XML and Data Access ADO .NET interfaces any ADO .NET interfaces any database, loosely coupled data database, loosely coupled data access and native XML data access and native XML data format.format.

Enterprise ServicesEnterprise ServicesThe services required for mission The services required for mission critical applications: Transactions, critical applications: Transactions, Messaging, Partitions, Object Messaging, Partitions, Object Pooling and EventsPooling and Events

Unified Class librariesUnified Class librariesUnifies Programming Unifies Programming models across languagesmodels across languagesFactored for extensibilityFactored for extensibilityDesigned for toolsDesigned for tools

Visual J#...Visual J#...

Standards ComplianceStandards Compliance

Visu

al Stu

dio

.NE

TV

isual S

tud

io .N

ET

CLICLI

CLRCLR

Base Class LibraryBase Class Library

Data and XMLData and XML

XML WebXML Webservicesservices

Windows FormsWindows Forms

Web FormsWeb Forms

Common Language SpecificationCommon Language Specification

VBVB C++C++ J#...J#...

Open LanguageOpen LanguageSpecificationSpecification

XML-basedXML-baseddata accessdata access

JScriptJScript

XML, SOAP-XML, SOAP-basedbased

CLI, C#CLI, C#Submitted to ECMASubmitted to ECMAC#C#

Common Language RuntimeCommon Language Runtime

• Manages running code– Threading– Memory management– No interpreter: Install time or run time intermediate

language (IL) to native compilation• Fine-grained evidence-based security

– Code access security• IL can be verified to guarantee type safety• No unsafe casts, no un-initialized variables and no out-of-

bounds array indexing– Role-based security– Integrated with underlying OS

• Manages running code– Threading– Memory management– No interpreter: Install time or run time intermediate

language (IL) to native compilation• Fine-grained evidence-based security

– Code access security• IL can be verified to guarantee type safety• No unsafe casts, no un-initialized variables and no out-of-

bounds array indexing– Role-based security– Integrated with underlying OS

Compilation and Execution CycleCompilation and Execution Cycle

CompilationCompilation

Before Before installation or installation or the first time the first time

each method is each method is calledcalled

Before Before installation or installation or the first time the first time

each method is each method is calledcalled

ExecutionExecution

JIT JIT CompilerCompiler

NativeNativeCodeCode

MSILMSILCodeCode

MetadataMetadataSource Source CodeCode

Language Language CompilerCompiler

CLR InternalsCLR Internals

Class LoaderClass Loader

IL to NativeIL to NativeCompilersCompilers

CodeCodeManagerManager

GarbageGarbageCollectorCollector

Security EngineSecurity Engine Debug EngineDebug Engine

Type CheckerType Checker Exception ManagerException Manager

Thread SupportThread Support COM MarshalerCOM Marshaler

Base Class Library SupportBase Class Library Support

Simplified DevelopmentSimplified Development

• CLR makes things easy:– Self-describing components– Hierarchical namespaces– Source code to metadata– Structured exceptions– Root object class– Garbage collector

• CLR makes things easy:– Self-describing components– Hierarchical namespaces– Source code to metadata– Structured exceptions– Root object class– Garbage collector

.Net Unified Classes.Net Unified Classes

System System

System.Data (ADO .NET)System.Data (ADO .NET) System.XMLSystem.XML

System.Web (ASP .NET)System.Web (ASP .NET)

DiagnosticsDiagnostics

ConfigurationConfiguration

CollectionsCollections

NetNet

IOIO

ThreadingThreading

TextText

SecuritySecurity

CommonCommon

OLEDBOLEDB

SQLTypesSQLTypes

SQLClientSQLClient

XPathXPath

XSLXSL

RuntimeRuntimeInteropServicesInteropServices

RemotingRemoting

SerializationSerialization

SerializationSerialization

ConfigurationConfiguration SessionStateSessionState

CachingCaching SecuritySecurity

ServicesServicesDescriptionDescription

DiscoveryDiscovery

ProtocolsProtocols

UIUIHTMLControlsHTMLControls

WebControlsWebControlsSystem.DrawingSystem.Drawing

ImagingImaging

Drawing2DDrawing2D

TextText

PrintingPrinting

System.Windows.FormsSystem.Windows.Forms

DesignDesign ComponentModelComponentModel

SchemaSchema

ReflectionReflection

ResourcesResourcesGlobalizationGlobalization

ServiceProcessServiceProcess

Multi-Language DevelopmentMulti-Language Development• Object system is built in, not bolted on

– Use the language of choice– No additional rules or API to learn

• Advanced multi-language features– Cross-language inheritance and exceptions

• Supports more than 20 languages– Perl, Python, COBOL, Jscript, Eiffel, Haskell, Pascal, ML, ADA, APL, C,

Visual C++, Visual J#, Visual Basic, Visual C#, SmallTalk, Oberon, Scheme, Mercury, Oz and CAML.

• All languages have approximately same performance, since all turn into MSIL first.

• C# is the “flagship” language for the .NET Framework.• Tools that work in multiple languages and across languages and

platforms– Debugger

• Object system is built in, not bolted on– Use the language of choice– No additional rules or API to learn

• Advanced multi-language features– Cross-language inheritance and exceptions

• Supports more than 20 languages– Perl, Python, COBOL, Jscript, Eiffel, Haskell, Pascal, ML, ADA, APL, C,

Visual C++, Visual J#, Visual Basic, Visual C#, SmallTalk, Oberon, Scheme, Mercury, Oz and CAML.

• All languages have approximately same performance, since all turn into MSIL first.

• C# is the “flagship” language for the .NET Framework.• Tools that work in multiple languages and across languages and

platforms– Debugger

Simple to UseSimple to Use

• Component-oriented– Properties, methods and events are first class– Design-time functionality

• Organization– Organized in hierarchical namespaces

• Unified Type System– Everything is an object– Boxing converts value types to objects

• No need for special variant type• Example: 123.toString(); will convert the integer “123” to a string “123”; without the need to declare “123” as an integer first

• Component-oriented– Properties, methods and events are first class– Design-time functionality

• Organization– Organized in hierarchical namespaces

• Unified Type System– Everything is an object– Boxing converts value types to objects

• No need for special variant type• Example: 123.toString(); will convert the integer “123” to a string “123”; without the need to declare “123” as an integer first

SummarySummary

• Microsoft .NET– Built from the ground up (unlike MFC)– Standards-based platform – Web services– Consistent programming model

• The .NET Platform contains:– .NET Framework and Visual Studio .NET – Mobile Internet Toolkit– Building block services (Passport)

• Common framework for all languages– Common Language Runtime and Unified classes

• Simplified development and deployment

• Microsoft .NET– Built from the ground up (unlike MFC)– Standards-based platform – Web services– Consistent programming model

• The .NET Platform contains:– .NET Framework and Visual Studio .NET – Mobile Internet Toolkit– Building block services (Passport)

• Common framework for all languages– Common Language Runtime and Unified classes

• Simplified development and deployment

ResourcesResources

• http://www.gotdotnet.comhttp://www.gotdotnet.com– GotDotNet is a great site for code samples, tutorials, and a great

developer community. Also access to the creators of C#.

• http://www.go-mono.com– Project Mono is an open source .NET implementation for Unix

• http://www.dotnetmagic.com– DotNetMagic has a great set of libraries and code to make

common tasks very easy to perform.

• http://www.codeproject.com– Lots of code samples and resources for all programming

languages.

• http://msdn.microsoft.com– Great for documentation on everything .NET & Win32 related.

• http://www.gotdotnet.comhttp://www.gotdotnet.com– GotDotNet is a great site for code samples, tutorials, and a great

developer community. Also access to the creators of C#.

• http://www.go-mono.com– Project Mono is an open source .NET implementation for Unix

• http://www.dotnetmagic.com– DotNetMagic has a great set of libraries and code to make

common tasks very easy to perform.

• http://www.codeproject.com– Lots of code samples and resources for all programming

languages.

• http://msdn.microsoft.com– Great for documentation on everything .NET & Win32 related.