A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET...

38
A Programmer’s view on .NET

Transcript of A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET...

Page 1: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

AProgrammer’sview on .NET

Page 2: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

Simplerprogramming

model

XML WebServices

Manydevices/

Languages

Three Pillars of .NET

Page 3: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

ProductWrench

PriceAxe

CompetitionHammer

The Marketeer’s Toolbox

Page 4: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

C# Bricks

HaskellSuper Glue

COBOL Pictures

PerlDuct Tape

The Programmer’s Toolbox

Page 5: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

dumpbin /disasm user32.dll

Machine Dependent

Page 6: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

Haskell

Intel PPC 6502Runtime

LibrariesRuntime

LibrariesRuntime

Libraries

Building a Compiler

Page 7: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

LibrariesHaskell

Intel PPC 6502

Intermediate Language Runtime

Building a Compiler

Page 8: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

Haskell

Intel PPC 6502

Intermediate Language

Libraries

Perl

Intel PPC 6502

Intermediate Language

Llibraries

Pascal

Intel PPC 6502

Intermediate Language

Libraries

Building a Compiler

Runtime RuntimeRuntime

Page 9: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

Haskell

Intel PPC 6502

MSIL Runtime

Libraries

Perl Pascal

RuntimeLibraries

RuntimeLibraries

RuntimeLibraries

Building a Compiler

Page 10: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

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)

Page 11: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

Three Pillars of .NET

SimplerProgramming

Model

WebServices

ManyDevices/

Languages

Page 12: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

DCOM

DCOM

DCOM

CORBA

CORBA

CORBA

CORBA

CORBA

Distributed Systems

CORBA andDCOM are not

compatible.

CORBAimplementations

are notcompatible.

locationtransparencydoes not holdon the Web.

CORBA and DCOM are connection oriented,

doesn’t scale well

Page 13: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

HTTP protocol

ASP <html>…</html>

???????

Page 14: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

Webservice

Webservice

Webservice

Webservice

XML Webservices

Page 15: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

Webservice

Orchestration

Webservice

Page 16: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

Enterprise Servers

Functionality for development and managementof .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

Page 17: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

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

Page 18: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

SimplerProgramming

Model

WebServices

ManyDevices/

Languages

Three Pillars of .NET

Page 19: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

……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);….

IDL

Page 20: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

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

VC++ 6

Page 21: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

using Bar;

void Main (){ IFoo b = new Bar(); ………… ………… …………}

C#

Page 22: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

Don’t Try This at Home!

Page 23: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

New App

DLL Hell

X.dllVersion 2000

Page 24: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

X.dllVersion 2000

New App Old App

X.dllVersion 1949

Replacing Newer Versionwith Older Version

An old bug is reintroduced, or new functions are now

unavailable.

Page 25: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

Replacing Older Versionwith Newer Version

New App Old App

Implementation relied on “feature” removed in

new version.

Other AppX.dll

Version 1949X.dll

Version 2001

Page 26: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

WFP

When a new DLL installed, W2K checks whetherthe changed DLL was protected.

If the new DLL doesn't have a valid signature,W2K restores the original DLL fromwinnt\system32\dllcache.

Page 27: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

Side-By-Side Versioning

Page 28: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

Before COM/DLLs, applicationswere completely separate entities

with little or no integration.

Holy Grail ofSoftware Reuse

Before COM/DLLs, applicationswere completely separate entities

with little or no integration.

Page 29: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

COM provides a way forcomponents to integrate.

However, each component mustprovide the “plumbing,” and

objects cannot directly interact.

Holy Grail ofSoftware Reuse

COM provides a way forcomponents to integrate.

However, each component mustprovide the “plumbing,” and

objects cannot directly interact.

Page 30: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

Visual Basic String

C++ char array

Type Incompatibilities

Page 31: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

You have to encode“implementation

inheritance” explicitlyusing aggregation.

You have to encode“implementation

inheritance” explicitlyusing aggregation.

No Reuse of Implementation

Page 32: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

Thread 2

Thread 1

Concurrency

Concurrency controlis not built-in (that is,coclasses do not havea classwide lock).

Instead it hasseveral sorts of“apartments”:MTA, STA, FTA

Page 33: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

With the .NET Framework commonlanguage runtime, components arebuilt on a common substrate. No

“plumbing” is needed and objectscan directly interact

With the .NET Framework commonlanguage runtime, components arebuilt on a common substrate. No

“plumbing” is needed, and objectscan directly interact.

Deep Integration

Page 34: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

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)"); } }}

Breeding Dogs

Thanks, RogerSessions!

Page 35: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

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

Breeding Dogs

Page 36: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

import VirtualDog;

var d = new Dog();var m = new Mopje();

d.RollOver();m.RollOver();

Breeding DogsBreeding Dogs

Page 37: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

Software Landscape

Business model will change to includeselling services and subscriptions andsupporting non-Windows platforms.

Page 38: A Programmer’s view on · Enterprise Servers Functionality for development and management of .NET services: Application Center 2000: Reliability and scalability Internet Security

.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, …