Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

FBN confusing about design choice

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and jackaroo
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so it is the third one
Thank you
 
mao lao
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
by the way, any comments about my structure?
Thanks
 
Andrew Monkhouse
author and jackaroo
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Andrew
yes, it should be a link there, I forgot
 
Could you hold this puppy for a sec? I need to adjust this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic