× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



jt wrote:

...
| which returns the next
| available transaction number as a string. Then, the users of the
| procedure are spared the gory details of the actual implementation.

What advantage does a procedure offer in this case...?

Well, that depends...

I try to design systems where the links between business, UI, program code,
and database are kept to a minimum (and I believe most good 400 architects
do also.)  So I like a database that is updated in as minimal number of
programs/modules as possible...  Ideally, there would be between 1 and 3
places the transaction number would be incremented and updated, in the first
place.
...

This brings up a point I thought of after posting my rant that I should have mentioned: Suppose you wanted to change the way transaction numbers were generated. Perhaps you want numbers to be persistent? Perhaps you want characters other than digits in your transaction numbers? Whatever. Coding the new transaction computation within a procedure (or wrapped in a class) allows you to more easily change the rules without affecting the calling code, making maintenance easier. Yet another advantage of the procedure.


...
I wish you could tutor me in Python some more!

I'll defer that task to others: http://www.python.org/doc/current/tut/tut.html


;-)

Cheers! Hans



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.