• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is this a design flaw?

 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I noticed that I am fetching the lists of carriers and origin/destination locations prior to setting up the MVC model. I detect the config parameters like path (depending on what mode is selected) to the db.db and then my listener class creates my controller, data and views.
I am starting to wonder if this is correct to do some thing like this-
// get the location lists to populate the View
list1 = dataFacade.retrieveListOfLocations();
list2 = dataFacade.retrieveListOfCarriers();
while setting up the MVC. I am asking this question because these calls are essentially RMI server interface calls, yet they do not go thr' the controller. In every other case, my Controller listens to an action, calls a method on the DataFacade that talks to the remote server. When the data becomes available, the Model (DataFacade in this case) fires an event and all it's observers get it.
Help!
Aruna
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well it is kind of hard to comment on whether it is right or wrong. If you put it after the GUI class gets instantiated then you can assign the values to your drop down, if you have one, and then all the code regarding the drop downs (getting and assigning the data) at the same time, which can be thought of as easier to read, and can be placed in it's own method, so that that method is responsible for that one thing alone.
But I can't completely say you are wrong and to rework it.
Mark
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic