Business Rules in Java or Database?
By Sandra Muller on Oct 09, 2006
Gustavo writes in to ask how to migrate Oracle Forms business rules, for example when using JHeadstart Designer Generator. In case all business rules are
inside the Forms application, do you translate every business rule to the appropriate "spot" in
the ADF BC Framework or do you use CDM RuleFrame?
The answer is: it depends! Each solution has its pros and cons, and it depends on the circumstances which choice is best. I'll describe some characteristics, you can decide for yourself which are advantages and which are disadvantages, and how big a (dis)advantage it is. The characteristics not only apply when migrating Forms to Java, they apply in general when deciding where to put business rules when building a Java application using ADF Business Components on top of an Oracle database.
Characteristics of using ADF Business Components for business rules
- Needs Java skills
- Needs Oracle JDeveloper and ADF Business Components
- The rules are enforced for each application that is based on these ADF Business Components (including JHeadstart-generated applications)
- Usually faster user-feedback than business rules in the database
- Needs PL/SQL skills
- Needs Oracle Designer and iDevelopment Accelerators
- The rules are enforced for each application that is based on these database tables and that opens/closes CDM RuleFrame transactions and knows how to display CDM RuleFrame error messages (this is no problem for JHeadstart-generated applications: just turn on a built-in feature)
- Usually slower user-feedback than business rules in the application server