Appendix C -- TMS Developer s Framework

Appendix C

TMS Developer's Framework

Since 1995 all TMS applications have been built using three interlocking, key building blocks. Collectively these building blocks are known as the "TMS Developer's Framework" (TDF):

  • VB Vogue

  • Application Template

  • Vogue Tools

Each building block can be purchased separately or as a set of complementary components that constitute the "Framework." Each element of the TDF is briefly explained below.

VB Vogue

VB Vogue is TMS's Visual Basic "Developer's Discipline" and Coding Standards reference document. It currently numbers around 70 pages.

VB Vogue is much more than a set of traditional coding standards. As well as defining naming conventions and coding style guidelines, it also includes sections on Year 2000 "readiness," component versioning, guidance on data access methods and structured exception handling techniques—to name but a few. Throughout, it is VB Vogue's aim to give clear explanations and justifications for any advice or rules that it mandates. During VB Vogue's development TMS made a conscious decision that it be much more than an informational reference book. Our key objective was to ensure it was also instructional and educational. The result: a valuable asset for any development team.

Application Template

TMS's Application Template, or App Template, contains around 18,500 lines of tried and tested infrastructure and support code, and is used on some of the world's biggest Visual Basic development projects. The App Template is actually made up of forms, classes, and modules that collaborate in assisting developers to support the advice or rules given in VB Vogue, allowing the developers to be productive and professional in how they code. For example, the App Template contains the routines necessary to log exceptions using a variety of methods (file, NT event log, database, and so on). Structured exception handling, as we know from development "best practice" (endorsed by VB Vogue), is a mandated facet of any professional development project. By allowing the developer to easily support such professional features, the overhead and burden on the developer is removed from any individual. The result is that any overhead incurred in adding (in this case) structured exception handling is effectively removed. Through logging the precise nature and location of errors, the Debug, Build, and Test cycle is far more efficient and controlled, and in turn offers substantial cost savings. In addition, once the product is shipped, the subsequent pressure on the support/help desk is significantly reduced.

Here is a small taste of what the App Template contains: platform and version checking; standard forms; enhanced replacement Visual Basic intrinsic objects such as Err, App, and Debug; installation support; "real" assertions; storage support (for accessing the Registry, etc.); string handling; and of course, structured exception and error logging.

Ever since its inception the App Template has been revised for each new release of Visual Basic and/or whenever a TMS developer can justify a reasonable modification. For example, inbetween Visual Basic 4 and Visual Basic 5, one revision was increased support to assist developers with the Year 2000 problem. This included providing standalone routines to check the validity of any entered date, and a new control. The template contains ancillary—although very valuable—components such as the DateBox control. This is an OCX (built using Visual Basic 5 and 6) designed to replace any TextBox control that is used to hold and/or manipulate dates. A DateBox, unlike a TextBox, mandates that any input sent to it should be "Y2K Safe" and at the same time "map" to whatever the user has set as a preferred Short Date setting. The DateBox control is sophisticated and includes many advanced features such as the ability to define any day of the week as invalid (so that the user cannot, for example, enter a date that is in actuality a Sunday where the date of a "working day" is expected). The control can be set, through design time properties, to generate a variety of behaviors that describe how it should respond to invalid dates. For example, should it generate a Visual Basic exception; should it prompt the user with a customizable error message; should it force the user to reattempt the data entry. And if the answer to the latter is yes, how many times should it force the user to retry before generating an exception.

At the time this book was being written App Template was being re-architectured into a set of controls, wizards, add-ins, modules, classes, and server-side objects.

In summary, the App Template contains everything that most serious applications should have but isn't part of their specialist function.

Vogue Tools

From the descriptions of VB Vogue and App Template, the user will see that the application of either involves taking actions that will directly manipulate code or form definitions. For example, to fully use the DateBox control a developer must replace all TextBox controls used to capture dates with DateBox controls. Obviously, this will result in a drawn out, laborious, and mostly manual alteration of the project's code. Also, as we saw, VB Vogue mandates that exception handlers be added to every routine in a project—again, a tedious manual process would result. Such necessary tedium typically dictates that these critical alterations and additions to the code base are simply not carried out, or that they are applied piecemeal throughout the project. Obviously, both situations are unacceptable and need rectifying.

Vogue Tools are designed to ease any pain involved in applying such rigorous development practices as outlined in VB Vogue and in the updating of existing code, to use, say, the DateBox control. For example, to assist a developer in using the DateBox control, Vogue Tools contains a "lex"-built tool that can be used to replace date-containing TextBox controls with DateBox controls. Typical processing time for an entire project (depending on size) is around 10 seconds. As a further example, to add the necessary exception handling template code to a routine, Vogue Tools contains an IDE Add-In that can do just that with one button click. The current Vogue Tools are listed here:

  • Line Number Wizard

  • Error Handler Inserter

  • Lex DateBox Parser

  • Egrep32

Structured Exception Handling Scenario

As mentioned at the beginning of this appendix, all three components —VB Vogue, the App Template, and Vogue Tools—are designed to work together. Let's take a look at how this works with a Structured Exception Handling example.

VB Vogue mandates that each and every routine in a Visual Basic application must contain an exception handler. What that handler contains and how it should deal with errors is explained in VB Vogue. (For example, VB Vogue describes how exceptions should not only be caught, but how they should be logged.) However, VB Vogue does not include any of the necessary support and infrastructural code to actually do the next step. That part is delivered through the second component of the TMS Developer's Framework—App Template. Finally, Vogue Tools provides the Error Handler Inserter to insert the appropriate App Template code into the project.

How Are They Provided?

VB Vogue is currently provided as a Word 6.0/95 or Word 97 file. In the future it will be provided as a series of HTML files so that navigation can be achieved using a Web browser.

The App Template is provided as a single Visual Basic project in source code form: in other words, it is runnable. It also includes a .HLP file that contains product documentation. In the future this will be provided as a series of HTML files so that navigation can be achieved using a Web browser.

Vogue Tools are provided as built executables. Where appropriate to the running of the tool, source code is provided.

If you are interested in purchasing any or all of the TMS Developer's Framework Toolkit, please contact Sales@TheMandelbrotSet.com.



Ltd Mandelbrot Set International Advanced Microsoft Visual Basics 6. 0
Advanced Microsoft Visual Basic (Mps)
ISBN: 1572318937
EAN: 2147483647
Year: 1997
Pages: 168

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