Java desktop application using MVC + Hibernate

desktop applicationhibernatejavamvc

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?

Best Answer

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.