File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes tableModel+facade Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "tableModel+facade" Watch "tableModel+facade" New topic


tom mcmorrow
Ranch Hand

Joined: Jan 11, 2002
Posts: 39
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.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

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.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: tableModel+facade
It's not a secret anymore!