Reputation: 34948
I'm a newbie to swing development.
I have a swing app that needs to access data from a remote sql database. The users of the app are all located in our office.
Is it bad practice to access the database directly from the swing app?
Should I put database facing code into an rmi server?
Upvotes: 0
Views: 1609
Reputation: 1685
Not necessarily, but you'll want to 'layer out' the data access code in your application to make it easier to do later. It will also tend to make the rest of the application more maintainable.
Upvotes: 2
Reputation: 13875
Do you have a plan for dealing with concurrent access to the same records in the database? It is something you will have to deal with, so if not from within the code, having all instances of the Swing application accessing the data via a central (i.e. your RMI server) location would make this much easier.
Upvotes: 0