Refactoring JavaFX GUI Code, Part 1: Functional Decomposition

preview_player
Показать описание
This is the first in a three-part series that walks through the refactoring a JavaFX Application. The application starts with all the structure and behavior specified in the start method. In this part, I focus on functional decomposition: breaking apart the one large method into smaller ones. The result is a structure where the methods each do only one thing.

The context is an application that is only a simulacrum of one that would pull live data from the Web. The video demonstrates how, with good model-view separation, you can build and refactor view code while working with a simulated data source.

It should be noted that the application follows a Separable Model architecture. This is a classic approach that separates the model from the view. It is simpler than MVC, MVP, MVVM, and similar architectures. This means we can focus on the essential practices of refactoring rather than being weighed down in details like FXML.
Рекомендации по теме
Комментарии
Автор

Thanks for this, Paul. I'm not even working with JavaFX but I am enjoying learning about this and will make use of it to deal with a Qt/Python application I was assigned to.

higor
Автор

This is so good. My current problem is that my page has a lot of text elements and labels, and I'm not sure how to handle all of them at once. But I'll see if I can figure that out.

UninspiredFilm
welcome to shbcf.ru