0

I am wondering where does the fxml controller belong in the Entity-Control-Boundary model?

When designing a JavaFX application with the help of Scene Builder, Scene Builder generates an fxml file which represents the GUI. In addition, a controller is needed to make user interaction possible. An example would be: LoginScreenUI.fxml & LoginScreenUIController.java.

What is known:

  1. An entity object is an object that represents the system's data.
  2. A boundary object is an object that interfaces with the system's users.
  3. A control object is an object that implements the logic required to manage the various elements and their interactions. It serves as a mediator, i.e. the glue between boundary objects and entity objects.

All of the interpretations I found were based on a comparison to the MVC model, here are some:

  • The Entity-Control-Boundary Pattern (ECB) is a variation of the Model-View-Controller Pattern.

    Mapping to MVC:
    We can map the inner hexagon filled with entities to the Model role in the Model-View-Controller Pattern. Controllers obviously map to Controllers, and boundaries, at least boundaries that interact with users, map to views.

    hexagon

  • They are not similar. MVC is for user interaction. Business rules are not bound to users directly and even not I/O devices like the internet itself. The ECB pattern is used for separating business entities from the boundary (mvc framework, ORM's).

  • List item

I see myself agreeing with the explanation that ECB pattern is a kind of an analogous pattern to the MVC pattern when it comes to more Client-Server like architectures. As a consequence, some differences occur when implementing each one.

However, I am not entirely satisfied as I could not find any direct answer to my question and it is still open for personal interpretation rather than having a clear guideline.

To be more concrete, when the user types ID, Password & clicks the Login button. My controller handles that button click.
Two scenarios are possible: Assuming

  1. Assuming my controller belongs to the Control category.
    I can right then and there check if the user is registered in my database by executing a query.
  2. Assuming my controller belongs to the Boundary category.
    I have to find another "middleman" class to authenticate the credentials.

I can't move forward based on assumptions as a wrong one will significantly slow down future development and introduce many mistakes to be painfully corrected.

Any help would be much appreciated.

Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.