Re usability comes in too many flavors, the worst flavor is the copy/paste or move_that_file_and_use_it_again, and the best flavor is the use_this_already_made_module. To achieve the last flavor we must consider how many projects (or modules) our program will have. I recommend at least 2 (even if your program is “almost a Hello World”), one for the presentation layer (Views and Controllers with one “model client”) and other with my Model that will include the Business Logic objects and the DAOs.
I usually made a Façade -A Façade is an object that receives requests (in this case for ANY Business Logic “method”) and redirects it to the right object to resolve it (in this case a Business Logic Object)- that can be published later as a Web Service or used for any other kind of presentation layer (such JSP).
So, if you want to “isolate” the Façade in a new project in order to reuse it with any other similar project, that would be another module or project (think in a bank with different taxing politics according to the country and the system, you could make a single Façade that can be used on those different countries that will have to implement their own Business Logic objects according to the Façade specs).
Usually when talking about modularity we will find some good reasons to make more and more modules at the time, i recommend you to read the “Patterns of Modularity Architecture” refcard.
The next post will talk on our UI Design based on a real complex scenario in order to start using FXML files and controllers, for now i must apologize for all this “teorical” 2 parts introduction that talks mainly on patterns.
Greetings and see u next week.