NET Framework Overview NET and the NET Framework

  • Slides: 28
Download presentation

. NET Framework Overview. NET and the. NET Framework

. NET Framework Overview. NET and the. NET Framework

Objectives n Learn basic principles and concepts of. NET and the. NET framework Contents

Objectives n Learn basic principles and concepts of. NET and the. NET framework Contents n Looking Back n . NET and. NET Framework Overview n Summary n Questions

Section 1: Looking Back n Challenges for the development organization n Challenges for the

Section 1: Looking Back n Challenges for the development organization n Challenges for the corporate customer n Missing ? ?

Challenges for Development Organization n Development n Language and operating system choices n Delivery

Challenges for Development Organization n Development n Language and operating system choices n Delivery n CD-ROM: production, packaging, transport n Stability n DLL compatibility issues n Operating system—pollution leads to instability n Compatibility tests with “popular” solutions n Maintenance n Customer involvement, even for critical updates n Packaging, production, and delivery of medium

Challenges for the Corporate Customer n Deployment n Installation often requires time and personnel

Challenges for the Corporate Customer n Deployment n Installation often requires time and personnel n Testing for compatibility with existing applications and OS n License management n Stability and security n Requires (even more!) testing n Can lead to inadvertent breaches of security n Can destabilize the system or other solutions [ Registry] n Maintenance n All the problems of deployment and security revisited!

Missing ? ? n We need all system features to be available to programmers

Missing ? ? n We need all system features to be available to programmers in any language. n We’d like our code to be able to run on a variety of platforms. n We need help with managing different versions of the same software package. n We’d like object-oriented programming features to be available in and between all programming languages. n For safety, we want to be able to restrict the operations of pieces of code we don’t fully trust.

The. NET Framework Design Goals What were missing are goals !!!! n "Cross-Language Development”

The. NET Framework Design Goals What were missing are goals !!!! n "Cross-Language Development” n Inheritance, Debugging, Exception handling n Reliability and Security n Simple Development and Deployment n Device-agnostic

Section 2: . NET Framework Overview n What Is. NET? n Migration n Key

Section 2: . NET Framework Overview n What Is. NET? n Migration n Key Paths—from Anywhere to. NET Benefits of. NET

Concept of Platform independence & Language Independence Java Code Native Code Byte Code Java

Concept of Platform independence & Language Independence Java Code Native Code Byte Code Java Compiler JRE Native Code MS-IL Code C# Code IL Compiler VB. NET Code IL Compiler CLR

Managed code n Code running under control of the CLR is called Managed code

Managed code n Code running under control of the CLR is called Managed code n Platform Independence : n Mono - Linux n Mono - Mac n . NET framework - windows n Performance Improvement [JIT] n Language interpretability [ IL 1 + SC 2 = IL 2 ]

Strong Data typing n IL – No ambiguous data type n VB variant (NO)

Strong Data typing n IL – No ambiguous data type n VB variant (NO) n VB. NET n CTS Integer - C# no Integer – COMMON TYPE SPECIFICATION n Predefined n. NET languages targets code depends on these types n VB. NET n CTS data types that are in IL Integer & C# int – IL’s Int 32 defines rich hierarchy of types.

What is. NET? n. Net = Library + Environment n Library : like extension

What is. NET? n. Net = Library + Environment n Library : like extension of API n Environment : Layer between OS and Application.

. NET Framework Architecture C# VB C++ Scheme … ASPServices. NET XML Windows Forms

. NET Framework Architecture C# VB C++ Scheme … ASPServices. NET XML Windows Forms User Interfaces ADO. NET and XML Data Connectivity Base Class Library Base Framework Common Language Runtime Operating System Visual Studio. NET Common Language Specification

Common Language Runtime Base Class Library Support Thread Support COM Marshaler Type Checker Exception

Common Language Runtime Base Class Library Support Thread Support COM Marshaler Type Checker Exception Manager Security Engine Debug Engine MSIL to Native Compilers (JIT) Code Manager Class Loader Garbage Collector (GC)

JIT – Just In Time n IL is always JIT compiled where java byte

JIT – Just In Time n IL is always JIT compiled where java byte code was interpreted n IL never compiled to native code in one go, JIT compiler simply each portion of code as it is called (Just In Time) n Then resultant native code is stored until the application exits. So no need to recompile n Since final stage JIT Compiler know exactly what processor type the program will run on. Take advantage of particular machine code instruction.

Garbage Collector n. Before GC n Make the application code do it manually [

Garbage Collector n. Before GC n Make the application code do it manually [ C++ ] n Resources never occupied for longer than unnecessary. n Code that request memory should explicitly inform the system when it no longer requires that memory. n Make objects maintain reference counts [ COM ] n COM component maintain a count of how many clients are currently maintaining reference to it.

GC – Clean up memory n Dynamically requested memory allocated on heap. n When

GC – Clean up memory n Dynamically requested memory allocated on heap. n When heap gets full and needs tidying up, it calls garbage collector. n GC examining references to objects stored on the heap to identify which one are accessible from your code. n Objects that are not referred to are deemed to be no longer accessible from your code and therefore be removed.

Languages n Ada n APL n n lcc (MS Research Redmond) Basic (Visual Basic)

Languages n Ada n APL n n lcc (MS Research Redmond) Basic (Visual Basic) n Mondrian (Utrecht) n C# n n C ML (MS Research Cambridge) n C++ n Mercury (Melbourne U. ) n J# n Oberon (Zurich University) n COBOL n n Component Pascal (Queensland Univ of Tech) Oz (Univ of Saarlandes) n Perl n ECMAScript (JScript) n Python n Eiffel (Monash University) n Scheme (Northwestern U. ) n Haskell (Utrecht University) n Small. Talk

Key Benefits of. NET n Ease n of Use Object-oriented model n Everything n

Key Benefits of. NET n Ease n of Use Object-oriented model n Everything n is an object Namespace and Framework structure n Easier to comprehend and use n Naming n Freedom scheme of namespaces reflects the underlying functionality to Choose: n The language that meets your needs n The development tool that is best for you n The “features and functionality” to “plug in to”

Key Benefits of. NET n Stability n Say “goodbye” to memory leaks n Garbage

Key Benefits of. NET n Stability n Say “goodbye” to memory leaks n Garbage collection manages memory n Assembly eliminates DLL compatibility issues n Deliverables are restricted to an assembly n Security n Restricting or containing the illegal memory reference n Comprehensive security model n Assembly n System n Code specific wide inspection through MSIL

Key Benefits of. NET n Deployment and Management n Deployment: Code is “Assembled” and

Key Benefits of. NET n Deployment and Management n Deployment: Code is “Assembled” and Run “Securely” n Maintenance: Version Maintenance Simplified n The Web the Way You Want It n Anywhere n Anytime n On any device

The Framework Sample of what’s in the framework l l l l l Microsoft®.

The Framework Sample of what’s in the framework l l l l l Microsoft®. NET Base Class Libraries File IO Networking Database Access XML Security Cryptography Threading Enterprise Services Graphics l l l l COM Interoperability Registry Monitoring System Events Windows® Management Interface Globalization Configuration Diagnostics Reflection

The. NET Framework Namespaces System. Web Services Description UI Html. Controls Discovery Web. Controls

The. NET Framework Namespaces System. Web Services Description UI Html. Controls Discovery Web. Controls System. Win. Forms Design Protocols Component. Model System. Drawing Caching Security Drawing 2 D Printing Configuration Session. State Imaging Text System. Data System. Xml ADO SQL XSLT Design SQLTypes XPath Serialization System Collections IO Security Runtime Interop. Services Configuration Net Service. Process Diagnostics Reflection Text Remoting Globalization Resources Threading Serialization

IL Compilers n CSC & vbc n out n target: exe winexe library n

IL Compilers n CSC & vbc n out n target: exe winexe library n o n warn: 0 -4 n nowarn n unsafe n checked n nologo n main n reference n lib

Configuration and Deployment Tools n Type Library Exporter (Tlbexp. exe) n Type Library Importer

Configuration and Deployment Tools n Type Library Exporter (Tlbexp. exe) n Type Library Importer (Tlbimp. exe) n Web Services Description Language Tool (Wsdl. exe) n Web Services Discovery Tool (Disco. exe) n XML Schema Definition Tool (Xsd. exe) n ASP. NET Install (aspnet_regiis. exe) n Global Assembly Cache tool (gacutil. exe) n . NET Framework Configuration Tool (mscorcfg. msc) n Installer tool (installutil. exe)

Security Tools n Code Access Security Policy Tool (Caspol. exe) n File Signing Tool

Security Tools n Code Access Security Policy Tool (Caspol. exe) n File Signing Tool (Signcode. exe) n Permissions View Tool (Permview. exe) n PEVerify Tool (PEverify. exe) n Secutil Tool (Secutil. exe) n Strong Name Tool (Sn. exe)

General Tools n Common Language Runtime Minidump Tool (Mscordmp. exe) n mscordmp /pid [pid

General Tools n Common Language Runtime Minidump Tool (Mscordmp. exe) n mscordmp /pid [pid number] /out [output file] n MSIL Assembler (Ilasm. exe) n MSIL Disassembler (Ildasm. exe) n Resource File Generator Tool (Resgen. exe) n Windows Forms Class Viewer (Wincv. exe)