hi Farouk and Mark
i'm just working on the architecture of the modules. so I can't provide a well-thought and tested design, but here are my thoughts... (hoping this helps more than it confuses
In general your design looks very nice. I didn't plan on using so many classes (Design pattern: Keep it Simple
), but yours probably looks nicer.
a) DataBeans: are they really needed? I thought of just useing a FlightTableModel, which holds all record. Not sure yet whether I want to apply a filter (for user selection of origin and dest), so a selection doesen't drops records out of the model or rather implement a simpler aproach of reloading the model from the db evertime a selection is made (using criteriaFind(...)).
b)DataInterface: which Exceptions do you throw? DatabaseException and RemoteException? I also have a DataInterface for local and remote use: it is implemented by Data and RemoteData, which redirects all calls to a Data instance. So it looks pretty much the same as yours.
c) LockManager?!? can't I just implement lock() and unlock() in Data? I guess therefore only one instance needs to be guaranteed - how? Using a Singleton pattern might not work across multiple VM's?
d) Server: you made a GUI-Server? Wow! I used a simple Server class, that basically creates a RemoteData (which holds the Data instance) and put in on the RMI registry. Istn't this enough?
e) .jar files: I also plan two jars (client.jar and server.jar), but use only 3 packages (db is shared).
f) I like the Factory for creating a Connection, but wouldn't it be possible to simply implement 2 methods somewhere on the client side like:
DataInterface getLocalConnection(String db-file-path);
DataInterface getRemoteConnection(String host [,port?] [,path?]);
ok, that's enough for now
PS: Farouk, I hope your nice design didn't get screwed with those brut force aproaches...