I'm developing a Banking Client-Server architecture.
I want to know what is the most convenient way to organize the Server side. Does the Bank need to be the Server and the GUI in the same file ?
Because currently I have the server GUI which instantiates a Bank. This Bank has a list of Customer and each Customer has several Account.
My first problem concerns a JTable in the server GUI. In fact a Bank store an ArrayList of every operations previously done by the clients. I wrote an implementation of AbstractTableModel which also store an ArrayList. The problem is that the Server instantiate a Bank and a TableModel for the JTable. So, when the Bank adds an Operation in its ArrayList, the TableModel is not aware of that. How can I link these two without giving the TableModel to the Bank ?
The second problem concerns the connection with the Client. The Server pass a Session interface to the Client when login/password are correct. Session contains Banking operations that a Client can do. Is it a security problem if the SessionImpl encapsulate the Bank instance ? Because in reality Session methods call the Bank ones. Session is the only remote Object between the Client and the Server but encapsulating the Bank gives me the impression that the Client can access to the Bank directly.