Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DOA?

843854Nov 3 2004 — edited Nov 5 2004
I am creating a client/server application for my senior project. The scope of the project can be summed up as a QuickBooks program for a local business. It manages clients, employees, accounts, etc. The server will be installed on one computer and there will be roughly four to five client programs (GUIs) accessing the server program, which accesses a RDBMS. I plan to create my own multi-server using server sockets. Is this the right path to take?

I have started the design using the Data Access Object Design pattern. I have chosen to use Microsoft Access as my data source because it is simple; therefore it is safe, hopefully. Since I have never used the DAO design pattern before and my professor is not very familiar with this pattern, I am trying to get an overall feel for the architecture of my design.

Here is the initial thought of my first design.
I have each GUI client (Business Object) create a DAOFactory, and then create all the DAOs.
I create a handler for each action in the GUI that calls a method in the appropriate DAO.

However, I do not think this would work since the GUI is connected to the server through a socket. I would have to send the request through the socket. This raises all kinds of issues and seems to contradict the DAO pattern.

It seems to me that the Business Object should remain on the server computer. The GUI programs access the Business Object through a request handler. i.e.

1. An employee enters data in the GUI program and clicks the Add Account Button.
2. The ButtonListener writes to the ObjectOutputStream. out.write(Request AddAccount, Account anAccount) An Object Request consists of the name of the DAO and the method name for adding an account.
3. The host computer reads in the request through the ObjectInputStream.
4. It gets the DAO from a DAOHashtable using the request DAOName as the key.
5. It gets the method from the DAOMethodHashTable using the request MethodName as the key.
6. The request is executed.
7. Do more stuff?.

Am I on the right track with this approach? Does it still conform to the DAO design pattern? If not, what should I do different?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 3 2004
Added on Nov 3 2004
8 comments
501 views