77
Persistent Systems Private Limited http://www.persistent.co.i Introduction to .NET Siddhesh Bhobe

Introduction To Dot Net Siddhesh

Embed Size (px)

DESCRIPTION

High level introduction to .NET

Citation preview

Page 1: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Introduction to .NET

Siddhesh Bhobe

Page 2: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Agenda

• What is .NET?• .NET framework and building blocks• ADO.NET• Web Services in .NET• DNA to .NET Migration

Page 3: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

What is Microsoft .NET?

From the Microsoft site:

“Microsoft .NET is Microsoft’s XML Web services platform. .NET contains all that’s needed to build and run software based on XML, the lingua franca of Internet data exchange.”

.NET includes:

1. The .NET Platform, which is a set of programming tools and infrastructure to enable the creation, deployment, management, and aggregation of XML Web services.

2. .NET experiences (applications!), which are the means for end users to interact with .NET.

Page 4: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

The .NET Platform

• NET Framework and Visual Studio .NET • Server infrastructure

– Application Center 2000; – BizTalk™ Server 2000;– Host Integration Server 2000;– Mobile Information 2001 Server; and– SQL Server™ 2000

• Building block services– They include Passport (for user identification) and services for

message delivery, file storage, user-preference management, calendar management, and other functions.

• Smart Devices– Enables PCs, laptops, workstations, smart phones, handheld

computers, Tablet PCs, game consoles, and other smart devices to operate in the .NET universe.

Page 5: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

The .NET Framework

Page 6: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

1st generation web applications

OS OS ServicesServices

Microsoft provided IIS, IE and COM

Applications largely operating in a client / server model were augmented with web browser and servers.

BrowsersBrowsersBrowsersBrowsers

Web app developers took advantage of these local services and used HTML to “project” the UI to many types of clients.

ServersServersData, HostsData, HostsServersServers

Data, HostsData, HostsUI LogicUI Logic

Biz LogicBiz Logic

Page 7: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

2nd generation of web applications

Combination of “stateless” Web protocols with DNS and IP routing have enabled mass-scale “Geo-Scalability”

““Stateful”Stateful”

““Stateless” &Stateless” &““Geo-Scalable”Geo-Scalable”

OS OS ServicesServices

Biz LogicBiz LogicTierTier

Biz LogicBiz LogicTierTierRich Client Rich Client

UI LogicUI LogicRich Client Rich Client

UI LogicUI Logic ServersServersData, HostsData, HostsServersServers

Data, HostsData, Hosts

Richer Richer BrowsersBrowsersRicher Richer

BrowsersBrowsers

Separation of data and business logic provide greater scalability and performance while accessing enterprise data.

*COM+ Services improve reliability, scalability and manageability.*DHTML for better interactivity.

Page 8: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Next Generation Applications

Richer, MoreRicher, MoreProductive UserProductive User

ExperienceExperience

Applications Become Applications Become Programmable Web ServicesProgrammable Web Services

StandardStandardBrowsersBrowsers

StandardStandardBrowsersBrowsers

SmarterSmarterClientsClients

SmarterSmarterClientsClients

SmarterSmarterDevicesDevices

SmarterSmarterDevicesDevices Open Internet Open Internet

Communications Protocols Communications Protocols (HTTP, SMTP, XML, SOAP) (HTTP, SMTP, XML, SOAP) Applications LeverageApplications Leverage

Globally-AvailableGlobally-AvailableWeb ServicesWeb Services

OS OS ServicesServices

BizBizTier LogicTier Logic

BizBizTier LogicTier LogicBiz Logic Biz Logic & & Web ServiceWeb Service

OSOSServicesServices

OSOSServicesServices

Public WebPublic WebServicesServices

Building BlockBuilding BlockServicesServices

InternalInternalServicesServices

XMLXML

XMLXML

XMLXML

ServersServersData, HostsData, Hosts

ServersServersData, HostsData, Hosts

XMLXML

OtherOther ServicesServices XMLXML

XMLXML

XMLXML

HTMLHTML

Page 9: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Development/Deployment headaches

• Non-consistent programming model• Knowledge of plumbing code• DLL management issues –’DLL HELL’• Resource management• Non-consistent error handling• Deployment issues• Security

Page 10: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Couldn’t we have this!

No “plumbing” is needed and objects can directly interactComponents are built on a “common” substrate.

Page 11: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Couldn’t we have this!

Enables shared services:GC, exception handler, security, threading, debugging…

Page 12: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Couldn’t we have this!

Common API:IO, Collections, XML, UI…

…across all languages

Page 13: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

How Much Simpler?

HWND hwndMain = CreateWindowEx( 0, "MainWClass", "Main Window", WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, (HWND)NULL, (HMENU)NULL, hInstance, NULL); ShowWindow(hwndMain, SW_SHOWDEFAULT); UpdateWindow(hwndMain);

Form form = new Form();form.Text = "Main Window";form.Show();

Windows API

.NET Framework

Page 14: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Architecture

Windows COM+ Services

Common Language Runtime

Base Class Library

ADO.NET and XML

ASP.NET Windows Forms

Common Language Specification

VB C++ C# JScript …

Visu

al Stu

dio

.NE

T

Page 15: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Common Language Runtime

VBVBSource Source codecode

CompilerCompiler

C++C++C#C#

CompilerCompilerCompilerCompiler

AssemblyAssemblyIL CodeIL Code

AssemblyAssemblyIL CodeIL Code

AssemblyAssemblyIL CodeIL Code

Operating System ServicesOperating System Services

Common Language RuntimeCommon Language Runtime

JIT CompilerJIT Compiler

Native CodeNative Code

ManagedManagedcodecode

UnmanagedUnmanagedComponentComponent

Page 16: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Compilation

Source CodeSource Code

C++, C#, VB or C++, C#, VB or any .NET any .NET languagelanguage

CompilerCompiler

AssemblyAssembly

DLL or EXEDLL or EXE

MetadataMetadataMetadataMetadata

IL IL Managed Managed

codecode

IL IL Managed Managed

codecode

ResourcesResourcesResourcesResources

myprogram.DLLmyprogram.DLL

Assembly is basic deployable unit in .NET

VS.NET

Csc.exe, vbc.exe, etc.

Page 17: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

AssembliesThe Building Block

• Deployment unit for types and resources: a “logical dll”• Self describing through a manifest• Fundamental unit of versioning, reuse, deployment and

permission grants and requests

Page 18: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

ADO.NET

Page 19: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

ADO.NET Architecture

OdbcConnection

OdbcCommand

OdbcDataAdapter

Odb cDataReader

ODBC .NET Data Provider

COM Inter op

ODBC

Page 20: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

ADO.NET

Page 21: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Making Database Connection

• Using SQL Server .NET data provider. SqlConnection connSql=new SqlConnection

("Address=dotsrv;uid=sa;pwd=sql;connect Timeout=5;");

• Using OLEDB.NET Provider to connect to Oracle OleDbConnection connOle=new OleDbConnection

("Provider=OraOLEDB.Oracle.1;Data Source=_CRUISEDB; user

id=xat;password=xat;");

• Using ODBC.NET Provider to connect to OracleOdbcConnection connODBC=new OdbcConnection

("DSN=connectOra;Server=_CRUISEDB;uid=xat;pwd=xat;");

Page 22: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.inManaged Provider

DataReader

CommandConnection

Sync

ADO and XML in the .NET Framework

Controls,Designers,

Code-gen, etc

DataSet

XmlReader

XSL/T, X-Path, etc

XmlData-Document

DataAdapter

Page 23: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

DataSet• Relational View of Data

– Tables, Columns, Rows, Constraints

– Navigate between tables using Relations• DataRow[] orders = customer.GetChildren("custOrd");

• Source-agnostic– XML, Relational, Application data

• Remotable– No knowledge of source of data– Never holds connection state– DataSet as argument to WebMethods

• Serializes as XML Schema/Data

DataSetDataSetTablesTables

TableTable

ColumnsColumnsColumnColumn

ConstrainConstraintsts ConstraintConstraintRowsRows

RowRowRelationsRelations

RelationRelation

Page 24: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Example: Reading/Writing XML

// Load DataSet with XMLDataSet ds = new DataSet();ds.ReadXml("inventory.xml");

// Add a record to the Inventory tableDataTable inventory = ds.Tables["Inventory"];DataRow row = inventory.NewRow();row["TitleID"]=1;row["Quantity"]=25;inventory.Rows.Add(row);

// Write out XMLds.WriteXml("updatedinventory.xml");

Page 25: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Example: Associating an XmlDataDocument with a DataSet

private static XmlDataDocument xmlData;

public static DataSet LoadDataSet(String schema) {DataSet ds = new DataSet();ds.ReadXmlSchema(schema);xmlData = new XmlDataDocument(ds);xmlData.Load("po.xml");return ds;

}public static void SaveChanges() {

xmlData.Save("po.xml");}

Page 26: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Example: X/Path over Relational

public static void doXml(DataSet po) {// Associate an XmlDataDocument with the DataSetXmlDataDocument xmlData = new XmlDataDocument(po);

// Do an X/Path Query XmlNodeList nodes = xmlData.SelectNodes("//Item[@qty>100]");

// Write out resultsConsole.WriteLine("Matches="+nodes.Count);foreach(XmlNode node in nodes) { DataRow row =

xmlData.GetRowFromElement((XmlElement)node); // Mark Customer for Deletion row.Delete();}

}

Page 27: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Example: XSL/T over Relational

public static void doTransform(DataSet po) {XmlDataDocument xmlData = new XmlDataDocument(po);

// Do a TransformXslTransform xsltransform = new XslTransform();xsltransform.Load("po.xsl");XmlReader xReader = xsltransform.Transform(xmlData, null);

}

Page 28: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Summary

• ADO.NET provides a model for bridging the gap between XML and Relational data– DataSet provides Relational View

• Persists/loads data as XML

• Persists/loads schema as XSD

• Serializes as XML with in-line schema

– XmlDataDocument provides an XML view• Exposes relational data to XML tools

• Exposes a relational subset of XML data

• Preserves Fidelity of XML

Page 29: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Web Services in .NET

Page 30: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Web Services are “Key” in .NET

Page 31: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Web Services Infrastructure in .NET• IIS and COM+ provides the hosting environment• APIs

– COM for implementing the business façade, business logic, and data access layers

– ADO, OLE DB, and ODBC for implementing data access to a variety of data stores

– MSXML to help construct and consume XML messages in the Web Service listener

– Active Server Pages (ASP) or ISAPI for implementing the Web Service listener

• NLBS and Clustering for scalability• IPSec, HTTP Basic authentication, Digest

authentication, Kerberos 5 authentication, NTLM authentication, or your own custom scheme.

Page 32: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

.NET Web Services Infrastructure

• Smart Clients and Devices to consume Web Services• Suite of .NET Servers, including Win 2K family and .NET

Enterprise Servers• Development Tools

– VS.NET• Single unified IDE for all languages

• Enable applications as Web Services

• Aggregate Web Services

– .NET Framework• Build, deploy and run Web Services

Page 33: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Service Description

• Uses WSDL to describe itself• Uses namespaces to uniquely identify service endpoints• Server-side component that map Web Services to COM components

using WSDL and Web Services Meta Language (WSML) description

Page 34: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Service Implementation

• Several languages running on Common Language Infrastructure: VB.NET, C#, JScript

• SOAP Toolkit for constructing, transmitting, reading and processing SOAP messages

Page 35: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Service Publishing, Discovery and Binding• Used to have DISCO for discovering Web Services• Now supports UDDI• Provides .NET UDDI server• Office XP offer support for service discovery through UDDI

Page 36: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Service Invocation and Execution

• Use of built-in .NET SOAP message classes• Construct Web Service listeners using MSXML, ASP, ISAPI etc• Use SOAP toolkit to build a Web Service listener• Client-side components for invoking Web Services

Page 37: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Creating and Consuming Web Services in VS.NET

Page 38: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Create New ASP.NET Web Service Project

Page 39: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Project and Sample Files created

Page 40: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Add New Web Service to the Project

Page 41: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

default.asmx

<%@ WebService Language="vb" Codebehind="default.asmx.vb" Class="DegreesWebService._default" %>

Page 42: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

default.asmx.vb

Page 43: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

What makes this a web service?

1. "Imports System.Web.Services" brings in the functionality needed under this class.

2. "<WebService(Namespace := "http://tempuri.org/")> _" makes this class callable from the web.

3. "Inherits System.Web.Services.WebService", makes this class inherit all the methods and properties of this class.

4. "<WebMethod()>" in front of a method makes this callable from the web.

Page 44: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Our Web Service

Page 45: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Building and testing the web service• Make sure that our starting page for the project is

the default.asmx page• Then go to Debug > Start, or press F5. VS builds

the project and pops up a web browser window with this file.

• This is simply a medium that Microsoft has provided so that we can test our Web Service.

Page 46: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Testing a web service

Page 47: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Enter Values…

Page 48: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Invoke…

Page 49: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Add Web Reference

Page 50: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Web Reference added

Page 51: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Modified default.aspx

Page 52: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Code behind

Page 54: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

DNA to .NET Migration

Page 55: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Windows NT 4/Windows 2000

Windows DNA architecture

COM

COM

COMIIS

ASPSQLSQL

Page 56: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

.NET Framework

• Common Language Runtime• Managed data and code• Unified framework library• Multiple language support

#include <stdio.h>int main() { int a[100]; for (int x=0; x<100; x++) a[x]=x*x; for (int y=0; y<100; y++) a[y] = y*y; return 0;}

#include <stdio.h>int main() { int a[100]; for (int x=0; x<100; x++) a[x]=x*x; for (int y=0; y<100; y++) a[y] = y*y; return 0;}

#include <stdio.h>int main() { int a[100]; for (int x=0; x<100; x++) a[x]=x*x; for (int y=0; y<100; y++) a[y] = y*y; return 0;}

#include <stdio.h>int main() { int a[100]; for (int x=0; x<100; x++) a[x]=x*x; for (int y=0; y<100; y++) a[y] = y*y; return 0;}

#include <stdio.h>int main() { int a[100]; for (int x=0; x<100; x++) a[x]=x*x; for (int y=0; y<100; y++) a[y] = y*y; return 0;}

#include <stdio.h>int main() { int a[100]; for (int x=0; x<100; x++) a[x]=x*x; for (int y=0; y<100; y++) a[y] = y*y; return 0;}

VB

C#

COBOL

0010 1100 0101 10101100 0011 1111 0101 1010 0101 0000 00001000 1011 0101 00001111 1100 0100 11010101 1010 1100 0011

0010 1100 0101 10101100 0011 1111 0101 1010 0101 0000 00001000 1011 0101 00001111 1100 0100 11010101 1010 1100 0011

MSILMSIL

CLRCLR

Page 57: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

DNA to .NET mappings

• Presentation tier mapping– Web Tier - ASP to ASP.NET– Rich client – Win32API to WinForms

• Middle tier mapping– Components – COM to .NET– Connectivity – DCOM to CLR Remoting– Connectivity – ADO to ADO.NET

• Language mapping– VB6 to VB.NET– C++ to C#

Page 58: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Presentation tier mapping

• ASP to ASP.NET

ASP ASP.NET

Interpreted code Compiled code

Inline code/presentation Separate code behind

VBScript and JavaScript VB.NET, C#, COBOL.NET, …

User managed session state Built in session state

Access to limited API Access to entire Framework

Registration required to deploy site Simple xcopy or FTP upload can handle deployment

Changes require web server restart or OS reboot

Config changes are automatically detected and applied

Page 59: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Migration issues

• ASP.NET requires IIS5• No migration tools available from ASP to ASP.NET• ASP and ASP.NET co-exist

– Application/Session variables not shared– Global.asa vs. Global.asax

Page 60: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Rich Client Migration

• Existing frameworks– C++/MFC library– Visual BASIC UI

• .NET “Smart” client– Unified Windows Form– RAD environment

• Migration– VB to VB.NET Wizard– No migration from MFC to WinFrom

Page 61: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Recommendations

• C++– C++/MFC/ALT does not have a migration wizard. – Managed extension and new web service consumer capabilities

can be used

• VB– Upgrade wizard converts most of the code– Watch out for unsupported features like Dynamic Data Exchange,

OLE Containers etc.

Page 62: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Rich client benefits

• Managed code makes application more robust• Utilizes unified framework libraries across languages• Inherent support for ADO.NET and web services

Page 63: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Middle tier components

• COM Component– 2 levels of support - VB and C++/ATL– Registry complexities

• .NET Component– Multiple language support – CLR– Self contained – no dependencies

• Migration– Source level migration – VB.NET– Backward and forward compatibility between COM and .NET

Page 64: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

DCOM Migration

• DCOM – Proprietary protocol– Is not internet friendly

• .NET Remoting– Based on standard protocol– Completely flexible and configurable– Supports multiple invocation mechanism

• Migration– .NET uses DCOM protocol for backward compatibility

Page 65: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

ADO to ADO.NET

• ADO– COM based connectivity model– Specification for interpreted environment– Always connected scenario

• ADO.NET– Common specs for .NET– XML based dataset model– Disconnected scenario

• Migration– Backward compatibility to ADO– ADO and ADO.NET can co-exist

Page 66: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Language Migration

• VB to VB.NET– Wizard based– Developer review required

• C++ to C++.NET– Managed extension– Native + managed code– No wizard migration

• C++ to C#– Complete rewrite required– Fully Managed code– Unsafe option

Page 67: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Migration strategies

• Partial web front migration– Migrating Web front end while retaining business logic component

• Rich client migration– Migrating Rich client to WinForms while retaining DCOM

compatibilities

• Language level migration– Using available wizards to migrate to .NET component from COM

components

Page 68: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Partial web front migration

COM

COM

COM

IIS

ASP

IIS

ASP

• Retain COM components• Upgrade ASP to ASP.NET• COM interop performance penalty

Page 69: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Rich client migration

Win32 App

.NET Winfrom

COM

COM

COM

• Retain COM components• UpgradeWin32 to Winform• COM interop performance penalty

Page 70: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

COM to .NET migration

COM

.NET

VB to VB.NET Wizard migration

C++ to managed C++.NET

Manual C++ to C# rewrite

• Migrate business logic• Partial or complete rewrite• Increased testing/debugging cycle

Page 71: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Another way to look at it…

COM

COM

COM

VB6 Front End

Component Access

Page 72: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Expose Your COM Components …

COM

COM

COM

SOAP

External Apps

VB 6

Web Service

Page 73: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Convert Front End …

COM

COM

COM

SOAP

VB 6

VB.NET

VB 6

COM Interop

Upgrade Tool

Web Service

External Apps

Page 74: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Convert COM to .NET …

.NET .NET .NET

COM

COM

COM

VB.NET Migration Tool

Page 75: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Convert Fully …

VB.NET

VB 6

.NET Interop

Web Service

External Apps

.NET .NET .NET

Page 76: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Migration Notes

• ASP.NET give huge performance improvements over ASP

• Managed code (Winform, BL Components) are more robust then Win32/COM

• Everything need not be migrated at once• Migration can be carried out in phases• Post migration, application can be extended for different

interface e.g. Mobile forms, web service, compact framework etc.

Page 77: Introduction To Dot Net Siddhesh

Persistent Systems Private Limitedhttp://www.persistent.co.in

Useful Links

http://www.microsoft.com/nethttp://www.gotdotnet.com

http://www.sharpdevelop.orghttp://www.go-mono.com

http://www.icsharpcode.net

http://www.ecma.ch (C# & CLI standard)

http://www.dotnet247.com/