• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX Contractor: Design Review ..

 
Chin Ho Tan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic