Presentation on theme: "Using.NET Platform Note: Most of the material of these slides have been taken & extended from Nakov’s excellent overview for.NET framework, MSDN and wikipedia."— Presentation transcript:
Using.NET Platform Note: Most of the material of these slides have been taken & extended from Nakov’s excellent overview for.NET framework, MSDN and wikipedia By Muhammad Ali
Components of.NET Main components Common Language Runtime (CLR) Base Class Library Common Type System Common Language Specification
Common Language Runtime Foundation of the.NET Framework An agent that manages code at execution time, providing core services such as ○ Memory management ○ Thread management ○ JIT ○ Code Access Security & Role Base Security Managed code Code that targets the runtime Represented by Intermediate Language (IL) Unmanaged code Code that does not target the runtime On the fly Installation Time
Intermediate Language MSIL … or CIL CLR compiles IL using JIT Compiler Each function is compiled (to native code) just before execution! Recompilations of assemblies ~ Possible!
Base Class Library Helps in accomplishing a range of common programming tasks, including String management Data collection Database connectivity File access
Base Class Library System Threading Text ServiceProcess Security Resources Reflection Net IO Globalization Diagnostics Configuration Collections Runtime Serialization Remoting InteropServices
Common Type System Full Range of Types that CLR Understands Defines how types are declared, used, managed in the runtime
Common Language Specification SSubset of CTS AAll Languages in.NET are expected to support CTS AAny Benefits? Cross Language Integration!
Difference between Base Class Library &.NET Framework Library
Code Compilation and Execution Compilation Before installation or the first time each method is called Execution JIT Compiler NativeCode MSIL Code Metadata Source Code Language Compiler Also called Assembly (.EXE or.DLL file) Also called Assembly (.EXE or.DLL file)
Assemblies Types Library Assembly (DLL) Application Assembly (EXE) Smallest deployable unit in the CLR Have unique version number No version conflicts (known as DLL hell) Contains IL code to be executed
Assemblies Security boundary Permissions are granted at the assembly level Type boundary All types include the assembly name they are a part of Self-describing manifest Metadata that describes the types in the assembly
Metadata in Assemblies Type Descriptions Classes Base classes Implemented interfaces Data members Methods NameVersionCulture Assembly Description Other assemblies Security Permissions Exported Types
Assemblies More than One Assemblies… May Conflict! Assemblies conflict resolution Using metadata ○ Local ○ Shared (Global Assembly Cache or GAC) Different applications may use different versions of an assembly Easier software updates Easier software removal