Introduction to .NET

15
Introduction to .NET Lorenzo Dematté @ldematte

Transcript of Introduction to .NET

Page 1: Introduction to .NET

Introduction to .NET

Lorenzo Dematté@ldematte

Page 2: Introduction to .NET

Not different from asking: what is Java?.NET, XP, 2000… oh my!A Framework

Execution environment (CLR)Support libraries (BCL)Languages (C#, VB, F#)

What is .NET?

Page 3: Introduction to .NET

A platform, an “ecosystem”Both MS and othersTools (VS), libraries, open source projects (Nunit, EF)

And also, for some parts, a specification /standard

CLI, C#

.NET is also

Page 4: Introduction to .NET

.NET Framework

C#

BCL

CLR (Jitter, VM, Loader, GC, Debugging…)

Host: OS, Hardware, Exe (SQL, IIS)

ADO.NET WPF

EF LINQ

WCF WF

PLINQ TPL

C++/CLI VB.NET F#

VS

Page 5: Introduction to .NET

History

1.0, 1.1Winforms, C# 1, ASP.NET, ADO.NET

2.0Generics, C# 2 (latest CLR)

3.0 – “WinFX”WPF, WCF, WF

3.5LINQ, C# 3 (lambda, extension methods)

4.0ParallelFX, C# 4 (dynamic)

4.5Metro, C# 5 (async)

Page 6: Introduction to .NET

.NET Framework (history)

C#

BCL

CLR (Jitter, VM, Loader, GC, Debugging…)

ADO.NET WPF

EF LINQ

WCF WF

PLINQ TPL

C++/CLI

VB.NET

F#

Page 7: Introduction to .NET
Page 8: Introduction to .NET

Core concepts

ManagedGarbage collectionIntrospection (self-description)Virtual machine

JITVerification and optimization

ComponentsAssembly

Bytecode + Metadata

Page 9: Introduction to .NET

Where?

WindowsLinux, MacOSX

Mono, MonoMAC

EmbeddedWindows CE, Windows Phone

MicroNetduino

Page 10: Introduction to .NET

Outside MS: Languages

Page 11: Introduction to .NET

Outside MS: Libraries

Page 12: Introduction to .NET

From source to execution: languages

Compilationcsc /out:test.exe test.csmcs test.cs --out:test2.exe

Execution.\test.exemono test.exe

Multiple languagescsc /t:library /out:testLib.dll testLib.csfsc test.fs /r:testLibrary.dll

Page 13: Introduction to .NET

From source to execution

Assembly:MSIL + Metadata

Load assemblyPlus dependencies“Fusion”

JIT

Page 14: Introduction to .NET

From source to execution

C# source

CLR (Jitter, VM, Loader, GC, Debugging…)

F# source

Assembly (dll)MSILAssembly (exe)MSIL

Greet FuncGreetAll Func

Main FuncASM Main

Page 15: Introduction to .NET

An example: Hello World