sepdbui

Separate UI from DB-access (UI in line nnn of <filename>)

Rule "sepdbui" gives this warning when it finds statements for User-Interface and also statements for database access in the same compilation-unit.

The text of the warning contains the first line number where a User-Interface statement was encountered.

The first occurence of a database access is found on the line number listed in the "line" column of the Results window.

Statements for User-Interface include keywords such as ENABLE, DISABLE, MESSAGE, DISPLAY, APPLY or references to form widgets like buttons or fill-ins.


Statements for database acces include any reference to a record buffer, unless it's a buffer for a temp-table record.

the risc:

The program is not ready for n-tier deployment; it is not easily possible to reuse the database logic with a different user-interface.

implementation:
This rule is implemented in Turbolint.