Generative Rules


The way applications, and specifically flexible applications built from business rules, create meaning is not through their ability to constrain updates; this merely ensures that whatever is presented is consistent. The way applications create meaning is through the judicious use of generative rules. The act of "creating meaning" consists of soliciting new information from the environment (primarily users) or from inferences that allow the creation of additional information. For example, we may deduce a traveler's frequent flyer status from a set of data about his or her flight history.

Generative rules create new information when they execute. Many different varieties of generative rules exist, and they range from simple calculations to complex inferences. Each time they execute, something new is generated. All of these are done in some fashion in a traditional application, the difference being that in a traditional application they are not done flexibly.

Derived Information

Any new data that is created from old data is "derived." After some reflection, we realize that this is the case for most data. The main exceptions are measurements, where we record something from the real world, and assessments, where we discover something about the real world. Almost everything else is derived.

Calculated Data

The simplest derived information is calculated data. "Amount" is often the calculated product of price times quantity. It can be coded into the program where price and quantity are input, but there are reasons for making it a separately declared rule; for example, you can do the following:

  • Express it in a way more likely to be understood by users and sponsors

  • Change it more easily

  • Reuse it more easily

  • Defer executing it until you need it

Slightly more involved calculated data include those that deal with sets of data as opposed to discrete items. For example, we could declare an average over a set of values. We have to have a way of referring to that set. Other representative generative rule types include the following:

  • Categorization rules, also referred to as projection controllers, establish that an item belongs to a particular category.

  • Enablers set a behavior to be active for a given state.

  • Copy, or clone, is a method to create new data.

For a thorough treatment of this subject, see The Business Rules Book (cited earlier in this chapter).

Generating User Interfaces from Rules

There are simple rules in almost any user interface (e.g., rules specifying the order of widgets on the screen). But user interface rules can go much further. The first set of rules would cover the minimum sizes of components based on device resolution and user visual acuity (basically a preference) and pointing resolution (the minimum button size on a kiosk is larger than that for a device with a mouse or stylus).

The content and ordering can also be expressed as rules. We tend not to think of these as rules because they are typically implemented as parameters on hard-coded interfaces. However, there are huge advantages to expressing them as rules, particularly when it comes to composing them.




Semantics in Business Systems(c) The Savvy Manager's Guide
Semantics in Business Systems: The Savvy Managers Guide (The Savvy Managers Guides)
ISBN: 1558609172
EAN: 2147483647
Year: 2005
Pages: 184
Authors: Dave McComb

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net