1 / 38

A Programmer’s view on .NET

A Programmer’s view on .NET. Three Pillars of .NET. Many devices/ Languages. XML Web Services. Simpler programming model. The Marketeer’s Toolbox. Price Axe. Product Wrench. Competition Hammer. The Programmer’s Toolbox. C# Bricks. COBOL Pictures. Perl Duct Tape. Haskell Super Glue.

chynna
Télécharger la présentation

A Programmer’s view on .NET

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. A Programmer’s view on .NET

  2. Three Pillars of .NET Many devices/Languages XML WebServices Simpler programming model

  3. The Marketeer’s Toolbox PriceAxe ProductWrench CompetitionHammer

  4. The Programmer’s Toolbox C# Bricks COBOL Pictures PerlDuct Tape HaskellSuper Glue

  5. Machine Dependent dumpbin /disasm user32.dll

  6. Libraries Libraries Libraries Runtime Runtime Runtime Intel PPC 6502 Building a Compiler Haskell

  7. Intel PPC 6502 Building a Compiler Haskell Libraries Runtime Intermediate Language

  8. Building a Compiler Haskell Perl Pascal Libraries Llibraries Libraries Intermediate Language Runtime IntermediateLanguage Runtime Intermediate Language Runtime Intel PPC 6502 Intel PPC 6502 Intel PPC 6502

  9. Runtime Runtime Runtime Libraries Libraries Libraries Building a Compiler Haskell Perl Pascal Libraries MSIL Runtime Intel PPC 6502

  10. VisualStudio.net • "Drag and Drop" Web services development • Fully supports .NET Framework • Multi-language support • Open, extensible development environment • Easy to plug in new languages (Babel)

  11. Three Pillars of .NET WebServices Many Devices/Languages Simpler Programming Model

  12. CORBA and DCOM are not compatible. CORBAimplementations are not compatible. locationtransparencydoes not holdon the Web. CORBA and DCOM are connection oriented, doesn’t scale well Distributed Systems CORBA DCOM CORBA DCOM CORBA DCOM CORBA CORBA

  13. ASP ??????? HTTP protocol <html>…</html>

  14. XML Webservices Webservice Webservice Webservice Webservice

  15. Orchestration Webservice Webservice

  16. Enterprise Servers • Functionality for development and management of .NET services: • Application Center 2000: • Reliability and scalability • Internet Security & Acceleration Server: • Firewall and proxy server • Commerce Server: • Analyzing site usage • BizTalk Server 2000: • Business process orchestration and business-to-business document interchange using XML

  17. Enterprise Servers • SQL Server 2000: • Easy-to-use database systems with native Extensible Markup Language (XML) support • Host Integration Server 2000: • Integration with host systems and their data • Mobile Information 2001 Server: • Integration with mobile devices

  18. Three Pillars of .NET WebServices Many Devices/Languages Simpler Programming Model

  19. IDL ……void _OldSysKind();short MajorVersion();short MinorVersion();short AttributeMask();short AttributeStrings([out] SAFEARRAY(BSTR)* AttributeArray);CoClasses* CoClasses();Interfaces* Interfaces(); Constants* Constants();Declarations* Declarations();short TypeInfoCount();void _OldGetTypeKind();TypeInfo* GetTypeInfo([in] VARIANT* Index);short GetTypeInfoNumber([in] BSTR Name);VARIANT_BOOL IsSameLibrary([in] TypeLibInfo* CheckLib); ….

  20. VC++ 6 #import “Bar.dll”main (){ IFoo *b; CoInitialize(NULL); CoCreateInstance (__uuidof(Bar), NULL, CLSCTX_SERVER, __uuidof(IFoo), (void **) &b); ………… ………… ………… ………… }

  21. C# using Bar;void Main (){ IFoo b = new Bar(); ………… ………… ………… }

  22. Don’t Try This at Home!

  23. DLL Hell New App X.dll Version 2000

  24. An old bug is reintroduced, or new functions are now unavailable. Replacing Newer Version with Older Version New App Old App X.dll Version 2000 X.dll Version 1949

  25. Implementation relied on “feature” removed in new version. X.dll Version 1949 X.dll Version 2001 Other App Replacing Older Version with Newer Version New App Old App

  26. WFP • When a new DLL installed, W2K checks whether the changed DLL was protected. • If the new DLL doesn't have a valid signature, W2K restores the original DLL from winnt\system32\dllcache.

  27. Side-By-Side Versioning

  28. Holy Grail of Software Reuse Before COM/DLLs, applications were completely separate entities with little or no integration. Before COM/DLLs, applications were completely separate entities with little or no integration.

  29. Holy Grail of Software Reuse COM provides a way for components to integrate. However, each component must provide the “plumbing,” and objects cannot directly interact. COM provides a way for components to integrate. However, each component must provide the “plumbing,” and objects cannot directly interact.

  30. Type Incompatibilities Visual Basic String C++ char array

  31. You have to encode “implementation inheritance” explicitly using aggregation. You have to encode “implementation inheritance” explicitly using aggregation. No Reuse of Implementation

  32. Concurrency • Concurrency controlis not built-in (that is, coclasses do not havea classwide lock). • Instead it has several sorts of“apartments”:MTA, STA, FTA Thread 1 Thread 2

  33. With the .NET Framework common language runtime, components are built on a common substrate. No “plumbing” is needed, and objects can directly interact. With the .NET Framework common language runtime, components are built on a common substrate. No “plumbing” is needed and objects can directly interact Deep Integration

  34. Breeding Dogs using System;namespace VirtualDog { public class Dog { public virtual void RollOver () { Console.WriteLine("Scratch my tummy."); Bark(); } public virtual void Bark () { Console.WriteLine("WOOF WOOF (Dog)"); } }} Thanks, Roger Sessions!

  35. Breeding Dogs Imports SystemNamespace VirtualDog Public Class Mopje : Inherits Dog Public overrides Sub Bark () Console.WriteLine("WOEF WOEF (Mopje)") End Sub End ClassEnd Namespace

  36. Breeding Dogs Breeding Dogs import VirtualDog;var d = new Dog();var m = new Mopje();d.RollOver();m.RollOver();

  37. Software Landscape • Business model will change to includeselling services and subscriptions andsupporting non-Windows platforms.

  38. .NET Advantages • Thanks to the CLI we have: • Cross-language implementation inheritance • Cross-language exception handling • Cross-language threading • Cross-language debugging • ASP.Net pages in any language • XML Webservices in any language • Third Party Languages include: • COBOL, Pascal, Oberon, APL, Fortran, … • Mondrian, Haskell, Mercury, Eiffel, …

More Related