This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Please comment my design Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Please comment my design" Watch "Please comment my design" New topic

Please comment my design

Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 918

I have the URLyBird 1.3.3 with the non-cookie mechansim. My look block
locks like :

I choose the 3 tier design and I decide to hide the lock/unlock methods from the client side.
My client implements only book, search and delete methods (DataClient interface).
I have two type of clients a local one and a remote one (the remote client extends the local one and the Remote interface). This the front tier.

On the middle tier I implement the DBMain in Data class. This class composes two other classes the LockManager and the DataAccess. The DataAccess provides acess to the records and LockManager allows the concurent access to the record. Because the DataAccess is responsible for the I/O operations it has all the methods synchronized.
The DataAccess is the back tier (at leat I hope so).

Because I need to indetify every client, each client will have its own DataClient(only book, search and delete methods) instance, every DataClient (instance) contains its own DBMain instance. The DBMain instances are builded with a factory and all the the instaces will share the same LockManager and the DataAccess instances.

I try to draw a picture for only one client:

By "cliet" I mean the client GUI.

Commens & Cirtics are welcomed.

I don't know why the picure is now diplayed in the way I want to.
The DBMain contains the LockManaget and the DataAcces so the "/\" must poit to the DBMain.

[ November 10, 2005: Message edited by: Mihai Radulescu ]

Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11778

Hi Mihai,

Looks good to me.

Regards, Andrew

The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 918

Hi, Andrew and thanks for your comments.

Wagner Danda Da Silva Filho
Ranch Hand

Joined: Mar 21, 2003
Posts: 80
Hello Mihai,

could you comment a little more about the implementation of "DataAccess"? What are its methods?

Did you create any class to wrap the data records? For example: Row, Column, etc..

Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 918

Hi Danda

My the DataAccess has two componenbts :
1.The DataAccess it defines the access mode to the data from the URLyBird persitent inventory (database) - I/O operations.
2.The DataScheme defines the data architecture for the URLyBird project database.

In a few words the DataAccess implemetation uses a RAF to read/write the database file. The records file pointer are calculated usign the DataScheme.

The DataAccess has a syncronize warpper and it is used in my Data class.

I agree. Here's the link:
subject: Please comment my design
It's not a secret anymore!