Ernest:

All I can say to this is, "A M E N ! ! !"  On one of my projects I had a young Java
programmer (six months of Java and two months of Rules) who absolutely insisted that
it was OK to change an object outside of the rules, even though manufacture manuals
and manufacturer tech support (and Dr. Forgy) agreed with me that you would be
looking for trouble if you did this.  Reason being that JRules keeps internal truth
tables and other variables private - things that the programmer doesn't know about.

Needless to say, even with all of this professional advice, he then went on to write
a test case that "demonstrated" that it was OK to do it his way.  When I left the
project, it was still written that way.  Amazing!  Companies pay thousands of dollars
for the wisdom of the ages (mine, Dr. Forgy's and the manufacturer's) and yet
management is swayed by one "bright" young programmer who happens to be an employee.
Just amazing.

However, this IS an easy trap into which to fall.  Any code that calls an external
Java method from within the rules is always suspect.  And, you can write sample cases
all day long that "demonstrate" the safety of the method.  But, sooner or later,
another Java programmer will change the method and then the rules are hosed.

[EMAIL PROTECTED] wrote:

> I think Bonnet Emmanuel wrote:
> > . no additional Java code to write that would interfere with the original model
> > (fireProperty stuff)
>
> You only need to use property change listeners in your Java objects if
> their member data will change from outside of the direct control of
> the Jess program. Since translating data via XML is an option, you've
> already allowed that having the Jess program decoupled from changes to
> the domain objects is acceptable, so you could use them as-is as
> static definstances without changing the code.
>

--
SDG
jco

---------------------------------
James C. Owen
Senior KE
Knowledgebased Systems Corporation
6314 Kelly Circle
Garland, TX   75044
972.530.2895

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to