background:
i have extensive experience in web applications, have little or no experience rcp. presently, working java swing api. good. problem is, don't feel confident design.
question:
in web application when implement mvc, forward request view
. controller
doesn't care show it. going displayed on page, typically. in rcp, need know show form/table/etc.. mean panel, right or left, or down. requires reference container component in desire show thing. how should design our code reference?
take:
i keeping reference first level components in main class -- has main()
method. , wherever need component, doing like,
jpanel formpanel = mainapp.getmainpanel().getformpanel(); .. jpanel treepanel = mainapp.getmainpanel().gettreepanel();
is okay?
mvc isn't of thing in rcp, people talk largely it's bullshit.
for sure having model of business objects that's separate , had no dependency on ui code important. lines between views , controllers tend more blurred wouldn't sweat much.
user interface elements naturally tend organized in tree have, though global variables such main panel should avoided.
lean heavily on observer pattern.
Comments
Post a Comment