How to Move to Visual Basic ®  .NET Microsoft ®  Corporation Joe Healy / Dan Sandlin
Thank you to our Partners!
Thank you to our Partner!
Session Prerequisites <ul><li>Knowledge of at least one of the following languages: Visual Basic ®  .NET, C#, C++, or Visu...
Getting Started with .NET  .NET Framework Design Goals <ul><li>Consistent object-oriented environment to execute local, In...
Getting Started with .NET Framework, Languages, and Tools <ul><li>Visual Studio .NET </li></ul><ul><ul><li>RAD environment...
Getting Started with .NET  .NET Framework Benefits <ul><li>Dramatically simplifies development and deployment </li></ul><u...
Getting Started with .NET .NET Framework Benefits <ul><li>Common type system </li></ul><ul><ul><li>Common instance and typ...
Getting Started with .NET  .NET Framework Benefits <ul><li>Completely eliminates COM plumbing </li></ul><ul><li>No more… <...
Language Differences What's New <ul><li>Visual Basic 6 vs. Visual Basic .NET </li></ul><ul><li>Visual Basic Runtime </li><...
Language Differences Visual Basic 6 vs. Visual Basic .NET <ul><li>Yes, it’s different from Visual Basic 6 </li></ul><ul><l...
Language Differences Visual Basic 6 vs. Visual Basic .NET <ul><li>Visual Basic is a first class .NET Language </li></ul><u...
Language Differences Visual Basic 6 Compatibility <ul><li>Visual Basic compatibility library </li></ul><ul><ul><li>Part of...
Demonstration 1 Key Visual Basic .NET Benefits   Structure Exception Handling Tracing  Inheritance
Upgrading Applications Upgrade Wizard Form layout ActiveX controls ADO data binding Code Syntax changes COM libraries RES ...
Upgrading Applications Upgrade Completion <ul><li>Visual Basic .NET project </li></ul><ul><li>Upgrade Wizard will list: </...
Demonstration 2 Using the Upgrade Wizard   Upgrade Visual Basic 6 Forms to Visual Basic .NET Windows Form
Code Advisor <ul><li>VB6 Add-in </li></ul><ul><li>Scan your Visual Basic 6.0 projects to ensure they meet predetermined co...
Demonstration 3 Using the VB6 Code Advisor
Snippet Migration <ul><li>VS.NET 2003 (Everett) has an inplace upgrade advisor </li></ul><ul><li>Useful if you’re moving i...
Demonstration 4 Using the VS.NET 2003 Snippet Upgrader
ADO to ADO.NET <ul><li>What is ADO? </li></ul><ul><ul><li>ActiveX data objects </li></ul></ul><ul><ul><li>COM-based </li><...
ADO to ADO.NET <ul><li>What is ADO.NET? </li></ul><ul><ul><li>Native .NET components </li></ul></ul><ul><ul><li>Variety of...
ADO to ADO.NET <ul><li>Does ADO still work in Visual Basic .NET? </li></ul><ul><ul><li>Yes, ADO code works </li></ul></ul>...
ADO to ADO.NET <ul><li>ADO.NET Overview </li></ul><ul><ul><li>Connected </li></ul></ul><ul><ul><ul><li>Connection, command...
ADO to ADO.NET <ul><li>Data providers </li></ul><ul><ul><li>Part of connected layer </li></ul></ul><ul><ul><li>SQL Server ...
ADO to ADO.NET  Connected Layer <ul><li>Connection object </li></ul><ul><ul><li>Very similar to ADO’s connection object </...
ADO to ADO.NET Disconnected Layer <ul><li>DataSet </li></ul><ul><ul><li>In-memory representation of database </li></ul></u...
Demonstration 5 Upgrading ADO to ADO.NET   ADO Recordset with Visual Basic .NET Controls ADO Recordset with ADO.NET Data B...
Deployment Demo 6.0 <ul><li>Build a simple winform </li></ul><ul><li>Have it consume a web service at  http://localhost/de...
Deployment Smart Clients <ul><li>Considerations </li></ul><ul><li>New option </li></ul><ul><li>No-Touch </li></ul><ul><li>...
Deployment Considerations <ul><li>System impact </li></ul><ul><ul><li>Will the install of application 1 break application ...
Deployment Considerations <ul><li>Problem to Solve: </li></ul><ul><ul><li>Avoid the application install all together </li>...
Deployment Considerations <ul><li>Applications are isolated </li></ul><ul><ul><li>Private deployment by default </li></ul>...
Deployment New Options <ul><li>No-touch deployment </li></ul><ul><ul><li>Application isolation is the default </li></ul></...
Deployment New Options MyApp.exe Web Server Internet  Explorer Download  Cache Client App .NET  Framework Managed  Exe? My...
Deployment No-Touch <ul><li>URL-launched executable </li></ul><ul><li>No installation, automatic update </li></ul><ul><ul>...
Deployment No-Touch <ul><li>Small local executable </li></ul><ul><li>Load assemblies from a Web server </li></ul><ul><ul><...
Deployment No-Touch <ul><li>Stored in the download cache </li></ul><ul><ul><li>NOT the GAC! </li></ul></ul><ul><li>Layer “...
Deployment Security <ul><li>Semi-trusted applications </li></ul><ul><ul><li>Security based on where the application  comes...
Demonstration 6.1 No-Touch Deployment   URL Launched Executable Load Another Assembly
Thank you to our Partner!
Thank you to our Partners!
Upcoming SlideShare
Loading in...5
×

How to Move to Visual Basic .NET

4,947

Published on

How to Move to Visual Basic .NET

Published in: Business, Technology
1 Comment
6 Likes
Statistics
Notes
  • Inventory Management System Source Code
    http://www.inventoryinvbdotnet.blogspot.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
4,947
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
1
Likes
6
Embeds 0
No embeds

No notes for slide
  • KEY MESSAGE: Welcome to How-to Move to Visual Basic .NET Part I SLIDE BUILDS: None SLIDE SCRIPT: Hello and Welcome to this MSDN session on how-to Move to Visual Basic .NET Part I. My name is {insert name} SLIDE TRANSITION: Take a look at what you will cover. ADDITIONAL INFORMATION FOR PRESENTER:
  • How to Move to Visual Basic .NET

    1. 1. How to Move to Visual Basic ® .NET Microsoft ® Corporation Joe Healy / Dan Sandlin
    2. 2. Thank you to our Partners!
    3. 3. Thank you to our Partner!
    4. 4. Session Prerequisites <ul><li>Knowledge of at least one of the following languages: Visual Basic ® .NET, C#, C++, or Visual Basic 6 </li></ul><ul><li>Minimal understanding of the differences between Visual Basic 6 and Visual Basic .NET </li></ul>
    5. 5. Getting Started with .NET .NET Framework Design Goals <ul><li>Consistent object-oriented environment to execute local, Internet-distributed, or remote object code </li></ul><ul><li>Minimize deployment and version conflicts </li></ul><ul><li>Provide secure execution of code </li></ul><ul><li>Eliminate performance problems of scripted or interpreted environments </li></ul><ul><li>Common developer experience for Windows-based and Web-based applications </li></ul><ul><li>Communicate based on industry standards </li></ul>
    6. 6. Getting Started with .NET Framework, Languages, and Tools <ul><li>Visual Studio .NET </li></ul><ul><ul><li>RAD environment </li></ul></ul><ul><ul><ul><li>Multiple project types </li></ul></ul></ul><ul><ul><ul><li>Wizards </li></ul></ul></ul><ul><ul><li>Unified IDE </li></ul></ul><ul><ul><ul><li>Solution Explorer </li></ul></ul></ul><ul><ul><ul><li>Tool Box </li></ul></ul></ul><ul><ul><ul><li>Debugger </li></ul></ul></ul><ul><ul><ul><li>Dynamic Help </li></ul></ul></ul><ul><ul><li>Compiler </li></ul></ul>
    7. 7. Getting Started with .NET .NET Framework Benefits <ul><li>Dramatically simplifies development and deployment </li></ul><ul><li>Unifies programming models </li></ul><ul><li>Provides robust and secure execution environment </li></ul><ul><li>Supports multiple programming languages </li></ul>
    8. 8. Getting Started with .NET .NET Framework Benefits <ul><li>Common type system </li></ul><ul><ul><li>Common instance and type definition </li></ul></ul><ul><li>Enables clean OO programming </li></ul><ul><ul><li>Classes and interfaces </li></ul></ul><ul><ul><li>Constructors, properties, methods, events </li></ul></ul><ul><ul><li>Cross language inheritance </li></ul></ul><ul><li>Built-in interoperability </li></ul><ul><ul><li>With COM </li></ul></ul><ul><ul><li>With native (Win32 ® style) DLLs </li></ul></ul>
    9. 9. Getting Started with .NET .NET Framework Benefits <ul><li>Completely eliminates COM plumbing </li></ul><ul><li>No more… </li></ul><ul><ul><li>Registration </li></ul></ul><ul><ul><li>GUIDs </li></ul></ul><ul><ul><li>.IDL files </li></ul></ul><ul><ul><li>HRESULTs </li></ul></ul><ul><ul><li>IUnknown </li></ul></ul><ul><ul><li>AddRef/Release </li></ul></ul><ul><ul><li>CoCreateInstance </li></ul></ul>=>self described apps =>hierarchical namespaces =>unified object model =>structured exceptions =>common root object =>garbage collector =>”new” operator
    10. 10. Language Differences What's New <ul><li>Visual Basic 6 vs. Visual Basic .NET </li></ul><ul><li>Visual Basic Runtime </li></ul><ul><li>Visual Basic 6 compatibility </li></ul><ul><li>Language changes </li></ul>
    11. 11. Language Differences Visual Basic 6 vs. Visual Basic .NET <ul><li>Yes, it’s different from Visual Basic 6 </li></ul><ul><li>You can upgrade your Visual Basic 6 applications </li></ul><ul><li>Or they can coexist </li></ul>
    12. 12. Language Differences Visual Basic 6 vs. Visual Basic .NET <ul><li>Visual Basic is a first class .NET Language </li></ul><ul><ul><li>Inheritance </li></ul></ul><ul><ul><li>Structured exception handling </li></ul></ul><ul><ul><li>Free threading </li></ul></ul><ul><ul><li>Full platform access </li></ul></ul><ul><li>Seamless interoperability with other languages </li></ul><ul><ul><li>Common type system </li></ul></ul><ul><ul><li>Common Language Specification (CLS) </li></ul></ul>
    13. 13. Language Differences Visual Basic 6 Compatibility <ul><li>Visual Basic compatibility library </li></ul><ul><ul><li>Part of the .NET Framework </li></ul></ul><ul><ul><li>Part of the core redistributable package </li></ul></ul><ul><ul><li>Written in Visual Basic </li></ul></ul><ul><ul><li>Only contains deprecated functions </li></ul></ul><ul><li>Visual Basic Data Compatibility Library </li></ul><ul><ul><li>Same as above </li></ul></ul>
    14. 14. Demonstration 1 Key Visual Basic .NET Benefits Structure Exception Handling Tracing Inheritance
    15. 15. Upgrading Applications Upgrade Wizard Form layout ActiveX controls ADO data binding Code Syntax changes COM libraries RES files Behavior warnings
    16. 16. Upgrading Applications Upgrade Completion <ul><li>Visual Basic .NET project </li></ul><ul><li>Upgrade Wizard will list: </li></ul><ul><ul><li>Upgrade issues </li></ul></ul><ul><ul><li>Upgrade to-dos </li></ul></ul><ul><ul><li>Upgrade warnings </li></ul></ul><ul><ul><li>Upgrade notes </li></ul></ul><ul><li>Complete the changes </li></ul><ul><li>Compile the application </li></ul>
    17. 17. Demonstration 2 Using the Upgrade Wizard Upgrade Visual Basic 6 Forms to Visual Basic .NET Windows Form
    18. 18. Code Advisor <ul><li>VB6 Add-in </li></ul><ul><li>Scan your Visual Basic 6.0 projects to ensure they meet predetermined coding standards </li></ul><ul><li>Suggest changes and best practices to ease migration </li></ul><ul><li>Able to create your own custom rules </li></ul><ul><li>http://msdn.microsoft.com/vbasic/downloads/codeadvisor/default.asp </li></ul>
    19. 19. Demonstration 3 Using the VB6 Code Advisor
    20. 20. Snippet Migration <ul><li>VS.NET 2003 (Everett) has an inplace upgrade advisor </li></ul><ul><li>Useful if you’re moving in VB6 snippets </li></ul>
    21. 21. Demonstration 4 Using the VS.NET 2003 Snippet Upgrader
    22. 22. ADO to ADO.NET <ul><li>What is ADO? </li></ul><ul><ul><li>ActiveX data objects </li></ul></ul><ul><ul><li>COM-based </li></ul></ul><ul><ul><li>Variety of data sources </li></ul></ul><ul><ul><li>Connected and disconnected </li></ul></ul><ul><ul><li>XML support </li></ul></ul>
    23. 23. ADO to ADO.NET <ul><li>What is ADO.NET? </li></ul><ul><ul><li>Native .NET components </li></ul></ul><ul><ul><li>Variety of data sources </li></ul></ul><ul><ul><li>Designed for disconnected access </li></ul></ul><ul><ul><li>Built from ground up for XML </li></ul></ul>
    24. 24. ADO to ADO.NET <ul><li>Does ADO still work in Visual Basic .NET? </li></ul><ul><ul><li>Yes, ADO code works </li></ul></ul><ul><ul><li>ADO data binding? </li></ul></ul><ul><ul><ul><li>Yes, if binding to data control </li></ul></ul></ul><ul><ul><ul><li>Yes, if binding to a data environment </li></ul></ul></ul><ul><ul><ul><li>No, if binding to a data source class </li></ul></ul></ul><ul><ul><li>ADO data environment? </li></ul></ul><ul><ul><ul><li>No direct support, but Upgrade Wizard will upgrade ADO data environment to a class </li></ul></ul></ul>
    25. 25. ADO to ADO.NET <ul><li>ADO.NET Overview </li></ul><ul><ul><li>Connected </li></ul></ul><ul><ul><ul><li>Connection, command, data reader </li></ul></ul></ul><ul><ul><li>Middle </li></ul></ul><ul><ul><ul><li>Data adapter </li></ul></ul></ul><ul><ul><li>Disconnected </li></ul></ul><ul><ul><ul><li>DataSet, DataTable, DataView, etc. </li></ul></ul></ul>
    26. 26. ADO to ADO.NET <ul><li>Data providers </li></ul><ul><ul><li>Part of connected layer </li></ul></ul><ul><ul><li>SQL Server  /MSDE </li></ul></ul><ul><ul><li>OLE DB </li></ul></ul><ul><ul><li>ODBC </li></ul></ul><ul><ul><li>Oracle </li></ul></ul><ul><ul><li>Third parties </li></ul></ul>
    27. 27. ADO to ADO.NET Connected Layer <ul><li>Connection object </li></ul><ul><ul><li>Very similar to ADO’s connection object </li></ul></ul><ul><li>Command </li></ul><ul><ul><li>Very similar to ADO’s command object </li></ul></ul><ul><li>Data reader </li></ul><ul><ul><li>Forward, read-only record set </li></ul></ul><ul><li>Data adapter </li></ul><ul><ul><li>No equivalent to ADO </li></ul></ul>
    28. 28. ADO to ADO.NET Disconnected Layer <ul><li>DataSet </li></ul><ul><ul><li>In-memory representation of database </li></ul></ul><ul><ul><li>Can contain multiple tables </li></ul></ul><ul><ul><li>Tables can come from different data sources </li></ul></ul><ul><ul><li>Can enforce relational integrity rules </li></ul></ul><ul><ul><li>Heterogeneous joins across different data providers </li></ul></ul><ul><ul><li>Supports views, filtering, and searching </li></ul></ul><ul><ul><li>Supports data binding </li></ul></ul>
    29. 29. Demonstration 5 Upgrading ADO to ADO.NET ADO Recordset with Visual Basic .NET Controls ADO Recordset with ADO.NET Data Binding Nothing but .NET
    30. 30. Deployment Demo 6.0 <ul><li>Build a simple winform </li></ul><ul><li>Have it consume a web service at http://localhost/demos/DemoWebServices/PubsService.asmx </li></ul><ul><li>Run it </li></ul><ul><li>Deploy it </li></ul>
    31. 31. Deployment Smart Clients <ul><li>Considerations </li></ul><ul><li>New option </li></ul><ul><li>No-Touch </li></ul><ul><li>Security </li></ul>
    32. 32. Deployment Considerations <ul><li>System impact </li></ul><ul><ul><li>Will the install of application 1 break application 2? </li></ul></ul><ul><li>First time deployment </li></ul><ul><ul><li>Every client has to have the application explicitly installed on it </li></ul></ul><ul><li>Application Update </li></ul><ul><ul><li>Every client has to re-install the application to pickup updates </li></ul></ul>
    33. 33. Deployment Considerations <ul><li>Problem to Solve: </li></ul><ul><ul><li>Avoid the application install all together </li></ul></ul><ul><ul><li>Run the application w/o touching the client </li></ul></ul><ul><li>What about management software? </li></ul><ul><ul><li>If you have a managed infrastructure, use it </li></ul></ul><ul><ul><li>If not, you can still build No Touch Deployable applications </li></ul></ul>
    34. 34. Deployment Considerations <ul><li>Applications are isolated </li></ul><ul><ul><li>Private deployment by default </li></ul></ul><ul><ul><li>Applications are self-describing </li></ul></ul><ul><li>Multiple versions can coexist </li></ul><ul><ul><li>Sharing is controlled and explicit </li></ul></ul><ul><ul><li>Applications default to use the assembly version they were built with, not the latest </li></ul></ul><ul><ul><li>Side-by-side </li></ul></ul>
    35. 35. Deployment New Options <ul><li>No-touch deployment </li></ul><ul><ul><li>Application isolation is the default </li></ul></ul><ul><ul><li>No registration required </li></ul></ul><ul><ul><li>Strong versioning of shared components </li></ul></ul><ul><li>Deployment is simple </li></ul><ul><ul><li>XCOPY on to client </li></ul></ul><ul><ul><li>Run from a file share </li></ul></ul><ul><ul><li>Click on a link in the browser </li></ul></ul>
    36. 36. Deployment New Options MyApp.exe Web Server Internet Explorer Download Cache Client App .NET Framework Managed Exe? MyApp.dll HTTP HTTP
    37. 37. Deployment No-Touch <ul><li>URL-launched executable </li></ul><ul><li>No installation, automatic update </li></ul><ul><ul><li>Click on a link in the browser </li></ul></ul><ul><ul><li>Use Assembly.LoadFrom </li></ul></ul><ul><li>Stored in the download cache </li></ul><ul><ul><li>Only downloaded when updated </li></ul></ul><ul><li>Application “trickles” onto the client </li></ul><ul><ul><li>Dependent components are automatically downloaded </li></ul></ul>
    38. 38. Deployment No-Touch <ul><li>Small local executable </li></ul><ul><li>Load assemblies from a Web server </li></ul><ul><ul><li>Application downloads itself at run time </li></ul></ul><ul><ul><li>Update server assemblies to update application </li></ul></ul><ul><li>Use Assembly.LoadFrom(url) </li></ul><ul><ul><li>Takes a URL to an assembly </li></ul></ul><ul><ul><li>Downloads and caches the assembly </li></ul></ul><ul><ul><li>Automatically checks for newer versions </li></ul></ul><ul><ul><li>Permissions based on where the assembly came from </li></ul></ul>
    39. 39. Deployment No-Touch <ul><li>Stored in the download cache </li></ul><ul><ul><li>NOT the GAC! </li></ul></ul><ul><li>Layer “on top of” WinInet cache </li></ul><ul><li>Maintains URL for security evidence </li></ul><ul><li>Configurable cache size </li></ul><ul><li>Scavenged by LRU </li></ul><ul><li>Per user </li></ul>
    40. 40. Deployment Security <ul><li>Semi-trusted applications </li></ul><ul><ul><li>Security based on where the application comes from </li></ul></ul><ul><ul><li>Think Web pages in the browser </li></ul></ul><ul><li>Strong names </li></ul><ul><ul><li>Can be used to achieve a higher security level </li></ul></ul><ul><ul><li>Security based on who signed the assembly </li></ul></ul>
    41. 41. Demonstration 6.1 No-Touch Deployment URL Launched Executable Load Another Assembly
    42. 42. Thank you to our Partner!
    43. 43. Thank you to our Partners!

    ×