Course Audience
This course covers advanced topics in Visual Basic programming with an emphasis on COM and databases. Because of its ease of use and very strong tool support, Visual Basic is the language of choice for many sophisticated applications in the Microsoft Windows environment. Visual Basic also has extensive support for COM, OLE and ActiveX. This course covers the concepts of COM, the implementation of COM servers, clients, and ActiveX controls, and the use of Visual Basic for developing distributed database applications, including Web-based applications.
Course Description
The course begins with an exploration of object-oriented concepts, based on a running system supporting customers and merchants. Objects are introduced as an effective design tool for modeling such a system. There is then a discussion of the use of Visual Basic in object-oriented programming. Visual Basic supports abstraction, encapsulation, interface inheritance, and polymorphism. It also supports code reuse through containment and delegation. Then COM is introduced as the mechanism to extend object oriented programming across component boundaries. Components can be implemented in-process (as a DLL) or in a separate process (as an EXE). The basic structure of COM is explained, including vtable and dispatch interfaces, the use of the Registry, type libraries, events, collections and error processing. ActiveX controls are covered.
The course then addresses the issues of enterprise computing and three-tier distributed systems. Then database programming using ActiveX Data Objects (ADO) is covered, enabling the start of implementing a case study. The fundamentals of MTS architecture are outlined, including context and state. Transactions are studied in detail, including hands-on implementation of distributed transactions with MTS. An appendix provide practical background about SQL Server.
Prerequisites
A basic working knowledge of Visual Basic programming. Some knowledge of SQL would also be helpful.
TOPICS COVERED IN LECTURE & LAB
Object-Oriented Programming Using Visual Basic
Introduction to Objects
- What is an Object?
- Abstraction
- Encapsulation
- Classes and Instances
- Interfaces
- Relationships
- Inheritance and Code Reuse
- Polymorphism
Using Objects in Visual Basic
- Properties
- Methods
- Events
- Built-in Objects
- Adding Properties and Methods
- Using External Objects
- Object Browser
- Hierarchical Object Models
Implementing Objects in Visual Basic
- Modules
- Private and Public
- Encapsulation
- Class Modules
- Instantiation
- Object Creation and Destruction
- Methods
- Properties
- Let and Set
Events
- Event Interfaces
- Specifying an Event
- Raising an Event
- Handling an Event
- Encapsulating the VB Timer
Interfaces and Containment
- Interfaces
- Implements Keyword
- Multiple Interfaces
- Using Multiple Interfaces
- IS-A and HAS-A Relationships
- Containment/Delegation
- Visual Basic Class Builder
Polymorphism
- Polymorphism
- Abstract Classes
- Implementing Polymorphism
- Using Polymorphism
Variants and Collections
- Variants
- Type Conversion
- Type Information
- Collections
- Indexes and Keys
- For Each Loops
- Collections of Objects
|
COM Programming Using Visual Basic
Introduction to Components
- Components and Objects
- Local/Remote Transparency
- Component Technologies
- Components in Visual Basic
- ActiveX DLLs and EXEs
- Private and Public Class Modules
Component Object Model
- COM and Visual Basic Object Models
- Interfaces
- Globally Unique Identifiers
- Unknown
- Interface Negotiation
- Reference Counting
- Object Creation and Destruction
- Multiple Interfaces in Visual Basic
- Instancing Property
Type Libraries
- Type Information
- Use of Type Libraries by Visual Basic
- OLE/COM Object Viewer and Object Browser
- Interface Definition Language
- Default Interface
- Creating Type Libraries
COM and the Registry
- Windows Registry
- Registry Editor
- Registry Entries for COM Components
- Self-Registration
- Version Compatibility
Error Handling
- COM Interfaces for Error Handling
- Visual Basic Exception Processing
- Err Object
- Handling Errors
- Raising Errors
Automation and Late Binding
- Automation and Dispatch Interfaces
- CreateObject
- Early, Late and Dispid Binding
- Using Objects with VBScript
- Events
ActiveX Controls
- Methods, Properties and Events
- Stock Properties and Ambient Properties
- Property Persistence
- Using ActiveX Controls
- Creating Controls Using Visual Basic
Database Applications Using Visual Basic and COM
The Enterprise Computing Problem
- The MTS Problem Domain
- Enterprise Computing Issues
- One-Tier Systems
- Client/Server Systems
- Three-Tier Systems
- Application Servers
- MTS and COM+
ActiveX Data Objects
- Universal Data Access
- ODBC and OLE DB
- ADO Object Model
- Database Programming Using ADO
- Error Handling in ADO
- Three-Tier Application Using SQL Server and ADO
MTS Concepts and Architecture
- MTS and Scalability
- Database Pooling
- MTS and COM Programming Model
- Context Objects
- State and MTS
Transactions in MTS
- Transactions
- Distributed Transaction Processing
- OLE Transactions
- Microsoft Distributed Transaction Coordinator
- Transaction Attributes in MTS
- Automatic Transactions
- Programming Distributed Transactions Using MTS
Appendix A. SQL Server Survival Guide
- SQL Server
- Enterprise Manager
- Query Analyzer
Appendix B. Electronic Commerce Game Case Study
Appendix C. Learning Resources
|