Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to.NET Technology Overview Sean Puffett Developer & Platform Group Microsoft Ltd

Similar presentations


Presentation on theme: "Introduction to.NET Technology Overview Sean Puffett Developer & Platform Group Microsoft Ltd"— Presentation transcript:

1 Introduction to.NET Technology Overview Sean Puffett Developer & Platform Group Microsoft Ltd seanpuff@microsoft.com

2 The slides for this event will be posted at: www.microsoft.com/uk/msdn/postevents

3 MSDN Connection Get personalised info and a customised RSS feed The programming language(s) you’re interested in The technology area(s) you’re interested in The information you want View news, technical resources, events, webcasts and community information Sign up for MSDN Connection at: http://www.microsoft.com/uk/msdn

4 Agenda The evolution of.NET The Common Language Infrastructure.NET Programming Languages Building Types for.NET Common Language Runtime Services The.NET Framework How to get.NET

5 Where did.NET come from? Platform wants to raise abstraction level by offering more services to code Serialization? Memory? Type-Safety? etc. Problems? Today’s compiler ‘eats’ the programmer’s intent Leaves the platform ‘guessing’ as to how to help pushebp ldeax, 0x popebp Class Customer { public: void Process() } Compile & Link

6 Where did.NET come from? Existing component technology (COM) has some issues COM client and COM server are very tightly coupled together COM model only goes so far. Lacks; A common type system across language VB uses SAFEARRAY, C++ does not A common description mechanism for components Type libraries are optional and incomplete at best A mechanism for versioning, deployment, registration A mechanism for knowing whether to trust code Do we download an ActiveX control or not?

7 The.NET Evolution – Part 1 Before COM, applications were completely separate entities with little or no integration Applicatio n Code and data structures

8 The.NET Evolution – Part 2 COM provides a way for components to integrate; However, each component must provide the “plumbing” and objects cannot directly interact

9 The.NET Evolution – Part 3 With the.NET Framework common language runtime, components are built on a common substrate; No “plumbing” is needed and objects can directly interact

10 Agenda The evolution of.NET The Common Language Infrastructure.NET Programming Languages Building Types for.NET Common Language Runtime Services The.NET Framework How to get.NET

11 Common Language Specification Common Language Infrastructure ECMA Standard 335 Common Type System (CTS) Int16 Int32 float double string object Executable File Format Metadata Code (CIL) Common Language Runtime (CLR) Common Intermediate Language (CIL).ldstr “Hello World” Base Class Library

12 Agenda The evolution of.NET The Common Language Infrastructure.NET Programming Languages Building Types for.NET Common Language Runtime Services The.NET Framework How to get.NET

13 string s = "authors"; SqlCommand cmd = new SqlCommand("select * from "+s, sqlconn); cmd.ExecuteReader(); C# Dim s as String s = "authors" Dim cmd As New SqlCommand("select * from " & s, sqlconn) cmd.ExecuteReader() Visual Basic Programming Languages C++ String *s = S"authors"; SqlCommand cmd = new SqlCommand(String::Concat(S"select * from ", s), sqlconn); cmd.ExecuteReader();

14 Compiling for the CLR? Visual Basic C#C++ jscript.net Compiler.NET Assembly Metadata Code (CIL)

15 “Hello World” CIL, Assemblies & Metadata

16 Execution on the CLR Common Language Runtime (CLR) Class Loader IL to Native Compilers Code Manager Garbage Collector Security EngineDebug Engine Type CheckerException Manager Thread SupportCOM Marshaler Base Class Library Support.NET Assembly Metadata Code (CIL) Just In Time Native Code 0101010101 0100101011 Verified?Permitted?

17 Agenda The evolution of.NET The Common Language Infrastructure.NET Programming Languages Building Types for.NET Common Language Runtime Services The.NET Framework How to get.NET

18 Building Types for.NET.NET type system is partitioned into Value Types & Reference Types All types share a common base type System.Object New types are constructed out of; Methods Properties & Fields Events & Delegates Interfaces

19 The building blocks of.NET types

20 Agenda The evolution of.NET The Common Language Infrastructure.NET Programming Languages Building Types for.NET Common Language Runtime Services The.NET Framework How to get.NET

21 Naming.NET Assemblies.NET Assemblies have names comprising; Simple name (always present) Culture Version Public key token An assembly with all 4 parts is a strongly named assembly Cryptographic checks can prove assembly is unaltered since the point of production

22 Deploying.NET Assemblies Two deployment models for.NET assemblies Private Default model All code lives in the application’s folder Install involves copying files, uninstall deleting files Versioning is under the control of the developer Shared Single installation folder named the Global Assembly Cache (GAC) Stores multiple versions & cultures of same assembly Install involves additional registration steps Assembly must be strongly named

23 Resolving.NET Assemblies Assembly manifest records details of all referenced types external to the assembly At run time, on demand, CLR loads referenced assemblies and types CLR has rules for assembly resolution Works out the right version (config + policy) Checks the Global Assembly Cache (GAC) Probes for the assembly in the current folder hierarchy Note: Only strongly-named assemblies get version checking and GAC checking

24 Assembly loading & versioning with the CLR

25 Memory Management CLR provides automatic memory features Automatically determines class layout at runtime Automatically manages object lifetimes Automatically reclaims/reuses memory from “dead” objects through garbage collection Logically the CLR; Periodically halts program execution Examines all allocated objects and determines which are still reachable by variables All space used by unreachable objects is claimed for re-use Object references may be altered by this process

26 Automatic Memory Management

27 Applying Security Policy CLR has a new, innovative security model Code Access Security Assembly forms the security boundary All code executing in one assembly has the same permissions Assembly Metadata Code (CIL) Evidence… Folder? Publisher? Web Site URL? Web Site Zone Hash? Strong Name? Policy User Machine Enterprise Permissions

28 Code Access Security

29 Working with Existing Code Mainstream.NET programming provides 2 ways to reach existing code Platform Invoke (P/Invoke) Allows.NET code to call out to functions exported from DLLs Allowing for call backs into.NET code COM Interop Exposes COM objects as.NET objects Exposes.NET objects as COM objects

30 Working with existing code

31 Agenda The evolution of.NET The Common Language Infrastructure.NET Programming Languages Building Types for.NET Common Language Runtime Services The.NET Framework How to get.NET

32 Unifying Programming Models Consistent API availability regardless of language and programming model Stateless, Code embedded in HTML pages Sub-classing,Power,Expressiveness RAD,Composition,Delegation VB Forms Windows API MFC & ATLASP.NET Framework

33 System System.DataSystem.Xml System.Web Globalization Diagnostics Configuration Collections Resources Reflection Net IO Threading Text ServiceProcess Security Design OleDb SqlTypes SqlClient XPath XSLT Runtime InteropServices Remoting Serialization ConfigurationSessionState CachingSecurity Services Description Discovery Protocols UI HtmlControls WebControls System.Drawing Imaging Drawing2D Text Printing System.Windows.Forms DesignComponentModel.NET Framework Sketch

34 CLR, Framework & Tools Operating System Common Language Runtime Base Class Library ADO.NET and XML ASP.NETWindowsForms Common Language Specification VBC++C#JScriptJ# Visual Studio.NET Web Services Web Forms

35 Agenda The evolution of.NET The Common Language Infrastructure.NET Programming Languages Building Types for.NET Common Language Runtime Services The.NET Framework How to get.NET

36 Get.NET.NET Framework V1.1 Server 2003, XP, 2000, NT, ME, 98 Pre-installed on Server 2003 Software Development Kit RedistributableRedistributable (23MB) Service Pack 1 Visual Studio.NET 2003 On MSDN

37 Other Resources Get more information on the.NET Framework http://msdn.microsoft.com/netframework http://msdn.microsoft.com/netframework/using Try Visual Studio http://www.microsoft.com/vstudio/tryit Take a look at the Express products http://msdn.microsoft.com/express GotDotNet and ASP.NET http://www.gotdotnet.com http://www.asp.net The UK MSDN Site & Flash – local news, events, webcasts http://www.microsoft.com/uk/msdn http://www.microsoft.com/uk/msdn/subscriptions/register.asp

38 © 2004 Microsoft Limited. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.


Download ppt "Introduction to.NET Technology Overview Sean Puffett Developer & Platform Group Microsoft Ltd"

Similar presentations


Ads by Google