About This Book

[Previous] [Next]

If you've been looking for a set of Visual Basic-specific programming standards, you've probably been frustrated by the lack of available material. Steve McConnell's Code Complete (Microsoft Press, 1993) is a good book on programming standards, but it's directed primarily at C programmers and you'll rarely find a Visual Basic code example. A number of other languages, such as Pascal, are discussed, but Visual Basic comes across as a second-class citizen. Add the fact that much of Code Complete is higher-level theory supported by statistics, and you've got to really want to learn the material to make it through the book if you're a Visual Basic programmer.

In this book, I've tried to create a professional coding book for Visual Basic programmers, and just for Visual Basic programmers. If you're a C++ person, you might find the interface chapters worth a look, but overall you're not going to get your money's worth here. However, if you're a Visual Basic programmer, whether a student or a pro, the cost of this book will be paid back to you in spades if you learn about, and adhere to, even a few of the standards presented.

This book is not about application architecture, needs analysis, design specs , or testing; it is about development. Some of the topics, such as designing modules and procedures, certainly contain material you might find in a software design book, but it's presented here as practical guidance rather than as theory. You won't learn how to program here, but you will learn how to program better .

This book focuses on the practical aspects of standardization, with "practical" being the key word. Code samples are used liberally, showing both good and bad coding techniques. Where necessary, alternate methods are shown and discussed. I've also taken a lot of time to format the code in this book to look much like the code you work with in Visual Basic's code editor. I've used color and boldface accordingly , and I hope you find that it makes the code easier to read and adds a bit of character to what might otherwise be many dull code listings.

For clarity's sake, I've attempted to present the material in each chapter in a uniform way. The content of some chapters does not lend itself to fitting a strict mold, so, where necessary, some minor deviation occurs. Generally, however, each chapter begins with a general discussion of the ideas and topics covered in the chapter, including problems or issues that the standards address. The purpose of this beginning section is not necessarily to teach you the standards and methods to apply to overcome the problems, but to educate you concerning the issues themselves . I've tried to refrain from putting too much code in this section and instead reserved the detailed code examples for later in each chapter.

Following the general information is a bulleted list of goals related to the specific programming issues covered by the chapter. If you choose not to implement a standard discussed in a chapter, you should still make sure that you are meeting the goals listed in the chapter. The best approach to the particular programming issues is to follow the standards presented in the chapter, but, as I'm sure you're aware, many of these issues can quickly divide a team of developers into factions. If you feel strongly that a standard I'm arguing for is not appropriate, employ some other technique that meets the goalsjust meet the goals.

In every chapter you'll find a number of directives that is, specific standardization techniques intended to direct and guide you. Each directive is numbered with the chapter number and directive number (for example, 10.1). This numbering scheme serves two purposes: it makes it easy for you to cross-reference directives within the book, and it allows managers and teachers to compile a specific list of directives to use within their development projects or instruction. Each directive section includes text explaining how and why to implement a specific standard and usually code samples that apply and fail to apply the directive.

Sometimes within a directive section I will offer one or more practical applications even more detailed directives related to the directive they follow and illustrating specific components of that directive. (An "application" in this context refers to the application of a technique, not to a program.) Almost every practical application includes a code example that doesn't adhere to the related standard, as well as the same code process written according to the standardization rules. At times, alternate examples are given when there is more than one acceptable solution. These examples go far beyond Debug.Print "Hello World". Most, if not all, of the code examples come from real-world commercial projects, and many are full procedures. I hope this code will make the benefits of a given technique more readily apparent and make the technique easier to implement in your own projects.

Some directives and practical applications will be more relevant to your situation than others, and that's OK. In certain cases, I try to point out standards and techniques that are very importantthat is, areas where deviation should not occur. Even in those cases, however, you might decide differently than I do. The key in the end is to accept a formal set of standards and to apply those standards consistently. The benefits of doing so are there for the taking. After reading this book, you will write better code.



Practical Standards for Microsoft Visual Basic
Practical Standards for Microsoft Visual Basic .NET (Pro-Developer)
ISBN: 0735613567
EAN: 2147483647
Year: 2000
Pages: 57

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net