Visual Basic 6 : Design, Specification, and Objects
This book uses a pragmatic approach to learning objects in Visual Basic, instead of the abstract, academic approach. The book concentrates on easy-to-read explanations. The book will have a CD-ROM which contains complete code in Visual Basic for all of the programs and samples described in the book.
- Mixed media product | 350 pages
- 175.26 x 233.68 x 30.48mm | 793.78g
- 19 Jul 1999
- Pearson Education (US)
- Prentice Hall
- Upper Saddle River, United States
Table of contents
1. Introduction. Changing the Balance. How the Book Began. Intended Audience. Understanding Objects. Using the 80/20 Rule. You Can Actually Read the Whole Book. Major Parts of the Book. Analysis, Specification, and Design. Objects in Visual Basic. A Distillation from Many Resources. Naming and Typographic Conventions. This is Just the Beginning....2. Why Do Analysis and Design? The Siren Song - "With VB, Who Needs Specs?" Confusing the User Interface with the Design. What if the User Doesn't Have a Clue? "But We're in a Hurry!We Don't Have Time for Specs!". How the Cost of Fixing Errors Rises Over Time. Other Benefits of a Good Design Process. Reduction of Risk. How Does Analysis and Design Fit into the Development Process? Getting the Religion.3. The Analysis Phase. What vs How - The Difference Between Analysis and Design. The Subphases of Analysis. Understanding the Business Concepts. Requirements Gathering. Functional Specifications. Combining Requirements Gathering and Functional Specifications. Who Writes the Analysis Documents?4. Requirements Gathering. Defining the System Vision. Defining the Application Domain. Why is the Application Domain Important? Getting to the Details - Use Cases. The Terminology of Use Cases. Developing a List of Use Cases. Keep An Open Mind. Types of Use Cases. Limitations of Use Cases. Gathering Detailed Requirements. Interviews. The Interview Process. General Suggestions For Interviews. Facilitated Meetings. Facilitator. Documentor (Sometimes Called Scribe). Common User(s). Power User(s). Managerial User(s). Development Staff. Ground Rules for the Meeting. General Suggestions. Documenting a Facilitated Meeting. Constructing a Requirements Document. Using a Template Document for Requirements. Include the System Vision and Application Domain. Trimming Requirements During Future Stages. Unanswered Questions. Success Measurements. Other Sections Which May Be Needed. Verifying Requirements Documents. The Importance of Ignoring the User Interface During Requirements Gathering. What Else You Should Usually Leave Out of a Requirements Document. Danger Signs. Suggestions for Further Reading.5. Functional Specifications. The Functional Spec - A Detailed Response to Requirements. Constructing the Functional Spec. Use a Template. Start with an Executive Summary. Organize the Main Body of the Document Along Functional Lines. Include Summarized Use Cases. An Iterative Process. Review and Validation of the Functional Specification. Place the Most Important Material Early in the Document. Validation Meetings. Completeness. Checking for Consistency. Relationship Grids. The Functional Spec as a Contract. Other Sections That May Be Needed. Documenting Algorithms in Functional Specifications. Using Diagrams and Visuals. Why There's (Still) No User Interface Design at this Stage. What Else to Leave Out. Detailed Database Designs. Reference Material and Other Filler. Danger Signs. Answer to Previous Exercise. Suggestions for Further Reading.6. Estimating. Upper Management Directives. "I Can't Change the Laws of Physics, Captain". Making the Case for Analysis and Estimation. Is Good Estimation Possible? Foundations of a Decent Estimate. Opposite Mistakes in Estimation. "I Won't Hold You To It...". Two Different Types of Estimate. When Should the Estimate Be Made? Decomposing into Tasks. Initial Decomposition. Let the Actual Developer Do the Estimate Whenever Possible. The "Three-Day" Rule for Decomposition. Getting the Final Estimate. Using Project Management Software. Fudge Factors. Expressing Estimates as a Range. Handling Surprises. Adjusting Deadlines - The "Time-Resource-Functionality Triangle". Finding a Balance.7. General Suggestions for the Analysis Phase. Getting Your Documents Reviewed. Up-Front Commitment. Give Users a Deadline for Reviewing Documents. Press for Feedback. Set an Example. Use Non-Technical Language Whenever Possible. Strive for Clarity. Document Your Assumptions. How Long Should the Analysis Phase Take? How Long Should the Documents Be? The Right Level of Detail in Specification Documents. Risk Analysis. Just Because a Document Says "Functional Spec".... Team-Based Approaches. "Gosh, this Sounds Like It's Going to Take a Long Time...". A Quick Overview of the Phases in Analysis. A Checklist for the Analysis Phase. Suggestions for Further Reading.8. Introducing Objects. Why Don't Most VB Developers Use Objects? A Different Approach. The Need for Concentrated Effort. Using the Enclosed CD. Do the Material in Order. A Non-Traditional Approach.9. Custom Properties and Methods for Forms. A Review of Forms as Objects. What are Methods and Properties? Two Ways of Using Properties. Custom Form Properties and Methods. Custom Form Methods. Constructing Custom Methods for Forms. Constructing Custom Properties for Forms. Property Get Procedures in Detail. Property Let Procedures. Making Sure All the Types Match Up. Public Variables as Properties. Some More Comprehensive Examples. Example 1 - A Splash Screen. Example 2 - A Custom Database-Open Form. Example 3 - A Login Form. Example 4 - A Generic Select-From-A-List Form. Example 5 - A List of Valid Drives. A Form We Don't Need to See.10. The Selection List Form - A Detailed Example. Step 1 - Create the Form and Put the Controls On It. Step 2 - Add Logic to Support Moving Items Between List Boxes. Step 3 - Add the Properties and Methods. Step 4 - Set Up the OK and Cancel Buttons. Step 5 - Set Up the Code to Load and Use the Form. Suggested Enhancements.11. An Introduction to Class Modules. The Valid Drives Example. Creating a Class Module. Using Classes in Code. Building Classes with the Class Builder. Starting the Class Builder. Adding a New Class to the Class Builder. Adding New Properties and Methods to a Class. Drawbacks to Using the Class Builder. Summary.12. Examples of Objects and More Object Syntax. Some More Examples of Objects. A Settings Object. Encapsulating Records in Objects. A Database Sources Object. Changing Object References. Why is a Set Statement Necessary? The Nothing Keyword. Object Variables with a Generic Type. Finding Out the Type of An Object. The Life Span of an Object. Declaring the Object Variable. Object Instantiation. Manipulation of the Object. Termination of the Object.13. Collections. A Collection - A Special Type of Object. Forms Collection. Controls Collection. Syntax to Access Collections. For Each Loops. Create Your Own Collections. A Report Columns Collection. A Collection of Projects. An Employee Scheduling Example. Implementing Collections in Code. Add Method. Count Property. Item Property and the Index of an Item. Remove Method. Creating a Collection with a Class Module. Adding Intelligence to Wrapped Collections. Naming Suggestions. Inconsistent Numbering and Conventions. Collections vs Arrays. Indexed Collections. The Key Argument for the Add Method. Before and After Arguments. Some Terminology. More On Collections. Use Wrappers. NewEnum Method. Default Item Property. Changing the Key for an Object in a Collection. An Example.14. A Detailed Objects Example - Selecting Records. The Problem Statement. Constructing the Program. Creating the Form. Create Objects to Handle Selection Criteria. This is Just the Beginning.15. More About Objects. The Concepts of Inheritance and Polymorphism. Class Hierarchies. Simulating Inheritance. Polymorphism. How Objects Fit into Programs. ActiveX Components. In-Process Servers. ActiveX Controls. Object Tags. Enumerated Constants. The Property Set Routine. Public Functions as Methods. Programming Events. Setting Up a Class to Fire its Own Events. Who Receives an Event? Events with Arguments. When to Use Events. Alternate Interfaces. The Available Interface Depends on the Declaration. You Must Code All Elements of the Interface. An Advanced Exercise. The Object Browser and Documentation of Objects. Some Final Object Examples. A Reporting Example. A Layered Data Maintenance Example. Testing Objects. Going to the Next Stage. Recommendations to Go from Here.16. The Prisoner's Dilemma - An Exercise in Inheritance. Game Theory - A Branch of Mathematics. The Prisoner's Dilemma Story. The Iterated Prisoner's Dilemma. The First Computer Simulations of the Prisoner's Dilemma. Writing Your Own Computer Simulation. The Prisoner's Dilemma - An Exercise in Object Design and Programming. Developing the Generic Player Object. Developing a Specific Player Object - Tit for Tat. Developing the Other Player Strategy Classes. Developing an Interface to Run the Game. Moving Beyond Tit for Tat - Fuzzy Communications. Some Final Comments on the Prisoner's Dilemma.17. Object Workshop - Programming the Data Maintenance Object. The Scenario. Data Maintenance Object - Properties and Methods. Fields Collection and the Field Object - Properties and Methods. How Forms Use the Data Maintenance Object. Start of Exercise. Step 1. Creating the Generic Form. Putting the Generic Form in the Templates Directory. Getting a Project to Work In. Creating the Field Object. Create the Data Maintenance Object. Advanced Feature - The Bookmark Object and the Bookmarks Collection. Enhancing the Generic Form. Creating the Bookmark Object. Enhancing the Data Maintenance Object. Summary.18. Wrap-up on Objects. You Don't Have a Choice. Faster Development. Dramatically Lower Bug Count. Reusability. Less Expensive Maintenance. Objects in Internet Development. Webclasses. Designing Objects. Questions You Should Ask Yourself. Suggestions for Further Reading.19. The Design Phase - Introduction. What vs How - The Difference Between Analysis and Design. The Subphases of Design. What Documents are Produced During Design? Who Does the Design Documents? Designing a System Architecture. Use Multitiered Architecture - Even on a Single Platform. Keep the Client Thin. Don't be Afraid of COM. What are the Other Products of the Design Phase? Methodologies and Best Practices. Thinking Outside the Box.20. Data Design. Persistent Information. Tools for Designing Databases. Steps in the Process. Analyzing the System for Necessary Data Elements. Organizing the Data Elements into Tables. Determining Relationships among Tables. Setting Table Indexes. Normalizing the Data. Determining Validation Requirements for Data Fields. Building Queries or Stored Procedures. Referential Integrity. An Example of Database Design. Determine the Tables. Determine the Fields. Determine the Relationships. Determine the Indexes. Normalizing the Data. Validation and Stored Procedures. Using ADO for Database Access. Suggestions for Further Reading.21. User Interface Design and Usability Testing. Examples of Poor Interfaces. General Principles for Good User Interface Design. Keep It Clean. Make the Interface Responsive. User Color Sparingly. Tailor the Interface to the User. Use Tool Tips. Don't Stack Up Dialog Boxes. Use Right-Click Menus. Copy Good Ideas. Development of a Good Interface. Prototypes. What Exactly is a Prototype? Using Paper for Early Prototypes. The Need for Multiple Prototypes. Iterate the Prototype. Throw Away Your Prototype! An Example from a Real Project. The Role of Users. Validation. Basic Usability. Initial Exposure to the Interface. Investigative Questioning. Explanation and Discussion. A One-On-One Experience. Tabbed Interfaces - Pros and Cons. Inadequate Classification. Confusion On Levels of Operation. Hidden Changes - "Out of Sight, Out of Mind". The Move to Browser-Based Interfaces. Suggestions for Further Reading.22. Designing Objects. Designing Individual Objects. Start on Paper. Get Help On Your Early Efforts. Some General Principles. Analyzing Requirements for Objects. Other Object Candidates. Relationships Among Objects. Documenting Object Designs. The "Butcher Paper" Method. CRC Cards. UML Design Tools. A Short Introduction to UML. Types of UML Diagrams. Using a UML Diagramming Tool. Design Patterns. Common Mistakes in Object Design. "Everything's An Object". Too Many Collections. Restricting Attention to Data Objects. Trying Too Hard to Model the Real World. Suggestions for Further Reading.23. Additional Design Topics. Special Considerations for Commercial Software. Error Handling and Activity Logging. Installation and Packaging. A Higher Bar for User Interface Design. N-Tier Architectures. The Component Object Model (COM). Microsoft Transaction Server. Designing Routines.24. Methodologies and Best Practices. Structure vs Flexibility. Good Development Practices. An Appropriate Definition/Analysis Phase. Developer Involvement in Setting Deadlines. A "Go/No Go" Decision Point. Iterative Design. Source Control. A Mechanism for Gauging and Measuring Progress. Post-Production Documentation. A Celebration. Methodologies. The Microsoft Software Development Methodology. Fundamentals of the MSF. Traditional Methods. The MSF Process Model. Some of the Philosophy. The Culture of the MSF. Some Final Comments on the MSF. Other Methodologies. Getting a Methodology Started. Processes Don't Build Software - People Build Software.25. Thinking Outside the Box. Locking onto the First Design. Stimulating Creativity. An Example of Literally "Thinking Outside the Box". Use All of Your Brain.26. Conclusion. Processes Don't Build Software - People Build Software. Dealing with Bad Developers. Spotting Good Developers. Be Flexible. The Framework Concept. Don't Stop Learning.APPENDIX A: Sample Code References for the Object Workshop. Code Reference #1. Code Reference #2. Code Reference #3. Code Reference #4. Code Reference #5. Code Reference #6. Code Reference #7. Code Reference #8. Code Reference #9. Code Reference #10. Code Reference #11. Code Reference #12. Code Reference #13. Code Reference #14.Appendix B: Bibliography and References. INDEX.
About Billy Hollis
Billy S. Hollis is Director of Consulting Services at Oakwood Systems Group, Brentwood, TN, and Microsoft's MSDN Regional Director of Developer Relations in Tennessee.