Download presentation
Presentation is loading. Please wait.
1
.Net Overview Giuseppe Attardi Università di Pisa
2
A problem of communication Before RPC-style models, applications were completely separate entities with little or no integration… Applicatio n Code and data structures
3
A problem of communication …but with RPC or COM, you still have to write ‘plumbing’ code and can’t directly interact…
4
The.NET Approach … a common language runtime provides components a common substrate. No “plumbing” is needed and objects can directly interact.
5
.NET Framework and Tools Operating System Common Language Runtime Base Class Library ADO.NET and XML ASP.NET Web Forms Web Services Mobile Internet Toolkit WindowsForms Common Language Specification VBC++C#J#…
6
Common Language Runtime Common Type System Common Type System Metadata Metadata Execution Engine Execution Engine
7
Common Language Runtime Class Loader IL to Native Compilers (JIT) Code Manager Garbage Collector Security EngineDebug Engine Type CheckerException Manager Thread SupportCOM Marshaler Base Class Library Support
8
Intermediate Language (IL) VBVC...Script IL JIT Compiler Native Code Common Language Runtime Assembly Language of CLR Code is never interpreted
9
Compilation and Execution Source Code Compilation At installation or the first time each method is called Language Compiler Assembly Execution JIT Compiler NativeCode Code (IL) Metadata
10
.NET Languages C# C# C++ C++ Visual Basic Visual Basic APL APL COBOL COBOL Eiffel Eiffel Forth Forth FORTRAN 95 FORTRAN 95 F# F# Haskell Haskell Mercury Mercury Mondrian Mondrian Oberon Oberon Pascal Pascal Perl Perl Python Python RPG RPG S# S# Scheme Scheme SML SML
11
.NET Framework Class Library System System.DataSystem.Xml System.Web Globalization Diagnostics Configuration Collections Resources Reflection Net IO Threading Text ServiceProcess Security Common OleDb SQLTypes SqlClient XPath XSLT Runtime InteropServices Remoting Serialization Serialization ConfigurationSessionState CachingSecurity Services Description Discovery Protocols UI HtmlControls WebControls System.Drawing Imaging Drawing2D Text Printingy System.Windows.Forms DesignComponentModel
12
Simpler Development Completely eliminates plumbing Completely eliminates plumbing –No registration, GUIDs,.IDL files, HRESULTs, IUnknown, AddRef/Release, CoCreateInstance, etc. Object Oriented to the core Object Oriented to the core –Classes and inheritance fully supported –Even across languages! Seamless integration Seamless integration –Any.NET class can be used as a COM class with zero extra work –COM classes can be imported as.NET classes
13
Robust And Secure Automatic lifetime management Automatic lifetime management –All.NET objects are garbage collected –No stray pointers, memory leaks –Multi-generational mark-and-compact GC –Self-configuring, dynamically tuning Exception handling Exception handling
14
Robust And Secure Several compilation models Several compilation models –Native (e.g. Managed C++) –CIL (e.g. VB and C#) –No interpreter: install-time or run-time IL to native compilation Code correctness and type-safety Code correctness and type-safety –CIL can be verified to guarantee type-safety –No unsafe casts, no uninitialized variables, no out- of-bounds array indexing Evidence-based security Evidence-based security –Based on origin of code as well as user –Extensible permissions
15
Multi-Language Platform The freedom to choose language The freedom to choose language –All features of.NET platform available to any.NET programming language –Application components can be written in multiple languages Highly leveraged tools Highly leveraged tools –Debuggers, profilers, code coverage analyzers, etc. work for all languages
16
Simpler Deployment And Management Assemblies Assemblies –The unit of deployment, versioning, and security –Like DLLs, but self-describing through manifest Zero-impact install Zero-impact install Side-by-side execution Side-by-side execution –Multiple versions of the same component can co-exist
17
.NET Classes Namespaces and Classes Namespaces and Classes –Hierarchical, unified, extensible class libraries –Provide “system” and base functionality and services –Everything is an object! Interfaces Interfaces –The.NET (Service) contracts Types Types –Byte, Sbyte, Single, Double, String, Int16, Int32, Int64, … –Common Type System
18
Shared Source CLI (Rotor) Non-commercial implementation Non-commercial implementation Available for research, academic and other non-profit use Available for research, academic and other non-profit use Written in C#, on top of PAL Written in C#, on top of PAL Available for FreeBSD, Linux and WinXP Available for FreeBSD, Linux and WinXP http://dotnet.di.unipi.it http://dotnet.di.unipi.it http://dotnet.di.unipi.it
19
Comparison Java Java –One language –Multiple platforms.NET.NET –Multiple languages –Multiple platforms Windows FreeBSD (Rotor) Linux, GNU (in progress) Mono Project (Ximian)
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.