How far to modulise?

davedynamic

Registered User.
Local time
Today, 23:16
Joined
Sep 26, 2001
Messages
18
I am rewriting some code for some reports. Currently there are three reports, however, there may end up being five or six.

All reports at some point use some of the messages, some of the reports have messages which are unique to that report.

The decision on which message to use is based on inputs and mathematical sums.

So far I have created a module to store the messages, which makes it easier to modify the messages and debug the code.

However, I am considering the problem of Metric, imperial and U.S. measurement systems. I wondered if I should modulise out the calculations so that I would call the calculations from the reports, the calculations would call the messages, and the messages would pass back to the report via the calculation fields.

In this way for a U.S. system I could simply replace the calculations module with a U.S. based one, metric a Metric based one and so on.

Anyone got any comments or suggestions?
 
Rather than pondering the 'what-ifs', why don't you just try it, using the various methods?

If you don't already have it, you might want to download NeatCd97.mdb from Microsoft to see how they've attacked some of the Unit Conversion issues.
 

Users who are viewing this thread

Back
Top Bottom