Introduction To Dot Net Siddhesh - Presentation Transcript
Introduction to .NET Siddhesh Bhobe
Agenda
What is .NET?
.NET framework and building blocks
ADO.NET
Web Services in .NET
DNA to .NET Migration
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:
The .NET Platform , which is a set of programming tools and infrastructure to enable the creation, deployment, management, and aggregation of XML Web services.
.NET experiences (applications!) , which are the means for end users to interact with .NET.
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.
The .NET Framework
1 st generation web applications OS Services Microsoft provided IIS, IE and COM Applications largely operating in a client / server model were augmented with web browser and servers. Browsers Web app developers took advantage of these local services and used HTML to “project” the UI to many types of clients. Servers Data, Hosts UI Logic Biz Logic
2 nd generation of web applications Combination of “stateless” Web protocols with DNS and IP routing have enabled mass-scale “Geo-Scalability” “ Stateful” “ Stateless” & “ Geo-Scalable” OS Services Biz Logic Tier Rich Client UI Logic Servers Data, Hosts Richer Browsers 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.
Next Generation Applications Richer, More Productive User Experience Applications Become Programmable Web Services Standard Browsers Open Internet Communications Protocols (HTTP, SMTP, XML, SOAP) Applications Leverage Globally-Available Web Services Smarter Clients Smarter Devices OS Services Biz Tier Logic Biz Logic & Web Service OS Services Public Web Services Building Block Services Internal Services XML XML XML Servers Data, Hosts XML Other Services XML XML XML HTML
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
Couldn’t we have this! No “plumbing” is needed and objects can directly interact Components are built on a “common” substrate.
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
Architecture Visual Studio.NET Windows COM+ Services Common Language Runtime Base Class Library ADO.NET and XML ASP.NET Windows Forms Common Language Specification VB C++ C# JScript …
Common Language Runtime VB Source code Compiler C++ C# Compiler Compiler Assembly IL Code Assembly IL Code Assembly IL Code Operating System Services Common Language Runtime JIT Compiler Native Code Managed code Unmanaged Component
Compilation Source Code C++, C#, VB or any .NET language Metadata IL Managed code Resources myprogram.DLL Assembly is basic deployable unit in .NET VS.NET Csc.exe, vbc.exe, etc. Compiler Assembly DLL or EXE
Assemblies The 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
ADO.NET
ADO.NET Architecture OdbcConnection OdbcCommand OdbcDataAdapte r Odb cDataReader ODBC .NET Data Provider COM Inter op ODBC
Windows DNA architecture Windows NT 4/Windows 2000 COM COM COM IIS ASP SQL
.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; } 0010 1100 0101 1010 1100 0011 1111 0101 1010 0101 0000 0000 1000 1011 0101 0000 1111 1100 0100 1101 0101 1010 1100 0011 MSIL CLR VB C# COBOL
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#
Presentation tier mapping
ASP to ASP.NET
Separate code behind Inline code/presentation Config changes are automatically detected and applied Changes require web server restart or OS reboot Simple xcopy or FTP upload can handle deployment Registration required to deploy site Access to entire Framework Access to limited API Built in session state User managed session state VB.NET, C#, COBOL.NET, … VBScript and JavaScript Compiled code Interpreted code ASP.NET ASP
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
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
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.
Rich client benefits
Managed code makes application more robust
Utilizes unified framework libraries across languages
Inherent support for ADO.NET and web services
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
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
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
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
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
Partial web front migration
Retain COM components
Upgrade ASP to ASP.NET
COM interop performance penalty
COM COM COM IIS ASP IIS ASP
Rich client migration
Retain COM components
UpgradeWin32 to Winform
COM interop performance penalty
Win32 App .NET Winfrom COM COM COM
COM to .NET migration
Migrate business logic
Partial or complete rewrite
Increased testing/debugging cycle
VB to VB.NET Wizard migration C++ to managed C++.NET Manual C++ to C# rewrite COM .NET
Another way to look at it… VB6 Front End Component Access COM COM COM
Expose Your COM Components … External Apps VB 6 Web Service COM COM COM SOAP
Convert Front End … VB 6 VB.NET VB 6 COM Interop Upgrade Tool Web Service External Apps COM COM COM SOAP
Convert COM to .NET … VB.NET Migration Tool .NET .NET .NET COM COM COM
Convert Fully … VB.NET VB 6 .NET Interop Web Service External Apps .NET .NET .NET
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.
0 comments
Post a comment