Kbase P12240: Why should business logic/rules be placed within the SmartDa
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  21/08/2003 |
|
Status: Unverified
GOAL:
Why should business logic/rules be placed within the SmartDataObject?
FACT(s) (Environment):
Progress 9.x
FIX:
You should always express business rules in SDOs or other general purpose data management objects, never in the User Interface. If you keep logic out of the User Interface, you can substitute a different User Interface and you don't lose anything. It generally guarantees that no matter how the data is accessed, the business rules which control it will be executed properly.
If you embed a piece of business logic into a particular visual object, this code will not be executed if some other Viewer or other visualization is created to display the same data. Also, if the business rule changes, the developer responsible for that maintenance must now locate all the visual objects where bits of logic such as this have been encoded, and modify them, which can be difficult and time consuming.