>
> I think David Whitten wrote:
> > > But this would break ALL Java code that works with Jess. Should I
> > > compromise and put dozens of forwarding methods in Rete like
> >
> > Could you explain (on the mailing list?) why this would break ALL
> > Java Code ? Is it because you won't support the old interfaces,
> > or because the new inteface won't know how to deal with the data ?
> >
>
> Right now virtually everyone who writes Java code with Jess does
> something like
>
> Rete r = new Rete();
> ...
> r.reset();
> r.run();
>
> What I'm proposing is that they'd have to do something like:
>
> r.getAgenda().reset();
> r.getAgenda().run();
>
> Alternatively, Rete could still have a run() method, but this would
> keep the class just as messy as it is now, and that's what I'd like to
> fix.
I think there is a two pronged concern here.
1) refactoring the code to make it more maintainable.
2) maintaining encapsulation boundaries.
Is there any reason that the second option is preferable from
the view of maintaining encapsulation ?
It appears to me that it is exposing more if the internal
implementation of the Rete engine to the code which is calling it.
I agree that this means that the encapsulation issue requires
a wrapper around the r.getAgenda().reset(); to make it look
like r.reset(); to the outside callers.
But do they have any business knowing that you choose to have
an agenda abstraction to make the rete engine work ?
What happens the next time you refactor and find that some
other specialized abstraction in the proper situation gives you
a 15% performance win ? It seems that the cost of a subroutine
call is preferable to having to maintain high density communication
with a lot of developers who aren't working on that code anyway.
And of course, sprinkle YMMV and IMHO liberally over my treatise above.
Dave
---------------------------------------------------------------------
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]
---------------------------------------------------------------------