3

I'm developing a Java desktop application. I'm planning to use MVC architecture described at Oracle site: Java SE Application Design With MVC.

I need to store data in database so I decide to use Hibernate as it is very simple but there is any tutorial that use Swing+MVC+Hibernate.

It is possible to use them together?

  • As a sidenote I would look at javafx, it is the successor to swing. – nablex Sep 25 '13 at 12:26
4

Why wouldn't it be possible?

Java Swing is a GUI toolkit, so you'll utilize that framework as part of your View layer.

Hibernate is a persistence layer, so you'll utilize that framework as part of your Model layer.

Sounds like a good combination of frameworks aligning with the MVC pattern. And by following the MVC pattern, you'll be setup to change out or modify those frameworks or layers more easily.

The other advantage of MVC is you can focus on each layer, one at a time. You mentioned looking for a tutorial on Swing+MVC+Hibernate but you don't need one. Follow the MVC tutorials you already mentioned and plugin those frameworks at their appropriate layer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.