Copyright © 2007 SoftVelocity, All rights reserved worldwide

Clarion Business Rules Manager Application Guide

The Clarion Business Rules Manager Application Guide is an excellent resource for programmers who not only want cost-effective, self-paced training, but are also looking for in-depth content from professional trainers. The Guide is authored by some of our best programmers and educators.

Designed to teach developers the ins and outs of the Clarion development approach, and the techniques to create bullet-proof applications, the guide is focused to provide specific tutorials and answers to questions on how to implement the features available in the Clarion Business Rules Manager.

The Guide begins by defining a real world scenario that demonstrates the validity of implementing business rules. We should normalize business rules in much the same way that we normalize data to decrease the total cost of maintenance, increase productivity and reduce duplication of effort.

A Matter of Design

Databases

Serious Clarion developers take great pains in the design of databases. A good database design
can make or break the system it supports, depending on the extent to which it:

• Provides data for both ongoing and ad-hoc requirements
• Eliminates data redundancy
• Assures relational integrity between tables
• Provides a sound framework for future expansion

Whatever methodology is used to achieve these goals, the resulting structure is embodied in a dictionary. By using the ABC library for all database operations, you can assure that these operations are carried out in a manner consistent with the constraints specified in the dictionary. In short, you have to work at it to mess up a good database design.

Business Rules

Business rules are quite another matter. Chances are that the code enforcing a given business rule sits in an embed point of a form procedure. If the same field occurs on more than one form, there probably are multiple copies of the enforcing code. When a
business rule changes, you have to find all of its implementations and correct each one of them.

To make things worse, business rules change more often and with less advance warning than database structures.

Wouldn’t it be nice if the code enforcing a given business rule occurred once, only once, and in a place you could easily find it? Clarion provides several ways to accomplish this, and the rest of this guide is intended to help you choose and use an appropriate
technique for managing business rules in your application.

Normalizing Business Rules

Design Goals

We normalize a database design to eliminate redundancy and facilitate access. The same term might well be applied to the design of code which implements business rules.

The aims of normalization are:

  • Uniqueness: To assure that the code which enforces and/or implements each business rule occurs once, and only once, in the application. This simplifies and streamlines development, testing, and maintenance.

  • Independence : To separate business rules code from entry screens, making it possible to invoke it from any point in the system.
  • Consistency: To assure that business rules code is always exercised when it should be, thus avoiding opportunities to compromise the integrity of the system and its data. Clarion Techniques

In a Clarion context, there are at least three ways to centralize business rules code:

  • Dictionary-based code lets you specify business rule enforcement in the dictionary and counts on the ABC File Manager to enforce those rules. While it has some limitations, it is generally quick and easy.
  • The Rules Manager template and its associated classes provide another way to centralize business rules. This tool also supports visual indicators on input forms which highlight problem fields.
  • Advanced techniques can be devised using the Rules Manger or by using the template language in combination with user options in the dictionary.

In all three cases the strategy is the same. Removing validation code from the entry form eliminates any need for duplication of that code and in addition makes that code available to other procedures. The improvement in maintainability of your system can be dramatic. If your application is large and complex, a well-designed scheme for managing business rules can carry a very big payoff. This Application guide describes the use of all the available techniques with a focus on the use of the business rules class and template.

Advanced techniques covered:

  • Implementing business rules during bulk update processes
  • Implementing externally defined business rules that are runtime configurable

Contains:

  • Full Adobe PDF Guide
  • 10 example applications
  • A new template with extended functionality for data validation
  • An updated RulesManager template with additional functionality

 


Copyright © 2007 SoftVelocity, All rights reserved worldwide