1 Reply Latest reply on Feb 5, 2013 2:27 PM by 956927

    Achieving thin controllers

      I am getting my feet wet with javafx. This is what I am doing.

      - FXML Views
      - DI Controllers
      - Weld-SE Managed Services and Models
      - Trying to confine UI to FXML
      - Trying keep the Controllers thin


      While trying to code the UI, most static UI is confined inside the fxml. But there are scenarios where I find my self adding, removing, showing, hiding elements etc.

      I find myself doing this inside the controller as fx lets me configure controller method in the view which it will call on a particular action / event. All this code deals with Dynamic UI building / manipulating and belongs inside the view layer. But, it ends up in controller making the controllers fat.

      javafx provides javascript integration. This is one possible way to abstract that view manipulation code away. But this would add not so perfect JavaScript into the mix.

      How would I abstract the code away in java or fxml so that I don't break the Thin Controller Paradigm ?