Chapter Two

Design Issues

2.0 Introduction

This chapter looks at the design of both the original QuickBasic™ version and the new Java™ version and critically reviews them and the issues that arose.

2.1 High Level Architecture

Drawing of a PC linking to a Gilbarco TMS-15

The physical link between the P.C and the Gilbarco TMS-15 consists of a specially constructed a cable (very similar to a null-modem cable) that is attached to a serial port on the P.C and a "Channel" port on the Gilbarco TMS-15. The "Channel" ports are the Gilbarco TMS-15 equivalent to the P.C's serial port.

2.2 Design of the Structured Till Link

The various modules, which constitute the QuickBasic™ link to the Gilbarco TMS-15, were investigated and their inter-relationships are shown below.

The software modules in the QuickBasic link to the Gilbarco TMS-15

This interrelation was then modified to show the heirachy of the various modules.

QuickBasic Module Heirachy

The operator can only see the modules running at the application level. This appears to the operator as a series of menus displayed using FCMain.bas and these change depending on whether the operator is viewing the "Sales Ledger" or the "Till Update Routines" menus.

When an option is chosen the "include" level files are used to connect to the Gilbarco TMS-15 and the appropriate action is taken.

As can be seen from both diagrams, the interaction between modules is complex. Some modules are "include" files in more than one other module making the dependencies very hard to follow.

A break down of the advantages of using QuickBasic™ and this model follows:

  1. Software reuse is enabled e.g. FCMAIN.BAS, which is used throughout the "Forecourt Plus" BackOffice system produced by Source Computing Ltd.
  2. Line numbers do make it far easier to debug than function names, when using The QuickBasic compiler. This is because when only function names are used, the QuickBasic compiler reports that all errors are at line 0 regardless of where they occur.
  3. Compiled code runs quickly.
  4. The software can run on a 286 PC because of backward compatibility and also the compactness of the software, both in terms of its size and the amount of systems resources it uses.
  5. Tried & tested technology. Programs have been updated over the years but the basic communication was written 10 years ago.

The disadvantages of using QuickBasic™ are now shown:

  1. Debugging is very difficult if an attempt is made to program using function names rather than line numbers. This occurs because the compiler will point to a block of code rather than a particular line when using function names. In the instance of only using function names within a program, any errors point to the first line of the program, even if the error is on line 2000.
  2. Changes to one module can have a knock on effect, for example, change to INCT15LK.BAS requires recompiling of T15TUPRO.BAS and also T15SSLUPD.BAS, which would then require FPSSLNAM.BAS to be recompiled.
  3. The limits of DOS file name structure (7 characters for the name and 3 characters for the file extension) can lead to hard to understand file names, especially for maintainers of code who may not understand the naming convention as well as the original programmer.
  4. Short variable names make code hard to understand.
  5. Use of "$include's" enables code reuse but makes module harder to follow because "gosub's" can be made to the "include" file and therefore many modules need to be looked at, when following the operations of a function.
  6. No data encapsulation between modules occurs when "include" files are used. There are many global variables in the Till Link.
  7. The modules are not decomposed enough and do too many things different things.
  8. There is a prevalent use of "Goto's" within the modules making it extremely hard to follow the flow of the code and this also goes against one of the main reasons for structured programming's creation in the beginning.
  9. The age of the software and the updating within that time may have lead to a loss of integrity due to the original vision being lost.

2.3 Design of Object-Orientated (Java™) Till Link

flow diagram for the till linkThis is the high level design for the Till Link.

These are the class designs for the classes that constitute the Till Link:

the classes for the link to the tillthe rest of the classes

This is the high level design for the application that utilises the Till Link:

flow diagram of the front end application

This is the class diagram for the application:

class diagram for the front end software



Back to Contents

logo - Valid XHTML 1.0!Valid CSS!Best viewed inMozilla FirefoxMozilla Firefox