• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NX Contractor: Design Review ..

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I roughly have my DB and Remote packages design done.
DB Package
==========
MetaData -- A class which contains extra information about the data file.
DataConfig -- A class which is used to specify the type of data file. An object of DataConfig is passed from Client to DBPersist.
DBPersist -- An interface which has a set of methods for record persistent.
FlatFileData -- A class implementing DBPersist, so this is the class which talk to the data file.
DBAccess -- This interface is given.
Data -- A class implementing DBAccess, it has a DBPersist reference as instance variable. Hence this class uses FlatFileData as persistent manager, and it basically only handle the locking system.
DBAdaper -- An interface that extends DBAccess, add more functionalities to DBAccess.
DataAdapter -- A class implementing DBAdapter and it extends from Data.

Remote Package
==============
RemoteDBAdapter -- An interface that extends Remote and DBAdapter.
RemoteDataAdapter -- A class that implements RemoteDBAdapter and extends UnicastRemoteObject.
Connector -- A class that creates a local or remote connection.

Any comments or suggestions ??
Thank you.
 
author and jackaroo
Posts: 12200
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
Hello Chin Ho,
I don't really understand what DataConfig and DBPersist do. Care to elaborate on them?
Otherwise this looks reasonable.
Regards, Andrew
 
Chin Ho Tan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DataConfig essentially contains the path for the data file. It is similar to the function of "ServletConfig" in JavaServlet. It is used so that in future the data file format can be changed while the structure of the program can be maintained.
DBPersist acts as a PersistManager for Data class. Essentially, Data class caches all records in a hashtable. Data class also implements the lock system. All persistent operations are done by calling methods in DBPersist.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic