4201. Object-Oriented
Programming in Visual Basic
Rev. 3.0
.NET is a revolutionary advance in programming technology that
greatly simplifies application development. Microsoft’s popular Visual Basic
programming language has been upgraded to take advantage of the new .NET
features. Visual Basic has become a fully object-oriented programming language
with capabilities comparable to C++, Java, and Microsoft’s new language C#.
This course is a practical introduction to programming in Visual
Basic and the use of services provided by .NET. It emphasizes the Visual Basic
language and how to build Visual Basic applications from an object-oriented
perspective. Knowledge of the earlier version of the language, Visual Basic 6,
is not required. It is current to Visual Studio 2008 and .NET 3.5, which
introduces important new features such as local type inference, extension
methods, lambda expressions and Language-Integrated Query (LINQ). The new
features are covered in a new chapter.
One of the strengths of Visual Basic, and the reason it has enjoyed
such widespread use, is the ease with which Windows application can be
developed. Microsoft has revamped the way that Windows applications are built
under .NET. Windows Forms, used by .NET languages, represents a class library
that brings uniformity to the components of a Windows application. The course
includes substantial coverage of using Windows Forms in Visual Basic, including
creating database applications with ADO.NET.
The first part of the course covers the fundamentals of Microsoft’s Visual
Basic programming language. It starts with a brief chapter, “.NET: What You Need To Know,” which gets you up and
running in the .NET environment with a minimum of fuss. The next five chapters
cover the Visual Basic language essentials.
The second part of the course discusses object-oriented programming
in Visual Basic. It contains three chapters that focus on developing classes
using Visual Basic and then extending them via Visual Basic’s inheritance
capabilities. Interface-based programming and collection classes are also
introduced.
The final part of the course introduces the Windows Forms class
library. Programmers familiar with previous versions of VB will notice that
this significantly changes the programming model, yet also introduces
flexibility not previously available. The chapters in this part evolve from
building simple form-based applications to ones with dialogs and menus. It includes
an introduction to database programming using ADO.NET. The course concludes
with a chapter covering the new features in Visual Basic 2008.
The course is practical, with many example programs and a
progressively developed case study. The student will receive a comprehensive
set of materials, including course notes and all the programming examples.
LEARNING OBJECTIVES
·
Gain an understanding of the .NET architecture
·
Gain a working knowledge of the Visual Basic
programming language
·
Learn how to build object-oriented applications
using Visual Basic
·
Learn how to implement Windows desktop applications
using Windows Forms, including programs that interact with databases
·
Gain a working knowledge of local type
inference, object initializers, anonymous types, extension methods, lambda
expression, LINQ, and other new features in Visual Basic 2008.
Course Duration: 5
days
Prerequisites: The
student should have some programming experience.
1.
.NET: What You Need To Know
.NET Executables and the CLR
A .NET Testbed for Visual Basic Programming
Visual Studio 2008
2.
Fundamentals of Visual Basic Programming
Program Structure
Namespaces
Data Types
Variables
Conversions
Operators and Expressions
Console I/O
3.
Control Structures
If Statement
Select Case Statement
Do/Loop Statement
For/Next Statement
Exit and Continue
4.
Procedures
Subroutines
Functions
Pass-by-value Versus Pass-by-reference
Access modifiers
Overloading
Optional Parameters
5.
Advanced Data Types
Arrays
Enumerations
Structures
6.
Exception Handling
Error Detection
Exception Handling
7.
Object-Oriented Programming
Object-Oriented Concepts
Defining Classes
Methods and Properties
Shared Data and Methods
Constructors
8.
Inheritance
Inheritance
Controlling Base Class Construction
Access Control
Polymorphism
Events
Abstract and Not Inheritable Classes
Type Conversion in Inheritance
9.
Interfaces and Collections
Interface Fundamentals
Programming with Interfaces
Using Interfaces at Runtime
Resolving Ambiguities
Collections
Generic Types
Type-Safe Collections
10. Introduction
to Windows Forms
Creating Windows Applications Using Visual Studio 2008
Partial Classes
Handling Events
Common Controls
11. Windows
Forms Controls
Buttons, Labels and Textboxes
Radio Buttons and Group Boxes
Check Boxes
List Boxes and Combo Boxes
Timer Control
Flexible Event Handling
12. User
Interface Features
Dialog Boxes
Menus
13. Database
Programming
ADO.NET
.NET Data Providers
Using Data Readers
Using Data Sets
.NET 2.0 Data Binding
14. New
Features in Visual Basic 2008
Local Type Inference
Object Initializers
Array Initializers
Anonymous Types
Partial Methods
Extension Methods
Lambda Expressions
Query Keywords
Electronic File Supplement
Supplement 1. Using Visual Studio 2008
Versions of Visual Studio
Overview of Visual Studio 2008
Creating a Console Application
Project Configurations
Debugging
Multiple-Project Solutions
System Requirements
Course exercises require Microsoft Visual Studio 2008 Standard
Edition or higher. The preferred operating system is Windows XP. See the
appropriate course Setup Guide for details.
A good minimal hardware profile for this course consists of a 2 GHz
or better CPU, 512 MB of RAM, and at least 4 GB of free disk space for tools
installation and courseware.