Let's say we have on one side classes which deal only with GUI stuff (e.g. Java Swing) and on the other side classes which stores the data. This data can be persisted in tables of an external database whereas these tables should be created and manipulated by Java Classes (Hibernate,JDBC).
So our example software looks like this:
My question is now how to implement the link between these two modules? Should I write an interface which implements an class which contains all methods which are needed for communication between them?
Or is it absolute sufficient to instantiate the data-classes in the gui-classes with
new and to use the public methods of the data-classes?