Jon Swanson wrote:The program is R, which does statistics. On the Java side, I create an instance of an Rengine. That starts the program R. I have no control over R, except to start it...
Jon Swanson wrote:Even without the R bit, I am not experienced enough for it to be obvious how my table class tells my plot class when and what it needs to know to replot itself. Right now everything is in one big java file, so everybody knows about everybody else and everything works. But it seemed smarter to have one file per class and that has got me uncertain about the best way to keep everybody talking to each other.
Jon Swanson wrote:I think the best thing to do about R is have a class of static methods. Something like this-
Anyone see a problem with this approach?
Jon Swanson wrote:Am I understanding the Holder class correctly in that since REngine is static, it is initialized when the class is loaded. So startR() will only run once? After that it just returns the value to which it was initialized?
I'll Google patterns as well.
Jon Swanson wrote:Does this structure make sense or is there a better solution for this type of problem (in the real application a scatter plot redraws whenever data in a table is changed)?