Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Last active August 29, 2015 14:16
Show Gist options
  • Save AdamBien/53e6d1124770ba3045e9 to your computer and use it in GitHub Desktop.
Save AdamBien/53e6d1124770ba3045e9 to your computer and use it in GitHub Desktop.
13thAirhacks&A.md
@michaldo
Copy link

michaldo commented Apr 3, 2015

Are cross-view (cross-rectangle) Presenter something valuable? Did you ever miss that?

In JEE application I used to freedom in EJB assembly, for example:
I have 3 EJB A,B,C. I can freely assembly other EJBs:

@stateless class AddressBean {
@Inject A a;
@Inject B b;
}

@stateless class PaymentBean {
@Inject B b;
@Inject C c;
}

In JavaFx view is constructed in FXML with rectangles. For example one top rectangle is attendeeinput.fmxl and bottom rectangle is workshops.fxml. And bottom rectangle has inside other rectangle day.fxml. That is OK.

What is hard to accept to me is that Presenter is tied to rectangles. I would like to have freedom with Presenter assembly, i would like to inject by @FMXL gui components from many rectangles.
For example if checkbox from top rectangle is checked then textfield from bottom rectangle is disabled. It will be natural to me to have a dedicated Presenter, not tied to any rectangle, with injected by @FXML checkbox from top and textfield from bottom view.

Conclusion: I want Presenter freedom. I didn't found the freedom in JavaFX so checked afterburner.fx. but there isn't also.

My questions:

  1. Is Presenter freedom something valuable or it is a wrong thinking. Bad analogy with JEE.
  2. If valuable, is it possible to apply that concept to JavaFX, with or without afterburner.fx?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment