1 / 24

Nguyen Tuan Loc 10/04

™. Microsoft .NET & Langage Intermédiaire du Web (C#). Nguyen Tuan Loc 10/04. Contenu. 1) Microsoft.NET .NET et Framework.NET .NET et les langages supportés Mécanisme de fonctionnement de .NET Installation .NET 2) C# et C++ Présentation C# Comment ça marche C# ?

ailani
Download Presentation

Nguyen Tuan Loc 10/04

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. Microsoft .NET & Langage Intermédiaire du Web (C#) Nguyen Tuan Loc 10/04

  2. Contenu • 1) Microsoft.NET • .NET et Framework.NET • .NET et les langages supportés • Mécanisme de fonctionnement de .NET • Installation .NET • 2) C# et C++ • Présentation C# • Comment ça marche C# ? • Pourquoi choisir C# ? • Comparaison entre C# et C++ • Avantages • Similaire • Inconvénients • 3) Perspective & conclusion

  3. Présentation .NET & .NET Framework • Microsoft propose 4 langages • C#, C++,VB.NET,ASP.NET dont C# est le premier recommandé par Microsoft • Autres langages supportés • Perl, Cobol, Eiffel, J#, Oberon,Component Pascal, Python, Smalltalk

  4. .NET & CLR Common Language Runtime

  5. souris .vb chien.pl chat .cs Exemple : souris MSIL chat MSIL chienMSIL CLR deployment Windows Linux (?) JIT JIT Architectures intelligentes Microsoft Framework.NET • Intelligence : • -Intégration, • -Réutilisation, • -Interopérabilité. 7/32 MSIL : Langage Intermédiaire de Microsoft CLR : Common Runtime Language JIT : Machine virtuelle de Microsoft

  6. CLR : Common Language Runtime JIT : Just in Time (2eme compilateur) Windows Linux (?) JIT JIT Mécanisme de fonctionnement de MS.NET chien .vb souris .pl chat .cs chien MSIL chat MSIL souris MSIL CLR : moteur exécution en langage commun déploiement

  7. Assemblage de composants Prix Prix minimum Prix d’interfaces Prix de composants Nombre de composants J J c C VB Bonne conception ?

  8. Résumé • Architectures intelligentes de .NET : • Rapidité, qualité : l’intelligence se trouve dans la logique de services, pas dans letraitement de services. • Ouvertes dans un monde « fermé » :l’implémentation propriétaire (.Net sur Linux?).

  9. Installation Microsoft.NET • Que faut-il avoir pour une application .NET tourne ? • Windows OS (XP n’a pas besoin) • Windows 2000 recommandé • ou Microsoft .NET SDK (30 mb) • http://msdn.microsoft.com/netframework • Editeur de texte (notepad) ou Visual Studio.NET (option) (10 licences déjà dans l’équipe TDD, 3 utilisées) • La production avec Perl : Visual Perl de ActiveState (partenaire .Net de Microsoft) (495 $) (option)

  10. Qu’est-ce c’est C# ? • Langage proposé par Microsoft, standardisé par ECMA, ressemble la syntaxe de Java • Langage orienté objet • Une partie évolue vers langage orienté et langage de programmation de component • Dérivé de C++ • MFC est remplacée par librairie .NET Framework • Combinaison entre la force de C++ et la simplicité de Visual Basic • Cross Plate-forme • Cross Langage

  11. C# : comment ça marche ? • C# Just in Time Compiler .cs ‘.exe’ ‘.dll’ Code natif (selon OS) JIT Code source Microsoft Intermediate Language (MSIL) CLS ‘Règle de tranformation en .NET’ CLR Common Runtime Language

  12. C# versus C++ Pourquoi choisir C# ? • Avantages C# • Plus ouvert • Interopérabilité dans le futur avec Framework .Net (Windows, »Linux,Unix ») • Supporter XML (standard de l’Internet W3c) • Composant.Net (complexité, time to market, plug and play) • Inconvénients C# • Apprendre nouveau concept de base (.Net) • Apprendre nouveau langage (temps d’estimation environ 4 semaine)

  13. Avantages C# • Peu de pointeur • Conversion automatique (boxing) • list.Add(1); • list.Add(13.12); • Versioning • C# demande le développer de clarifier la création de la version librairie créée. • Utilise le keyword ‘new’ et ‘override • Utiliser la librairie de framework .NET • Threading, Collection, XML, ADO+, ASP+, GDI+ & WinForms libraries

  14. Avantages C# • C# élimine header .h • C# non pointeur (très limité). • C# est un langage objet orienté pur avec tous les objets et types dérivés de la classe Object. • Codé géré (pas besoin de ‘’free’’ et ‘’delete’’) -> plus de paniques MFC(CString, string) en COM,VB(_bstr, BSTR) !-> classe Systeme CLR remplacée. • Plus détails : • http://msdn.microsoft.com/library/default.asp?url=/library/enus/cscon/html/vclrfcomparisonbetweenccsharp.asp

  15. Similaire C++ et C# • Keywords similaires (dérive de C++) • Classe hiérarchie par arbre avec un Root • Machine virtuelle & IL/CLR • Garbage Collection • Pas de méthode globale • Pas d’inhérence Multiple

  16. Inconvénients de C# • Technologie Windows 100%, porter Framework sur Linux “à voir” (projet Mono) • .NET et C# sont des "standards ouverts" ne signifie pas nécessairement des "environnements ouverts". (IBM-ZDNet) • La première fois est lente (à cause de compilateur 2-time) • Les tests du produit non extensifs (large utilisé par communauté des utilisateurs) • Trop nouveau, vient d’être soumis et accepté par ECMA

  17. .NET et perspective • Orienté vers l’évolution de l’Internet et les Web Services • Perspective : • .NET est une architecture ouverte Et Pourquoi ?

  18. XML, C# et .NET : Source Microsoft DevDay 2003

  19. Web Services Win.NET, 200x Internet1997 Windows1990 .NET,C# PC1981 Visual Studio 6 Visual Tools Microcomputer1975 Quick Languages Basic Interpreter Evolution

  20. Web services PC Web browser Web browser HTTP/HTML HTTP/HTML Data echange XML/SOAP Web server Web services Web server Databases PC Person to person (C2C) Application to application (B2B) Application to person (B2C) Application to person (B2C) Architecture 2-tiers Architecture “n-tiers” Architecture 1-tiers Architecture 2-tiers Evolution de l’architecture C# et .NET: orientation tothe Internet evolution

  21. .NET et perspective • Boîte blanche Utiliser le code monolithique dans programme • Boîte noire Assembler les codes compilés dans un programme • Boîte grise (.NET et autres langages) Entre boîte noir et boîte noir plus interface de wrapping

  22. .NET conclusion • Solution pour résoudre 3 problèmes de base: • Intégration • Réutilisation • Interopérabilité • Supporter SOAP, XML -> Nouveau standard de l’industrie

  23. C# conclusion • C# = Power C++ + Simplicity Visual Basic + Interoperability Java • C# = Langage ouvert et du futur

  24. Références • NET Framework SDK (includes C# compiler) • http://msdn.microsoft.com/netframework • http://www.gotdotnet.com • ECMA C# Standard http://www.ecma.ch/ecma1/stand/ecma-334.htm • Microsoft Visual C# .NET • http://msdn.microsoft.com/vcsharp • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cscon/html/vcoricstartpage.asp • http://www.csharphelp.com/ • http://msdn.microsoft.com/msdnmag/issues/01/07/ctocsharp/ctocsharp.asp • http://windows.oreilly.com/news/hejlsberg_0800.html • http://msdn.microsoft.com/msdnmag/issues/0900/csharp/default.aspx • Microsost.NET, C#, groupes françaises : • http://www.dotnet-fr.org • http://www.c2i.fr

More Related