Notes
Outline
New Language Features of
Visual Basic® .NET?
Agenda
Design goals for Visual Basic .NET
Building the next generation
of applications
The Basic language and compiler
VB.NET Language Goals
Modernize
Simplify
Reduce programming errors
Full access to .NET Framework
The .NET Framework
Visual Basic .NET apps are built
on the Framework
Web Forms And ASP+
Simplified development of scalable Web applications
Application services in ASP+
Authentication, Caching, State Services
The best of Web Classes and ASP
Web Forms separates UI and code
Familiar development model
Full, compiled Visual Basic language
Target any browser on any platform
Win Forms
A powerful framework for writing Windows applications
Visual inheritance
Secure and low TCO
Integrates with Web Services
RAD control creation
Accessibility support built in
In-place menu editor!
"Win Forms"
Win Forms
RAD Web Services
The third generation of code reuse
VBXs, COM, now Web Services
Creation is easy!
“WebMethod” Subs and Functions
Visual Studio automatically publishes to the Web
Drag and drop consumption
Discovery via Server Explorer,
Web References
As simple as calling a method
RAD For The Server
Easily build scalable server components
Visually compose business objects
Manage enterprise wide
programmer resources
Scalable, transacted, cross-machine, and cross-platform messaging
Efficient scheduling
Configure and diagnose your production applications
"RAD For the Server"
RAD For the Server
Data:  ADO+
Cross-platform, scalable,
multi-tier data access
Scalability, interoperability by default
Datasets are
Visually designed or imported
Disconnected and move between tiers
Persisted and remoted as XML
Program directly against objects
Full programmatic control over modifications
XML
The universal self describing language
XML enables application integration
The tool produces and consumes XML
Datasets, Object Persistence,
Web Services
Visual Basic .NET makes XML easy
Visually define the schema (XSD)
Automatic schema inference
Access-like table editing of data
IntelliSense™!
"Data Bound Web Forms"
Data Bound Web Forms
The Basic Language
The language you already know for building .NET applications
Modernized
Fully Object Oriented
Structured exception handling
Cross-language inheritance, interoperability
Powerful
Free threading, OO function pointers
Simplified and Consistent
“Option Strict”, one type of assignment
Inheritance
Reuse by composition
Reuse by inheritance
Inheritance features:
Single base class
Method and property overriding
Protected access type
Inheritance And Versioning
Inheriting classes easily broken when base class changes
By default methods are not overridable
Overriding is explicit using “Overrides” keyword
“Shadows” keyword used to hide inherited members
Classes can be declared as NotInheritable
Encapsulation
Shared members on classes
Shared between all instances of a class
Previously were defined outside class in a standard module
Nested Type Support
Classes and other types can be encapsulated within a class
Structures
Support Properties, Methods, and Events
Support Interfaces
Structured Error Handling
Eliminates need for GoTo
Supports typed exceptions
Try Construct
Guarded code between Try and first Catch statement
Catch Statements
filters on type or general condition
Finally block
always executed
Throw statement
Generates typed exception
Simple And Consistent
Eliminate parameterless default properties
Only one form of assignment
Always use parentheses around args
Fix variable declaration syntax:
Dim x, y As Integer
Short-circuiting And and Or operators
Writing Robust Code
Parameterized constructors
Variables can be initialized where declared
Circular References
Garbage collector recovers instances in reference cycles
Decimal type replaces Currency
Robust Type Checking
Option for stricter type checking
Disallow Implicit conversions that may fail at runtime
Disallow late-bound calls
Overloaded methods supported
No unexpected implicit conversions
Strings and numeric
Date and Boolean
Array declarations must specify rank
Full Support For .NET Frameworks
First-class access to framework
Seamless Language Interoperability
File I/O names not reserved
Importing Namespaces
Allows unqualified access to types
Placed at file or project level
Raw Power
Delegates
Object oriented function pointer
Points to a specific method of a specific instance
Event Extensions
Implemented on top of delegates
Dynamic hook-up of method as handler
Many events can be routed to same method
Free Threading
SyncLock statement for synchronization
"Free Threading"
Free Threading
Performance
Reference assignment for arrays
Instance size much smaller
Faster Object manipulation
Faster creation
Faster assignment
Supports direct data member access
Opening Visual Basic 6.0 Projects In Visual Basic .NET
Project conversion wizard
Copies your Visual Basic 6.0 project
Migrates most technologies
Some code needs to be rewritten
“TODO” comments inserted into code
Report generated
Summary
A first class player …
Modern, Simple, Consistent, and Robust
Full access to the .NET platform
Your skills and investments will move forward
Visual Basic .NET is much bigger than simply a new “rev” of the language!