1 / 16

Introduction au .NET FrameWork

Introduction au .NET FrameWork. Stéphane RZETELNY - Ingénieur 2000 - Informatique Réseaux Octobre 2002. PLAN. Qu’est-ce que le .NET FrameWork ? Les objectifs du .Net FrameWork Notion d’assemblée Comment ça fonctionne Interopérabilité Standardisation du .Net FrameWork

lluvia
Download Presentation

Introduction au .NET FrameWork

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction au .NET FrameWork Stéphane RZETELNY - Ingénieur 2000 - Informatique Réseaux Octobre 2002

  2. PLAN • Qu’est-ce que le .NET FrameWork ? • Les objectifs du .Net FrameWork • Notion d’assemblée • Comment ça fonctionne • Interopérabilité • Standardisation du .Net FrameWork • .Net FrameWork et Linux

  3. Qu’est-ce que le .NET FrameWork ? • Un nouvel environnement de développement et d’exécution • L’introduction d’un nouveau langage : C# • Une bibliothèque de classes extensibles, regroupées par namespace en C#

  4. Objectifs du .NET Framework • Environnement d’exécution robuste et sécurisé • Common Language Runtime (CLR) • Code managé : Garbage Collector, Type Safe.. • Runtime Security • Déploiement et administration simplifiés • Xcopy, Versioning • Intégration de l’existant • Multiples langages de programmation • Interopérabilité COM et Win32 • Compatibilité « side by side » • Développement d’applications simplifié • Modèle de programmation unifié • Elever le niveau d’abstraction • classe, interface, héritage, propriété, constructor, exception… • Elimination complète de la plomberie COM • Bibliothèque de classe riche et extensible • Intégration native des standards Web (HTTP,XML, SOAP, ...)

  5. Thread Support COM Marshaler Type Checker Exception Manager Security Engine Debug Engine IL to Native Compilers Code Manager Garbage Collector CLR : Vue d’ensemble Base Class Library Support Class Loader

  6. Assembly : Définition • Unité de déploiement • Point d’entrée d’exécution • Unité de contrôle de sécurité • Unité de contrôle de version • Unité de réutilisation • Unité de visibilité des types • Unité d’exécution « cote à cote »

  7. Assembly : 2 formes d’utilisation • On considère 2 types d’assembly : • Privée : Dédiée à l’utilisation d’un programme particulier. Se situe généralement dans l’arborescence du programme qui l’utilise. • Partagée : Utilisée par un ensemble de programme différents. Se situe généralement dans le GAC (Global Assemblies Cache)

  8. Assembly : contenu • Un manifest : metadonnées de l’assembly • Les métadonnées décrivant les types utilisés • Le code IL • Les ressources utilisées (images,…) • La liste des fichiers qui la compose

  9. Global Assemblies Cache (GAC) • Un cache accueillant les assemblées partagées par plusieurs applications • Doivent être définies avec des « noms forts » • Grâce au mécanisme de clé privée, clé publique • Pour garantir l’unicité d’une version d’une assemblée • Pour garantir l’intégrité de l’assemblée • Doivent faire référence à des assemblées fortement nommées !

  10. Compiler Assembly Comment ça marche : 1. Le Développement DEVELOPMENT public static void Main(String[] args ) { String usr; FileStream f; StreamWriter w; try { usr=Environment.GetEnvironmentVariable("USERNAME"); f=new FileStream(“C:\\test.txt",FileMode.Create); w=new StreamWriter(f); w.WriteLine(usr); w.Close(); } catch (Exception e){ Console.WriteLine("Exception:"+e.ToString()); } } public static void Main(String[] args ) { String usr; FileStream f; StreamWriter w; try { usr=Environment.GetEnvironmentVariable("USERNAME"); f=new FileStream(“C:\\test.txt",FileMode.Create); w=new StreamWriter(f); w.WriteLine(usr); w.Close(); } catch (Exception e){ Console.WriteLine("Exception:"+e.ToString()); } } Source code C# J# VB Cobol … MSIL Metadata Resources

  11. DEVELOPMENT DEVELOPMENT public static void Main(String[] args ) { String usr; FileStream f; StreamWriter w; try { usr=Environment.GetEnvironmentVariable("USERNAME"); f=new FileStream(“C:\\test.txt",FileMode.Create); w=new StreamWriter(f); w.WriteLine(usr); w.Close(); } catch (Exception e){ Console.WriteLine("Exception:"+e.ToString()); } } GlobalAssemblyCache (GAC) public static void Main(String[] args ) { String usr; FileStream f; StreamWriter w; try { usr=Environment.GetEnvironmentVariable("USERNAME"); f=new FileStream(“C:\\test.txt",FileMode.Create); w=new StreamWriter(f); w.WriteLine(usr); w.Close(); } catch (Exception e){ Console.WriteLine("Exception:"+e.ToString()); } } Compiler Assembly Assembly Source code C# J# VB Cobol … MSIL Metadata Resources ApplicationDirectory Download Cache Install Comment ça marche : 2.Le Déploiement DEPLOYMENT Setup Copy Browser

  12. DEVELOPMENT Assemblyon Target Machine GlobalAssemblyCache (GAC) Assembly Setup Copy Browser ApplicationDirectory Class Loader Security Assembly Loader IL to NativeCompiler Download Cache Garbage Collection Code Manager Exception Manager Native .exe + GC table Thread Support COM Interop Install Debug Engine Comment ça marche : 3. L’exécution DEPLOYMENT Policy <?xml version="1.0" encoding="utf-8" ?> <configuration> <mscorlib> <security> <policy> <PolicyLevel version="1"> <CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="Nothing" Name="All_Code" Description="Code group grants no permissions and forms the root of the code group tree."> <IMembershipCondition class="AllMembershipCondition" version="1"/> <CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" EXECUTION

  13. Interopérabilité • Interopérabilité des langages, grâce au langage intermédiaire (IL) • Interopérabilité avec COM • Interopérabilité avec Win32

  14. Standardisation • C# et CLI qui sont déposés à l'ECMA CLI (Common Language Infrastructure) est très précis quand a ce que l'on doit trouver dans le "framework " et le "runtime " et laisse champ libre sur la manière de l'implémenter • ECMA-334, C# (C sharp) Language Specification. • ECMA-335, Common Language Infrastructure, approved by the ECMA General Assembly of 13th December 2001.  • ECMA TR/84, related to Standard ECMA-335

  15. .Net FrameWork et Linux ! • Début du « portage » du framework .Net • Différents projets : • Mono par le créateur de gnome • GNU Portable DotNet • Rotor (FreeBSD)

  16. Sites Internet • http://www.gotdotnet.com • http://www.dotnetguru.org • http://www.dotnet-fr.org/ • http://msdn.microsoft.com/netframework/ • http://www.go-mono.com/ • http://www.southern-storm.com.au/

More Related