mardi 19 septembre 2023

How to properly design a desktop application managing a small database?

I have to develop a small Desktop application in Java/Swing managing a small SQLite database.

The example described here is largely stupid but it fairly accurately represents my question.

enter image description here

I need to perform CRUD operations on all tables.

The basic DAO pattern produces, for the "software" table, a POJO including the language_id foreign key, which means nothing for the user.

I want the user to be able to enter the language with a ComboBox including all the languages present in the "language" table. If the user wants to add or modify a language, I want him to also be able to enter the paradigm with a ComboBox including all the paradigms present.

Similarly, ActiveRecord and UpdatableRecord patterns are associated with one table, not multiple tables.

Is there a pattern that aggregates objects from different tables?

I don't want to use an ORM.

Are there any books or source codes that describe how to develop a Java Desktop application to manage a database, without using web technologies?

"SQL Server Database Programming with Java: Concepts, Designs and Implementations" by Ying Bai (https://link.springer.com/book/10.1007/978-3-031-06553-8) covers this topic but I found it very difficult to read and I couldn't find the code and the database presented in the book: I have to re-enter everything!

"Database Programming with JDBC and Java" by Georges Reese (https://www.google.fr/books/edition/Database_Programming_with_JDBC_and_Java/oPbGi0l0ZHEC) is interesting but does not use modern patterns.

Software by Mateus Vargas (https://github.com/mateuscardoso99/controle-academico) can help, it is well structured, but it is a very small application.

Aucun commentaire:

Enregistrer un commentaire