About the Code

[Previous] [Next]

Nearly all the code in this book is written in Microsoft Visual Basic, Scripting Edition (VBScript) and exists as client-side script in a web page or as script in an ASP (Microsoft Active Server Pages) page. (However, Chapter 11 contains code written in Visual Basic.) This is not meant to imply that the Office Web Components can be scripted only in web or ASP pages, nor is it meant to imply that you cannot use JavaScript, C++, or other COM-enabled languages. My choice of VBScript was based on two considerations:

  • Developers familiar with programming Office will be more familiar with VBScript than with other languages because VBScript is a subset of VBA, which is the programming language embedded in Office applications.
  • VBScript has more functionality and far better error-handling capabilities than JavaScript. This enabled me to write better examples and more robust solutions.

My choice of web and ASP pages (as opposed to Visual Basic or C++ applications) as the execution context was primarily due to developers' current excitement about these environments. Many developers recognize the benefits presented by Internet technologies, and I wanted this book to illustrate how the Office Web Components work in that environment.

My naming and coding conventions might be slightly different than what you have seen before. I developed them when implementing information systems in Microsoft's Information Technology group. My conventions are similar to most naming conventions evangelized by others, using consistent prefixes to variable names to denote their purpose in the code. However, while others base prefixes solely on a variable's data type, I prefer to encode a bit more meaning into my prefixes. For example, instead of giving a prefix of "l" or "n" to all Long number variables, I use a prefix that denotes the variable's purpose, such as "ct" for counter or "id" for unique identifier.



Programming Microsoft Office 2000 Web Components
Programming Microsoft Office 2000 Web Components (Microsoft Progamming Series)
ISBN: 073560794X
EAN: 2147483647
Year: 1999
Pages: 111
Authors: Dave Stearns

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