|
Real VB: A Practical Approach to Visual Basic Development in the Corporate World
Real Visual Basic features the issues, methods, and proven techniques you need to develop effective enterprise applications in the real world. This book explores Visual Basic's advanced capabilities and shows how VB provides solutions to the complex development challenges for corporations. Drawing on his extensive experience, the author dispels many
misconceptions about the Visual Basic language, highlights its object-oriented capabilities, points out common programming mistakes, and offers practical tips for real-world programming success.
This book addresses the major areas of enterprise development, including software lifecycle models, application architecture and design, hard-core coding and debugging, quality assurance, and project management. You will find detailed information on essential topics such as:
* Rapid Application Development (RAD) and VB
* Requirements-gathering and documentation
* Object design in VB
* User-interface design, including forms and prototyping
* Advanced data access coding
* MTS and MSMQ considerations in system architecture design
* Asynchronous program flow and creating ActiveX controls
* Practical quality assurance techniques
* Software distribution and creating and enforcing coding standards
Numerous examples and anecdotes from actual VB corporate development projects illustrate the mistakes to avoid as well as the approaches and techniques that lead to effective enterprise solutions.
0201616041B04062001
CONTENTS:
List of Myths.
Foreword.
Preface.
I. DEVELOPMENT PREREQUISITES 1.
1. Rapid Application Development with Visual Basic.
Rapid Application Development.
Picking the Right Tool for the Job.
Visual Basic versus Other Tools.
Choosing a Version of Visual Basic.
Business Tasks Best Suited for Visual Basic.
Business Tasks Not Suited for Visual Basic.
Project Failure.
Failure to Assess and Manage Risk.
Lack of Appropriate Quality Assurance Mechanisms.
Poor Understanding of Requirements.
Poor Communication, Especially between Primary Stakeholders and Developers.
Unrealistic Goals.
Lack of or Poor Design.
Arbitrary or Artificial Assessments of Progress.
Weak Team Members.
Lack of Employee Focus.
Promotion of Talented Technical People Out of Their Roles.
Further Reading.
2. Software Lifecycle Models.
Lifecycles.
Common Lifecycle Models.
Brute Force (a.k.a. Code-Like-Hell).
Waterfall (a.k.a. Linear).
Spiral (a.k.a. Iterative).
Lifecycle Models Compared.
Hybrids.
Further Reading.
3. Requirements Gathering and Documentation.
Requirements Gathering.
Use Case Models.
Creating Use Case Diagrams.
Use Cases: An Example.
Use Cases and Visual Basic.
Drawbacks of Use Case Analyses.
Documentation.
End User Documentation.
Technical Documentation.
Further Reading.
4. Analysis.
Proof-of-Concept Analyses.
Estimating, Scheduling, and Staffing.
Estimating Size.
Estimating Effort.
Scheduling.
Staffing.
Further Reading.
II. DESIGNING VISUAL BASIC SOFTWARE 69.
5. Architecture and COM.
System Architecture.
Common System Architectures.
MTS.
COM and VB.
Component Creation.
Language Independence.
Leveraging of Object-Oriented Concepts.
Separation of Interface and Implementation.
Automatic Object Lifetime Management.
Location Transparency.
Further Reading.
6. User Interface Design I: UI Concepts.
Elements of a Good User Interface.
User Interface Design and Use Cases.
Document-centric versus Task-centric Models.
Form Types.
System Modal.
Application Modal.
Always-on-Top Modeless.
Floating Modeless.
Modeless.
Interface Styles.
Single Document Interface.
True Multiple Document Interface.
MDI through Modeless Forms.
An Explorer-style Interface.
Further Reading.
7. User Interface Design II: Forms and Prototyping.
Detailed Form Design.
Assign Tasks to Forms.
Determine Form Navigation.
Choose Control Types.
Lay Out the Form.
Define Menus.
Add Gloss.
Define Help Elements.
Practical Implementation Tips.
DO Consider All Your Users.
DON'T Make the Same Mistakes Twice.
DO Create Cancelable and Reversible Tasks.
DON'T Ask Unreasonable Questions.
DO Trust Your Users.
DO Be Consistent.
DON'T Forget Preferences.
DON'T Provide Meaningless Error Messages.
DO Make Your UI Stateful.
DO Simplify Complicated Forms Using Progressive Disclosure.
Prototyping.
Creating a Prototype.
The Perils of Prototyping.
Further Reading.
8. Object Design I: Concepts.
Object-Oriented Concepts and Visual Basic.
Abstraction: The Overriding Principle.
Encapsulation.
Polymorphism.
Inheritance.
Visual Basic's Object-Oriented Features.
Abstraction.
Encapsulation.
Polymorphism.
Inheritance.
Further Reading.
9. Object Design II: Relationships and Design.
Object Relationships.
Collaboration.
Generalization.
Ownership.
Aggregation.
Overview of the Unified Modeling Language.
UML Diagrams.
UML Caveats.
UML Modeling Tools.
Designing Objects.
Further Reading.
10. Database Design.
Relational Databases.
Database Entities.
Tables.
Triggers.
Views.
Stored Procedures.
Normalization.
Normal Forms.
Denormalization.
Table Relationships.
One-to-One.
One-to-Many.
Many-to-Many.
Further Reading.
III. IMPLEMENTATION.
11. General Coding Practices.
Understanding Visual Basic's IDE.
The Procedure Attributes Dialog.
The Object Browser.
Options Dialog.
Good Programming Practices.
Understand Requirements.
Use Data Correctly.
Name Your Identifiers Well.
Practice Loose Coupling and Tight Cohesion.
Comment Constantly.
Think Reuse.
Bind Early.
Limit Visibility and Duration by Encapsulating.
Debug as You Go and Use Error Trapping.
Use Version Control.
Further Reading.
12. VB 6: The Good, the Bad, and the Ugly.
New Features in Visual Basic.
New String Functions.
Data Access.
CallByName.
Dynamic Control Addition.
Dictionaries and Collections.
Array Features.
CreateObject Enhancements.
FileSystem Object.
Class Enhancements.
Bugs: An Extended Flame.
Further Reading.
13. Data Access.
General Guidelines.
Multiuser Considerations.
Optimizing for Multiple Users.
Optimistic versus Pessimistic Locking.
Asynchronous Data Access.
The Windows Registry.
Registry Keys.
Registry Data Types.
Registry Functions.
Flat Files.
Local Data Files.
INI Files.
Data File Access.
Embedded and Dynamic SQL.
Further Reading.
14. OLE DB and ADO.
Overview.
Weaknesses of OLE DB.
Converting to ADO.
OLE DB Simple Providers.
The OLE DB Simple Provider Toolkit.
How It All Fits Together.
Creating the OLE DB Simple Provider Implementation.
Registering Your OLE DB Simple Provider.
Test-Driving the Provider.
Visual Basic 6 Data Sources and Data Consumers.
Further Reading.
15. Creating ActiveX Controls.
Control Basics.
Properties.
The Property Bag.
Examples.
A Better Textbox.
An Extended Timer.
Shaped Buttons.
Further Reading.
16. Advanced Topics in Visual Basic.
Asynchronous Program Flow.
Processes and Threads.
Notifications.
Windows NT Services.
Advanced String Handling.
Supercharged String Routines in VB.
Working with External String Functions.
Further Reading.
17. Debugging and Error Handling.
Debugging Techniques.
Walking through the Code.
Message Boxes.
Logging.
Making Bugs Noisy: Assertions.
Combining These Techniques: clsDebug.
Checking for Range Issues.
Fighting Memory Leaks: Tracking Object Lifetimes.
The Visual Studio Debugger.
Summary.
Error Handling.
Finding Errors.
Error Severity.
Logging Errors.
Interactive Alerts.
Error-Handling Infrastructure.
Further Reading.
IV. TESTING, REVIEWING, AND DISTRIBUTING SOFTWARE.
18. Quality Assurance.
Approaches to Quality Assurance.
Ex Post Facto, Ergo Splat.
Integrated Quality Assurance.
Metrics.
Reasons to Use Metrics.
Testing.
Debugging and Unit Testing.
Batch Testing.
Integration Testing.
System Testing (Alpha Testing).
Beta Testing.
Regression Testing.
Testing and Tracking Tools.
Further Reading.
19. Coding Standards: Part I.
Why Have Coding Standards?
Creating Coding Standards.
Scope of Standards.
Language Standards.
Naming Conventions.
Anatomy of a Good Naming Convention.
Hungarian Notation.
Further Reading.
20. Coding Standards: Part II.
Commenting Standards.
Procedure Header Comments.
Revision History Comments.
Inline Comments.
Code Construction Standards.
Use of Option Explicit.
Use of "Magic" Numbers.
Use of String Literals.
Use of GoTos.
Use of Archaic Language Elements.
Implicit versus Explicit Boolean Comparisons.
Variables after Next Statements.
Multiple-Variable and Constant Declarations on One Line.
Use of Single-Line If/Then Constructs.
Use of Type Declaration Characters.
Readability Standards.
Indenting Block Structures.
Use of White Space.
Long Lines of Code.
Function Length.
Project and Company Standards.
Changing Coding Standards.
Enforcing Coding Standards.
Code Reviews.
Coding up to Standard.
Further Reading.
21. Distribution of Software.
Planning the Rollout.
Things to Consider.
The Buildmaster Process.
Build Scripts.
Setup Tools.
VB's Setup Toolkit.
Third-Party Utilities.
SMS and Login Scripts.
Cloning Systems.
Patches and Updater Applications.
Further Reading.
Appendix: Developer Resources.
Bibliography.
Index. 0201616041T04062001
|