Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tableModel+facade

 
tom mcmorrow
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi mark
perhaps you could help me. I read in one of your posts where you used a facade on the client side.
i have also attempted a somewhat similar approach.
However i have also a table model class which communicates directly with the DataClient interface. Don't know if it looks right. Should it communicate with data through the facade.
My facade includes a method which returns a reference to the table model.
Thanks for being so generous with your time and suggestions.
tom
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
However i have also a table model class which communicates directly with the DataClient interface

So what you are saying is that your Table Model is tightly Coupled to your DataClient interface. Well, in some ways you need some kind of coupling. However, you could have it the other direction. Based on your quote above, I would assume that your TableModel class has a reference to your DataClient, and through that reference calls a method.
If that is so, I would say to redesign your TableModel. Try making a method on your table model accept as a parameter a DataInfo[] to display in the table, then your TableModel knows how to display these arrays, and then your can also have it pass it a FieldInfo[] and from that make up the Headings of the table.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic