• Save
How to Move to Visual Basic .NET
Upcoming SlideShare
Loading in...5
×
 

How to Move to Visual Basic .NET

on

  • 9,316 views

How to Move to Visual Basic .NET

How to Move to Visual Basic .NET

Statistics

Views

Total Views
9,316
Slideshare-icon Views on SlideShare
9,295
Embed Views
21

Actions

Likes
5
Downloads
0
Comments
1

3 Embeds 21

http://www.slideshare.net 14
http://www.techgig.com 6
http://10.150.200.76 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Inventory Management System Source Code
    http://www.inventoryinvbdotnet.blogspot.com
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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 How to Move to Visual Basic .NET Presentation Transcript

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