Tải bản đầy đủ (.pdf) (1,245 trang)

visual basic 6 - the complete reference 1999

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (13.46 MB, 1,245 trang )

Introduction
MCSD Training Guide: Visual Basic 6 Exams is designed
for developers with the goal of certification as a
Microsoft Certified Solutions Developer (MCSD).
It covers both the Designing and Implementing
Distributed Applications with Microsoft Visual Basic
6.0 exam (70-175) and the Designing and
Implementing Desktop Applications with Microsoft
Visual Basic 6.0 exam (70-176). These exams measure
your ability to design and implement distributed and
desktop application solutions by using Microsoft Visual
Basic version 6.0.
This book is your one-stop shop. Everything you need
to know to pass the exams is in here, and Microsoft has
approved it as study material. You do not have to take a
class in addition to buying this book to pass the exam.
However, depending on your personal study habits or
learning style, you may benefit from buying this book
and taking a class.
This book also can help advanced users and administra-
tors who are not studying for the exam but are looking
for a single-volume reference on Microsoft’s TCP/IP
implementation.
HOW THIS BOOK HELPS YOU
This book conducts you on a self-guided tour of all the
areas covered by the VB6 Distributed Applications
exam and the VB6 Desktop Applications exam and
teaches you the specific skills you need to achieve your
MCSD certification. You’ll also find helpful hints, tips,
real-world examples, exercises, and references to addi-
tional study materials. Specifically, this book is set up to


help you in the following ways:
á Organization. This book is organized by individual
exam objectives. Every objective you need to know
for the VB6 Distributed Applications exam and the
VB6 Desktop Applications exam is covered in this
book. The objectives are not covered in exactly the
same order as they are listed by Microsoft, but we
have attempted to organize the topics in the most
logical and accessible fashion to make it as easy as
possible for you to learn the information. We have
also attempted to make the information accessible
in the following ways:
• The full list of exam topics and objectives is
included in this introduction.
• Each chapter begins with a list of the objectives
to be covered. Each objective is also identified as
one that applies to the Distributed Applications
exam, the Desktop Applications exam, or both.
• Each chapter also begins with an outline that pro-
vides you with an overview of the material and
the page numbers where particular topics can be
found.
• We also repeat objectives before where the mater-
ial most directly relevant to it is covered (unless
the whole chapter addresses a single
objective).
• Information on where the objectives are covered
is also conveniently condensed on the tear card
at the front of this book.
á Instructional Features. This book has been designed

to provide you with multiple ways to learn and rein-
force the exam material. Following are some of the
helpful methods:
02 002-8 Intro 3/1/99 7:45 AM Page 1
2 MCSD TRAINING GUIDE: VISUAL BASIC 6 EXAMS
• Objective Explanations. As mentioned previ-
ously, each chapter begins with a list of the
objectives covered in the chapter. In addition,
immediately following each objective is an
explanation in a context that defines it more
meaningfully.
• Study Strategies. The beginning of the chapter
also includes strategies for approaching the
studying and retaining of the material in
the chapter, particularly as it is addressed
on the exam.
• Exam Tips. Exam tips appear in the margin to
provide specific exam-related advice. Such tips
may address what material is covered (or not
covered) on the exam, how it is covered,
mnemonic devices, or particular quirks of
that exam.
• Review Breaks and Summaries. Crucial infor-
mation is summarized at various points in the
book in lists or tables. Each chapter ends with
a summary as well.
• Key Terms. A list of key terms appears at the
end of each chapter.
• Notes. These appear in the margin and contain
various kinds of useful information such as

tips on technology or administrative practices,
historical background on terms and technolo-
gies, or side commentary on industry issues.
• Warnings. When using sophisticated informa-
tion technology, there is always the potential
for mistakes or even catastrophes that occur
because of improper application of the tech-
nology. Warnings appear in the margin to
alert you to such potential problems.
• In-depths. These more extensive discussions
cover material that may not be directly relevant
to the exam but which is useful as reference
material or in everyday practice. In-depths may
also provide useful background or contextual
information necessary for understanding the
larger topic under consideration.
• Step by Steps. These are hands-on, tutorial
instructions that lead you through a particular
task or function relevant to the exam
objectives.
• Exercises. Found at the end of the chapters in
the “Apply Your Knowledge” section, exercises
may include additional tutorial material as
well as other types of problems and questions.
• Case Studies. Presented throughout the book,
case studies provide you with a more concep-
tual opportunity to apply and reinforce the
knowledge you are developing. They include a
description of a scenario, the essence of the
case, and an extended analysis section. They

also reflect the real-world experiences of the
authors in ways that prepare you not only for
the exam but for actual network administra-
tion as well.
á Extensive practice test options. The book pro-
vides numerous opportunities for you to assess
your knowledge and practice for the exam. The
practice options include the following:
• Review Questions. These open-ended questions
appear in the “Apply Your Knowledge” section
at the end of each chapter. They allow you to
quickly assess your comprehension of what
you just read in the chapter. Answers to the
questions are provided later in the section.
02 002-8 Intro 3/1/99 7:45 AM Page 2
INTRODUCTION 3
• Exam Questions. These questions also appear
in the “Apply your Knowledge” section. They
reflect the kinds of multiple-choice questions
that appear on the Microsoft exams. Use
them to practice for the exam and to help
you determine what you know and what you
need to review or study further. Answers and
explanations for them are provided.
• Practice Exam. A Practice Exam is included in
the “Final Review” section. The Final Review
section and the Practice Exam are discussed
below.
• Top Score. The Top Score software included
on the CD-ROM provides further practice

questions.
It also provides you with valuable exam-day
tips and information on new exam/question
formats such as adaptive tests and simulation-
based questions.
• Practice Exam. A full practice test for each of
the exams is included. Questions are written
in the styles used on the actual exams. Use it
to assess your readiness for the real thing.
The book includes several valuable appendices as well,
including a glossary (Appendix A), an overview of the
Microsoft certification program (Appendix B), and a
description of what is on the CD-ROM (Appendix C).
The Microsoft VB exams assume an elementary knowl-
edge of VB but do not specify this knowledge in the
exam objectives. For that reason, this book includes
Appendix E, “Visual Basic Basics” that provides you
with an overview of the elementary VB knowledge and
skills that are not specified as objectives but that you
will need to know in order to pass the exam.
Finally, Appendix F provides you with a list of
“Suggested Readings and Resources” that provides you
with useful information on Visual Basic 6.
These and all the other book features mentioned previ-
ously will provide you with thorough preparation for
the exam.
For more information about the exam or the certifica-
tion process, contact Microsoft:
Microsoft Education: 800-636-7544
Internet:

/>World Wide Web: />CompuServe Forum: GO MSEDCERT
NOTE
For a complete description of the New
Riders Top Score test engine, please
see Appendix D, “Using the Top Score
Software.”
á Final Review. This part of the book provides
you with three valuable tools for preparing for
the exam.
• Fast Facts. This condensed version of the
information contained in the book will prove
extremely useful for last-minute review.
• Study and Exam Tips. Read this section
early on to help you develop study strategies.
02 002-8 Intro 3/1/99 7:46 AM Page 3
4 MCSD TRAINING GUIDE: VISUAL BASIC 6 EXAMS
WHAT THE DESIGNING AND
IMPLEMENTING DISTRIBUTED
APPLICATIONS WITH
MICROSOFT VISUAL BASIC 6.0
EXAM (70-175) COVERS
The Designing and Implementing Distributed
Applications with Microsoft Visual Basic 6.0 Exam
(70-175) covers the nine main topic areas represented
by the conceptual groupings of the test objectives:
Developing the Conceptual and Logical Design,
Deriving the Physical Design, Establishing the
Development Environment, Creating User Services,
Creating and Managing COM Components, Creating
Data Services, Testing the Solution, Deploying the

Application, and Maintaining and Supporting an
Application. Each of these main topic areas is covered
in one or more chapters. The exam objectives are listed
by topic area in the following sections.
Developing the Conceptual and
Logical Design
Given a conceptual design, apply the principles of
modular design to derive the components and services
of the logical design.
Deriving the Physical Design
Assess the potential impact of the logical design on per-
formance, maintainability, extensibility, scalability,
availability, and security.
Design Visual Basic components to access data from a
database in a multitier application.
Design the properties, methods, and events of
components.
Establishing the Development
Environment
Establish the environment for source-code version
control.
Install and configure Visual Basic for developing
distributed applications.
Configure a server computer to run Microsoft
Transaction Server (MTS).
á Install MTS.
á Set up security on a system package.
Configure a client computer to use an MTS
component.
á Create packages that install or update MTS

components on a client computer.
Creating User Services
Implement navigational design.
á Dynamically modify the appearance of a menu.
á Add a pop-up menu to an application.
á Create an application that adds and deletes
menus at runtime.
á Add controls to forms.
á Set properties for controls.
á Assign code to a control to respond to an event.
02 002-8 Intro 3/1/99 7:46 AM Page 4
INTRODUCTION 5
Create data input forms and dialog boxes.
á Display and manipulate data by using custom
controls. Controls include
TreeView, ListView,
ImageList, Toolbar, and StatusBar.
á Create an application that adds and deletes
controls at runtime.
á Use the
Controls collection to manipulate
controls at runtime.
á Use the
Forms collection to manipulate forms at
runtime.
Write code that validates user input.
á Create an application that verifies data entered at
the field level and the form level by a user.
á Create an application that enables or disables
controls based on input in fields.

Write code that processes data entered on a form.
á Given a scenario, add code to the appropriate
form event. Events include
Initialize,
Terminate, Load, Unload, QueryUnload, Activate,
and
DeActivate.
Add an ActiveX control to the toolbox.
Create dynamic Web pages by using Active Server
Pages (ASP) and Web classes.
Create a Web page by using the DHTML Page
Designer to dynamically change attributes of elements,
change content, change styles, and position elements.
Use data binding to display and manipulate data from
a data source.
Instantiate and invoke a COM component.
á Create a Visual Basic client application that uses
a COM component.
á Create a Visual Basic application that handles
events from a COM component.
Create callback procedures to enable asynchronous pro-
cessing between COM components and Visual Basic
client applications.
Implement online user assistance in a distributed appli-
cation.
á Set appropriate properties to enable user assis-
tance.
Help properties include HelpFile,
HelpContextID, and WhatsThisHelp.
á Create HTML Help for an application.

á Implement messages from a server component to
a user interface.
Implement error handling for the user interface in dis-
tributed applications.
á Identify and trap runtime errors.
á Handle inline errors.
á Determine how to send error information from a
COM component to a client computer.
Use an active document to present information within
a Web browser.
Creating and Managing COM
Components
Create a COM component that implements business
rules or logic. Components include DLLs, ActiveX
controls, and active documents.
Create ActiveX controls.
á Create an ActiveX control that exposes properties.
á Use control events to save and load persistent
properties.
02 002-8 Intro 3/1/99 7:46 AM Page 5
6 MCSD TRAINING GUIDE: VISUAL BASIC 6 EXAMS
á Test and debug an ActiveX control.
á Create and enable property pages for an ActiveX
control.
á Enable the data-binding capabilities of an
ActiveX control.
á Create an ActiveX control that is a data source.
Create an active document.
á Use code within an active document to interact
with a container application.

á Navigate to other active documents.
Design and create components that will be used
with MTS.
Debug Visual Basic code that uses objects from a COM
component.
Choose the appropriate threading model for a COM
component.
Create a package by using the MTS Explorer.
á Use the Package and Deployment Wizard to
create a package.
á Import existing packages.
á Assign names to packages.
á Assign security to packages.
Add components to an MTS package.
á Set transactional properties of components.
á Set security properties of components.
Use role-based security to limit use of an MTS package
to specific users.
á Create roles.
á Assign roles to components or component
interfaces.
á Add users to roles.
Compile a project with class modules into a COM
component.
á Implement an object model within a COM
component.
á Set properties to control the instancing of a class
within a COM component.
Use Visual Component Manager to manage
components.

Register and unregister a COM component.
Creating Data Services
Access and manipulate a data source by using ADO
and the ADO Data control.
Access and manipulate data by using the Execute
Direct model.
Access and manipulate data by using the
Prepare/Execute model.
Access and manipulate data by using the Stored
Procedures model.
á Use a stored procedure to execute a statement on
a database.
á Use a stored procedure to return records to a
Visual Basic application.
Retrieve and manipulate data by using different cursor
locations. Cursor locations include client-side and server-
side.
Retrieve and manipulate data by using different cursor
types. Cursor types include forward-only, static,
dynamic, and keyset.
Use the ADO
Errors collection to handle database
errors.
02 002-8 Intro 3/1/99 7:46 AM Page 6
INTRODUCTION 7
Manage database transactions to ensure data consis-
tency and recoverability.
Write SQL statements that retrieve and modify data.
Write SQL statements that use joins to combine data
from multiple tables.

Use appropriate locking strategies to ensure data
integrity. Locking strategies include read-only, pes-
simistic, optimistic, and batch optimistic.
Testing the Solution
Given a scenario, select the appropriate compiler options.
Control an application by using conditional compilation.
Set Watch expressions during program execution.
Monitor the values of expressions and variables by
using the Immediate window.
á Use the Immediate window to check or change
values.
á Use the Locals window to check or change values.
Implement project groups to support the development
and debugging processes.
á Debug DLLs in process.
á Test and debug a control in process.
Given a scenario, define the scope of a watch variable.
Deploying an Application
Use the Package and Deployment Wizard to create a
setup program that installs a distributed application,
registers the COM components, and allows for unin-
stall.
Register a component that implements DCOM.
Configure DCOM on a client computer and on a
server computer.
Plan and implement floppy disk-based deployment or
compact disc-based deployment for a distributed appli-
cation.
Plan and implement Web-based deployment for a dis-
tributed application.

Plan and implement network-based deployment for a
distributed application.
Maintaining and Supporting an
Application
Implement load balancing.
Fix errors and take measures to prevent future errors.
Deploy application updates for distributed applications.
WHAT THE DESIGNING AND
IMPLEMENTING DESKTOP
APPLICATIONS WITH
MICROSOFT VISUAL BASIC
6.0 EXAM (70-176)
COVERS
The Designing and Implementing Distributed
Applications with Microsoft Visual Basic 6.0 Exam
(70-176) covers the nine main topic areas represented
by the conceptual groupings of the test objectives:
Developing the Conceptual and Logical Design,
Deriving the Physical Design, Establishing the
Development Environment, Creating User Services,
02 002-8 Intro 3/1/99 7:46 AM Page 7
8 MCSD TRAINING GUIDE: VISUAL BASIC 6 EXAMS
Creating and Managing COM Components, Creating
Data Services, Testing the Solution, Deploying the
Application, and Maintaining and Supporting an
Application. Each of these main topic areas is covered
in one or more chapters. The exam objectives are listed
by topic area in the following sections.
Deriving the Physical Design
Assess the potential impact of the logical design on per-

formance, maintainability, extensibility, and availability.
Design Visual Basic components to access data from a
database.
Design the properties, methods, and events of com-
ponents.
Establishing the Development
Environment
Establish the environment for source-code version control.
Install and configure Visual Basic for developing desk-
top applications.
Creating User Services
Implement navigational design.
á Dynamically modify the appearance of a menu.
á Add a pop-up menu to an application.
á Create an application that adds and deletes
menus at runtime.
á Add controls to forms.
á Set properties for controls.
á Assign code to a control to respond to an event.
Create data input forms and dialog boxes.
á Display and manipulate data by using custom
controls. Controls include
TreeView, ListView,
ImageList, Toolbar, and StatusBar.
á Create an application that adds and deletes
controls at runtime.
á Use the
Controls collection to manipulate
controls at runtime.
á Use the

Forms collection to manipulate forms at
runtime.
Write code that validates user input.
á Create an application that verifies data entered at
the field level and the form level by a user.
á Create an application that enables or disables
controls based on input in fields.
Write code that processes data entered on a form.
á Given a scenario, add code to the appropriate
form event. Events include
Initialize,
Terminate, Load, Unload, QueryUnload, Activate,
and
DeActivate.
Add an ActiveX control to the toolbox.
Create a Web page by using the DHTML Page
Designer to dynamically change attributes of elements,
change content, change styles, and position elements.
Use data binding to display and manipulate data from
a data source.
Instantiate and invoke a COM component.
á Create a Visual Basic client application that uses
a COM component.
á Create a Visual Basic application that handles
events from a COM component.
02 002-8 Intro 3/1/99 7:46 AM Page 8
INTRODUCTION 9
Create callback procedures to enable asynchronous
processing between COM components and Visual
Basic client applications.

Implement online user assistance in a desktop
application.
á Set appropriate properties to enable user assis-
tance.
Help properties include HelpFile,
HelpContextID, and WhatsThisHelp.
á Create HTML Help for an application.
á Implement messages from a server component
to a user interface.
Implement error handling for the user interface in
desktop applications.
á Identify and trap runtime errors.
á Handle inline errors.
Creating and Managing COM
Components
Create a COM component that implements business
rules or logic. Components include DLLs, ActiveX
controls, and active documents.
Create ActiveX controls.
á Create an ActiveX control that exposes prop-
erties.
á Use control events to save and load persistent
properties.
á Test and debug an ActiveX control.
á Create and enable Property Pages for an ActiveX
control.
á Enable the data-binding capabilities of an
ActiveX control.
á Create an ActiveX control that is a data source.
Create an active document.

á Use code within an active document to interact
with a container application.
á Navigate to other active documents.
Debug a COM client written in Visual Basic.
Compile a project with class modules into a COM
component.
á Implement an object model within a COM
component.
á Set properties to control the instancing of a class
within a COM component.
Use Visual Component Manager to manage
components.
Register and unregister a COM component.
Creating Data Services
Access and manipulate a data source by using ADO
and the
ADO Data control.
Testing the Solution
Given a scenario, select the appropriate compiler
options.
Control an application by using conditional com-
pilation.
Set Watch expressions during program execution.
Monitor the values of expressions and variables by
using the Immediate window.
á Use the Immediate window to check or change
values.
á Use the Locals window to check or change values.
02 002-8 Intro 3/1/99 7:46 AM Page 9
10 MCSD TRAINING GUIDE: VISUAL BASIC 6 EXAMS

Implement project groups to support the development
and debugging processes.
á Debug DLLs in process.
á Test and debug a control in process.
Given a scenario, define the scope of a watch variable.
Deploying an Application
Use the Package and Deployment Wizard to create a
setup program that installs a desktop application, regis-
ters the COM components, and allows for uninstall.
Plan and implement floppy disk-based deployment or
compact disc-based deployment for a desktop appli-
cation.
Plan and implement Web-based deployment for a desk-
top application.
Plan and implement network-based deployment for a
desktop application.
Maintaining and Supporting an
Application
Fix errors and take measures to prevent future errors.
Deploy application updates for desktop applications.
HARDWARE AND SOFTWARE
YOU’LL NEED
A self-paced study guide, this book was designed with
the expectation that you will use VB 6.0 Enterprise
Edition as you follow along through the exercises
while you learn. However, almost all the exercises
can also be completed with the Professional Edition.
If you only have the Learning Edition, you’ll be able
to do some of the exercises and examples, but many
sections will not be directly accessible to you.

Your computer should meet the following criteria:
á On the Microsoft Hardware Compatibility List
á 486DX2 66Mhz (or better) processor
á 340MB (or larger) hard disk
á 3.5-inch 1.44MB floppy drive
á VGA (or Super VGA) video adapter
á VGA (or Super VGA) monitor
á Mouse or equivalent pointing device
á Double-speed (or faster) CD-ROM drive
(optional)
á Network Interface Card (NIC)
á Presence on an existing network, or use of a 2-port
(or more) miniport hub to create a test network
á Any version of Microsoft Windows capable of
running Visual Studio 6.0
á Internet access with Internet Explorer
(not necessary for all sections)
It is easier to obtain access to the necessary computer
hardware and software in a corporate business environ-
ment. It can be difficult, however, to allocate enough
time within the busy workday to complete a self-study
program. Most of your study time will occur after nor-
mal working hours, away from the everyday interrup-
tions and pressures of your regular job.
ADVICE ON TAKING THE EXAM
More extensive tips are found in the Final Review sec-
tion titled “Study and Exam Prep Tips,” but keep this
advice in mind as you study:
02 002-8 Intro 3/1/99 7:46 AM Page 10
INTRODUCTION 11

á Read all the material. Microsoft has been
known to include material not expressly specified
in the objectives. This book has included addi-
tional information not reflected in the objectives
in an effort to give you the best possible prepara-
tion for the examination—and for the real-world
network experiences to come.
á Do the Step by Steps and complete the
Exercises in each chapter. They will help you
gain experience using the Microsoft product. All
Microsoft exams are task- and experienced-based
and require you to have experience using the
Microsoft product in a real networking environ-
ment.
á Use the questions to assess your knowledge.
Don’t just read the chapter content; use the ques-
tions to find out what you know and what you
don’t. Study some more, review, then assess your
knowledge again.
á Review the exam objectives. Develop your own
questions and examples for each topic listed. If
you can develop and answer several questions for
each topic, you should not find it difficult to
pass the exam.
Remember, the primary object is not to pass the
exam—it is to understand the material. After you
understand the material, passing the exam should be
simple. Knowledge is a pyramid; to build upward, you
need a solid foundation. This book and the Microsoft
Certified Professional programs are designed to ensure

that you have that solid foundation.
Good luck!
NEW RIDERS PUBLISHING
The staff of New Riders Publishing is committed to
bringing you the very best in computer reference mate-
rial. Each New Riders book is the result of months of
work by authors and staff who research and refine the
information contained within its covers.
As part of this commitment to you, the NRP reader,
New Riders invites your input. Please let us know if
you enjoy this book, if you have trouble with the infor-
mation or examples presented, or if you have a sugges-
tion for the next edition.
NOTE
Exam-taking advice Although this
book is designed to prepare you to
take and pass the Designing and
Implementing Distributed Applications
with Microsoft Visual Basic 6.0
(70-175) and the Designing and
Implementing Desktop Applications
with Microsoft Visual Basic 6.0
(70-176) certification exams, there
are no guarantees. Read this book,
work through the questions and exer-
cises, and when you feel confident,
take the Practice Exam and additional
exams using the Top Score test
engine. This should tell you whether
you are ready for the real thing.

When taking the actual certification
exam, make sure you answer all the
questions before your time limit
expires. Do not spend too much time
on any one question. If you are
unsure, answer it as best as you can;
then mark it for review when you have
finished the rest of the questions.
02 002-8 Intro 3/1/99 7:46 AM Page 11
12 MCSD TRAINING GUIDE: VISUAL BASIC 6 EXAMS
Please note, however, that New Riders staff cannot serve
as a technical resource during your preparation for the
Microsoft certification exams or for questions about
software- or hardware-related problems. Please refer
instead to the documentation that accompanies the
Microsoft products or to the applications’ Help systems.
If you have a question or comment about any New
Riders book, there are several ways to contact New
Riders Publishing. We will respond to as many readers
as we can. Your name, address, or phone number will
never become part of a mailing list or be used for any
purpose other than to help us continue to bring you
the best books possible. You can write to us at the fol-
lowing address:
New Riders Publishing
Attn: Mary Foote
201 W. 103rd Street
Indianapolis, IN 46290
If you prefer, you can fax New Riders Publishing at
317-817-7448.

You also can send email to New Riders at the following
Internet address:
certifi
NRP is an imprint of Macmillan Computer Publishing.
To obtain a catalog or information, or to purchase any
Macmillan Computer Publishing book, call 800-428-
5331.
Thank you for selecting MCSD Training Guide: Visual
Basic 6 Exams!
02 002-8 Intro 3/1/99 7:46 AM Page 12
I
VISUAL BASIC 6 EXAM CONCEPTS
1 Developing the Conceptual and Logical Design and Deriving the
Physical Design
2 Establishing the Development Environment
3 Implementing Navigational Design
4 Creating Data Input Forms and Dialog Boxes
5 Writing Code that Validates User Input
6 Writing Code that Processes Data Entered on a Form
7 Implementing Online User Assistance in a Distributed Application
8 Creating Data Services: Part I
9 Creating Data Services: Part II
PART
03 002-8 Part 1 3/1/99 7:47 AM Page 13
10 Instantiating and Invoking a COM Component
11 Implementing Error-Handling Features in an Application
12 Creating a COM Component that Implements Business Rules
or Logic
13 Creating ActiveX Controls
14 Creating an Active Document

15 Understanding the MTS Development Environment
16 Developing MTS Applications
17 Internet Programming with IIS/Webclass and DHTML Applications
18 Using VB’s Debug/Watch Facilities
19 Implementing Project Groups to Support the Development and
Debugging Process
20 Compiling a VB Application
21 Using the Package and Deployment Wizard to Create a Setup
Program
03 002-8 Part 1 3/1/99 7:47 AM Page 14
Developing the Conceptual
and Logical Design and
Deriving the Physical Design
OBJECTIVES
1
CHAPTER
This chapter helps you prepare for the exam by cover-
ing the following objectives:
Given a conceptual design, apply the princi-
ples of modular design to derive the compo-
nents and services of the logical design
(70-175).
. Conceptual design has to do with a user-based
vision of the software solution. The exam objectives
don’t require you to know how to derive a concep-
tual design. The objectives do expect you to know
something about how conceptual design relates to
logical design. Logical design identifies the business
objects and underlying services required by the con-
ceptual design.

Assess the potential impact of the logical
design on performance, maintainability, exten-
sibility, scalability, availability, and security
(70-175 and 70-176).
. The logical design that you derive from the concep-
tual design will have consequences for the final
product. The logical design affects many of the
desired qualities of a good software solution, such
as those listed in this objective.
Design Visual Basic components to access
data from a database in a multitier application
(70-175 and 70-176).
. Multitier applications break the various functions of
an application into separate components that reside
in different physical locations. An important com-
ponent of almost any software solution is the com-
ponent that provides access to the application’s data.
04 002-8 CH 01 3/1/99 7:38 AM Page 15
OBJECTIVES
Design the properties, methods, and events of
components (70-175 and 70-176).
. The components that you design in a VB solution
will be implemented as objects with their own
members (properties, methods, and events).
Implement load balancing (70-175).
. The final objective listed in this chapter, load bal-
ancing, is out of sequence with Microsoft’s pub-
lished exam objectives. Load balancing is the
process by which workload is spread among two or
more physical servers to prevent bottlenecks on a

single machine. As such, the topic is closely tied to
design decisions that you will make when imple-
menting a solution. This chapter therefore discusses
the objective of load balancing because it logically
fits with the other general design objectives dis-
cussed here.
04 002-8 CH 01 3/1/99 7:38 AM Page 16
STUDY STRATEGIES
Overview of Microsoft Application
Development Concepts 18
The VB Enterprise Development Model 20
The Conceptual Design 20
Deriving the Logical Design From the
Conceptual Design 21
Deriving the Physical Design From the
Logical Design 22
Assessing the Logical Design’s Impact
on the Physical Design 23
Designing VB Data-Access Components
for a Multitier Application 29
Designing Properties, Methods, and
Events of Components 30
Designing Properties of Components 30
Designing Methods of Components 31
Designing Events of Components 31
Implementing Load Balancing 32
Chapter Summary 36
. Examine closely the sections on maintainability,
scalability, performance, extensibility, availability,
and security. Devise your own scenarios with

these criteria in mind.
. Examine the case study for this chapter.
OUTLINE
04 002-8 CH 01 3/1/99 7:38 AM Page 17
18 Part I VISUAL BASIC 6 EXAM CONCEPTS
INTRODUCTION
The two VB6 certification exams are the first VB certification exams
to ask questions about design decisions.
Therefore it is important to pay close attention to the topics of this
chapter, even though you may be inclined to want to pay less atten-
tion to it in favor of “the good stuff,”—that is, the more programmer-
centric topics of the rest of this book.
In fact, you will find that strategic design considerations are closely
tied to most of the newest aspects of VB programming technology
such as COM components, newer features of database access, and
the new types of Internet programming available in VB.
OVERVIEW OF MICROSOFT
APPLICATION DEVELOPMENT
CONCEPTS
Microsoft’s latest framework for discussing application development
is known as the Enterprise Application Model. The EAM is really an
umbrella that covers the following six distinct ways, or “models,” of
looking at any development project:
á The Development Model has to do with the software
development process, including project management and testing.
á The Business Model concerns itself with business goal
definition, resource decisions about the project, and business
rules and policies affecting the project.
á The User Model takes up issues of user interface, training,
documentation, support, and configuration.

á The Logical Model deals with the logical structure and model-
ing of business objects and service interface definitions within
the project.
á The Technology Model attends to reusability of software
components, system and database platforms, and system
resource-management decisions.
NOTE
This Section Refers to the Latest MS
Concepts, but Exam Objectives Do
Not The concepts discussed in this
section relate to the Enterprise
Application Model and as such are
the more recently published concepts
that can be found in the documenta-
tion for Visual Studio 6 and VB6. The
concepts discussed in this section
are not part of the exam objectives.
Microsoft’s published exam objectives
talk about conceptual, logical, and
physical design. These concepts are
found in the documentation for VB5. If
you don’t own a copy of the VB5 docu-
mentation, try MSDN online at:

/msdn/library
You will probably be asked to register
before you can look at this site.
04 002-8 CH 01 3/1/99 7:38 AM Page 18
á The Physical Model the final product, encompasses the
architecture of developed components, their distribution, and

their interconnections.
Although all these models are important (each in its own way) to
the overall makeup of the Enterprise Application Model, the most
important of these models, and the one you will be mostly con-
cerned with as a VB programmer, is the Development Model.
The Development Model is important because Microsoft sees it as
the pivotal link that holds together the rest of the EAM. It provides
this glue in two ways:
á The Development Model is responsible for mediating between
the Business Model, on the one hand, and the User, Logical,
and Technology Models on the other.
á The Development Model is also responsible for mediating
between the User, Logical, and Technology Models, on the
one hand, and the Physical Model on the other.
Microsoft’s latest Visual Studio documentation also speaks of a scal-
able, team-centered approach to solution development. This team
model identifies six major roles:
á Product management
á Program management
á Development
á Test and quality assurance (QA)
á User education
á Logistics planning
The model is scalable because, according to the size and needs of the
project, all six roles can be distributed to six different teams, or among
fewer teams (with some teams performing multiple roles), or among
more than six teams (some roles will be performed by several teams).
In the most extreme case, one individual might perform the tasks of
all six teams.
Chapter 1 DEVELOPING THE CONCEPTUAL AND LOGICAL DESIGN AND DERIVING

THE PHYSICAL DESIGN
19
04 002-8 CH 01 3/1/99 7:38 AM Page 19
20 Part I VISUAL BASIC 6 EXAM CONCEPTS
THE VB ENTERPRISE DEVELOPMENT
MODEL
The exam objectives speak of tying conceptual, logical, and physical
designs together. The idea of a conceptual design, a logical design,
and a physical design, as noted in the preceding section, belongs to
VB5 and Visual Studio 5 documentation; here it is referred to as the
VB Enterprise Development Model.
Brief descriptions of the three design phases follow:
á Conceptual design regards the system from the point of view of
the proposed system’s users.
á Logical design identifies the business objects and underlying
services required by the conceptual design.
á Physical design identifies the specific implementations of the
logical design, including the specific hardware and software
solutions.
Because the VB EDM is the focus of the exam objectives on this topic,
the following sections of this chapter deal with them more extensively.
The Conceptual Design
The exam subobjectives do not require the exam candidate to derive
a conceptual design, but just to derive a logical design from an
existing conceptual design. This discussion will therefore just
describe what a conceptual design is, as opposed to discussing how
to derive a conceptual design.
A conceptual design consists of three deliverable items:
á User profiles describe who the system users are and how they tie
into the system. For example, user profiles might describe vari-

ous functions in the system such as data entry clerk, credit
manager, and sales person, including the type of role each
plays with respect to the business process being modeled.
á Usage scenarios for the current system state (optional) describe
how users work with the current system. Examples for current
system usage scenarios would be similar to examples given for
proposed system usage scenarios.
04 002-8 CH 01 3/1/99 7:38 AM Page 20
á Usage scenarios for the proposed system state describe how users
will work with the new system to be developed. For example,
different usage scenarios might describe how sales people will
contact customers and take orders, how data entry clerks will
enter orders from sales people or by phone, and how credit
managers will check credit and approve or reject orders.
Deriving the Logical Design From the
Conceptual Design
. Given a conceptual design, apply the principles of modular
design to derive the components and services of the
logical design (70-175).
Microsoft lists the following steps to derive the logical design:
1. Identifying business objects and services
2. Defining interfaces
3. Identifying business object dependencies
4. Validating logical design
5. Revising and refining the logical design
For purposes of the certification exam, you can focus on the first step,
identifying business objects and services. It is this step where you
actually derive the initial logical design from the conceptual design.
Overview of Business Objects
In the context of software solutions, a business object is a logical

and physical entity that represents a physical or conceptual entity
connected with the business environment at hand.
Examples of business objects might include the following:
á Accounts
á Customers
á Purchase orders
á Invoices
Chapter 1 DEVELOPING THE CONCEPTUAL AND LOGICAL DESIGN AND DERIVING
THE PHYSICAL DESIGN
21
04 002-8 CH 01 3/1/99 7:38 AM Page 21
22 Part I VISUAL BASIC 6 EXAM CONCEPTS
Your software solution will implement representations of these busi-
ness objects. Each object has its own attributes (properties) and
actions (methods) and interacts with other objects through a system
of messages (events and callbacks).
As stated in the preceding section, one of the main tasks of logical
design (and the task that the certification exam tests) is to identify
business objects from the usage scenarios of the conceptual design.
The following section discusses how to derive business objects from
the conceptual design.
Identifying Business Objects
Essentially, you can make a first pass at identifying business objects
by identifying the major nouns in the usage scenarios.
You can identify the relations and interactions between the business
objects by identifying the significant verbs in the usage scenarios.
You can classify the relationships between objects into several main
relationship types:
á Own. Indicated by verbs such as “owns” or “has.”
á Use. Indicated by verbs such as “uses.”

á Contain. Indicated by verbs such as “holds,” “contains,” or
“consists of.”
á Generalize. Indicated by verb phrases such as “is an example
of” or “is a.”
Deriving the Physical Design From the
Logical Design
To derive the physical design from the logical design, you take the
following major steps:
1. Allocate services to components. Derive components from the
logical objects and determine whether each object is a user,
business, or data service object.
2. Deploy components across the network. Assign the components
to locations on the network.
04 002-8 CH 01 3/1/99 7:38 AM Page 22
3. Refine component packaging and distribution. Group
components according to the system’s needs.
4. Specify component interfaces. Define relations between
components.
5. Validate the physical design. Make sure that each component
corresponds to a service in the logical objects.
Once again, the VB6 certification exam does not require you to
know each of these steps in detail. Instead, as the subobjectives state,
you should concentrate on the following:
á Assessing the logical design’s impact on the physical design
á Designing VB data access components for a data access tier
á Designing properties, methods, and events of a component
The following sections discuss these three topics.
Assessing the Logical Design’s Impact
on the Physical Design
. Assess the potential impact of the logical design on

performance, maintainability, extensibility, scalability,
availability, and security (70-175 and 70-176).
The certification exam objectives list the following ways that a logi-
cal design can impact the physical system derived from it:
á Performance
á Maintainability
á Extensibility
á Scalability
á Availability
á Security
The following sections discuss each of these design considerations.
Chapter 1 DEVELOPING THE CONCEPTUAL AND LOGICAL DESIGN AND DERIVING
THE PHYSICAL DESIGN
23
04 002-8 CH 01 3/1/99 7:38 AM Page 23
24 Part I VISUAL BASIC 6 EXAM CONCEPTS
Performance
Performance considerations include the speed and efficiency with
which the system does its tasks. Performance needs to be evaluated
from two points of view:
á The timeliness of activities from the point of view of system
requirements.
á The timeliness of system activities from the users’ point of
view, both in terms of perceived speed (slow perceived speed
can be a frustration factor) and in terms of allowing them to
do their jobs appropriately. (You don’t want phone calls back-
ing up for an order entry clerk because the system takes too
long to approve the current order.)
You must often balance performance against some of the other con-
siderations, because the features that can give better performance

often degrade other desirable aspects of the system.
If users all have very powerful workstations and the server’s resources
are limited, for instance, performance might improve if more pro-
cessing were delegated to the server.
Putting more processing logic on the workstations might compro-
mise maintainability, however, because there would be more distrib-
ution problems when a change was needed, because it would be
likely that the elements needing maintenance would reside on the
users’ systems.
Improving performance may, however, have a positive effect on con-
siderations of scalability, as described in the section titled “Scalability.”
Maintainability
The two basic rules for better system maintainability may seem to
contradict each other:
á Centralize the location of services whenever possible so that
there are as few copies of the same software entity as possible
(preferably, only a single copy). This centralization means that,
if a component breaks, you have very few locations where you
need to replace it with the fixed version.
04 002-8 CH 01 3/1/99 7:38 AM Page 24
á Break services into smaller components that have completely
well-defined interfaces. Such modularization will keep prob-
lems isolated to very specific areas, making them easier to track
down and fix. With well-encapsulated, smaller modules, the
chances are smaller that a problem will affect a large area of the
application and that fixing it will have complex ramifications.
The apparent contradiction between these two rules can be resolved
by stating them together as a single, simpler rule:
á Break services into smaller, encapsulated components and put
them all in a centralized location.

This drive toward more encapsulated, more specialized components
has been part of the general movement away from the simple
client/server (two-tier) Enterprise Application Model toward a three-
tier and finally an n-tier model. The rationale for such multiplication
of tiers in terms of maintainability lies in the following reasoning:
If you want to centralize processing, you need to take more process-
ing away from the client (a “thin client”). This would imply at least
another tier (a “business services tier” in addition to the more tradi-
tional “data tier”) on the server.
If you want to break services down into a number of components,
once again you multiply the number of tiers as follows:
á The business tier might break up into several components.
á The data tier could split into a back-end data tier (representing
the database server itself, such as SQL Server) and a business
data-access tier (representing customized data access procedures
to be used by the data objects). The section titled “Designing
VB Data-Access Components for a Multitier Application” dis-
cusses data-access component design in more detail.
The method of deployment, or distribution, to users also affects
maintainability. If it is harder to get changes out to users, the solu-
tion is inherently more difficult to maintain.
Therefore, a solution that must be distributed to users on disks and
that depends on the users to run a setup routine will be less main-
tainable than a solution that is implemented as an Internet down-
load, because the Internet download happens automatically as soon
as a user connects to the application’s Web page.
Chapter 1 DEVELOPING THE CONCEPTUAL AND LOGICAL DESIGN AND DERIVING
THE PHYSICAL DESIGN
25
04 002-8 CH 01 3/1/99 7:38 AM Page 25

×