Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Data Client Implimentation Requirements!

Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
My specs for Dataclient implementation say:

To connect with your server, you should create a client program. This implementation should include a class that implements the same public methods as the suncertify.db.Data class, although it will need different constructors to allow it to support the network configuration.

But in my implementation i have made use of a Factory class, which as per the parameter passed by the client,connects to database locally or through the network. Will i be ok by explaining my implementation in design doc, or should i cahnge my DataClient implementaion and include two constructors in DataClient for two modes instead.
Kindly comment am confused.
author and jackaroo
Posts: 12199
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vikas
I dont see any problem with what you have done.
I think the important part of the instructions are that the public methods defined in the Data class are accessible via either networked or local mode. It sounds like you have done this.
I read the instruction about the constructors to mean that we do not have to implement the same sorts of constructors over the network - instead we may use any constructor that we deem to be appropriate.
For example, the Data class has a constructor which allows you to create a brand new database with no records. You would probably not want to have such a constructor available to every networked client.
Similar to you, I had a factory to connect in either local or networked mode. The client code did not even see the constructors for local or remote mode - this was hidden within the classes used by the factory. All the client saw was that it used a method in the factory to get an instance of a connection to the database which provided all the methods of the Data class. I did not loose any points on the GUI side, so I guess this must have been OK
Regards, Andrew
Yes, my master! Here is the tiny ad you asked for:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic