• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FBN confusing about design choice

 
mao lao
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello, everyone:
I know this question has already been discussed, but cannot find it.
the assignmnet says :
This implementation should include a class that implements the same public mehthods as the Data class

I am not sure what is this mean.
At first I thought the structure like this

so client only need handle facade, know nothing about the data class
but after read carefully about this specification, I am confused.
do I need a class in the client side that implements all the method of the DataInterface so every method connect the server through the network,

or just DataInterface on the client side like this?

It looks like most people choose the last choice(in various ways)
thanks
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11914
209
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mao,
The way I interpreted those instructions was that I had to be able to call the same methods as in the Data class from within the code on the client side.
So I had code (somewhere) on my client side something like:

(Obviously not real code, but hopefully you get my point).
My class that had this code was the same location as your FBNFacade. Although I did not have a facade. I had a factory that returned either a local or a remote connection to the DB.
Regards, Andrew
 
mao lao
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so it is the third one
Thank you
 
mao lao
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
by the way, any comments about my structure?
Thanks
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11914
209
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mao
Your structure looks pretty good.
It appears you have no link between your Model and your View. Is this intentional?
Regards, Andrew
 
mao lao
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Andrew
yes, it should be a link there, I forgot
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic