Answer the question
In order to leave comments, you need to log in
How to split a Java application into layers/modules (JavaFX + Hibernate + PostgreSQL + Maven)?
I am developing an application for maintaining production documentation in a small enterprise (training project). The application allows you to view and add entries in electronic logs, such as the "Fire Alarm Check Log".
The current version is being developed as a stadalone application. JavaFX is used as GUI, database - PostgresSQL, build system - Apache Maven, ORM - Hibernate.
A mandatory requirement is the presence of a separate application (not through a browser).
In the future, it may be necessary to create a Web interface with the ability to read data only and transfer the application to a client-server architecture.
1. How to split the code into layers in this case?
2. How to break this into modules in intellij idea?
At the moment I did it like this:
Answer the question
In order to leave comments, you need to log in
You end up with a typical MVC pattern i.e. model(persistent) view(ui) controller(logic).
It's a normal design pattern, it's often done this way. Those. when logic is written in the controller, work with data in models, and work with appearance in views.
If you want something else, then look at the MVVM template i.e. model view viewModel is also a popular pattern and they say it is better than MVC, although everything also depends on the hands of the developer.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question