Hi Folks,

I'm doing some work on Jess 6.x., and I'm trying to right some of the
longstanding wrongs in the code. For example, there are two really
glaring design issues I'm fixing: The ReteCompiler.addRule() method is
ludicrously long, and therefore difficult to understand or modify;
I've broken it out into more than a dozen pieces, and made all the
pirces static. There are no more ReteCompiler objects, then. The other
one is the catchall "Rete" class. Now, good O-O design says that a
class should represent one idea and do one thing; jess.Rete
represents, more or less, all of Jess. I've been breaking things out
into separate classes; for instance, agenda management into a new
Agenda class, router management into a new Routers class, etc.

My question to you is: it would be a much better and cleaner design to
have Rete look like this:

class Rete 
{
  public Agenda getAgenda() {...}
  public Agenda getRouterManager() {...}
  ...
}

and then have Agenda look like

class Agenda
{
  public int run() { ... }
  public void halt() { ... }
 ...
}

But this would break ALL Java code that works with Jess. Should I
compromise and put dozens of forwarding methods in Rete like

public int run() { return m_theAgenda.run(); }

or should we bite the bullet and do things correctly?




---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550
---------------------------------------------------------------------
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