Skip to main content

15. Maintainable GUI Development

18/11/22

MVC Pattern Revisited

  • View tells controller what happened
  • Controllers inform the model what to do
  • Once the job is finished the model broadcasts notifications; it is not aware of any specific view/controller
  • Views catches relevant notifications and updates

Observer pattern is embedded in the MVC

  • Model offers views to subscribe to its state change notifications
  • Any interested views subscribe to the model to receive state change notifications
  • The model notifies all views that had subscribed whenever a model state changes

FXML (FX Markup Language)

  • Supports the idea of separating Design and Functionality

Benefits of FXML

  • UI designers might not be programmers
  • The designers can use external software to design the look of the UI whilst the programmers can build the functionality
  • Building GUIs visually rather than programmatically makes intuitive sense
  • Event handling is simplified
  • We can test/fix application logic without touching the GUI design