0

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?

2
  • The question is vague. Are you asking if it's okay to use JDBC in your Swing action classes? Or are you asking if you should interpose another server running some other component between your swing app server and the database server? Commented Nov 4, 2008 at 20:58
  • I'm asking if I should interpose another server running some other component between your swing app server and the database server. Commented Nov 4, 2008 at 21:16

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

1 Comment

The just tier your Swing application so that all your data access can be factored out later if you need to, and stop there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.