wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes confused Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "confused" Watch "confused" New topic
Author

confused

Richard Phen
Ranch Hand

Joined: Apr 27, 2002
Posts: 52
I am new one from SCJP and preparing SCJD. I was confused by the assignment: I am intent to use MVC pattern to accomplish my task. What is the Data.java used for? Is it a model? Do I implement it by using class such as dataImpl?
Help


SCJP<br />SCJD
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
This assignment involves implementing a solution using 3 tiers. Gui <-> RMI Server/Sockets <-> Persistence.
The Data class provided represents the Persistence layer. You need to develop the GUI layer, RMI/Sockets layer and add additional classes to take care of synchronization to prevent data corruption. In addition to that you need to take care of locking/unlocking records by multiple clients.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

What is the Data.java used for?

It makes a great paper weight.
Actually this is the main class that you will learn and know and love. It is the start of the assignment. It is the Data class.
When they talk about MVC you mostly think of Presentation, Data and a Controller. So in this case the Presentation will be your Swing GUI, your controller will be, well your controller, and the Data will come from some sort of "Access" to this great Data.java class in the sky.
Hope that helps clear up that concept. But it is the first high level perspective on the entire assignment. As you delve deeper you will find more questions, and here you will find more answers.
Congrats on your SCJP, and good luck and have fun with the SCJD.
Mark
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Richard Phen
Ranch Hand

Joined: Apr 27, 2002
Posts: 52
Thank you all, Sai & Mark! I got some idea from you. My understanding is: Data.java is a part of the Model, and I should create my View-gui and Controller. Is it right? Question is: 1.Model usually performs the action accessing the db.db. How does the Data.java here perform this action? 2.How to use the Date.java?
Thax!
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
Richard,
I don't mean to pull you away from your MVC concept. Like I mentioned before, you have been asked to create 3 seperate layers of implementation. When the user selects the local mode, all the objects belong to these layers live in the same Virtual Machine and communicate with each other.
When the user selects the remote mode, GUI components live in a seperate VM than the server side components including the RMI server implementation and the Data with his assistants. Data has many methods in it to access/modify the data in db.db. If you have done any JDBC work, think of db.db as the table you want to access and the Data class as the JDBC implementation. It is not quite a JDBC like implementation but I guess it will help you to visualize things a little bit.
In this assignment, you are asked to create a client side implementation using JFC/Swing components. You can call it a "View". This implementation may contain one or more model/view/controllers in it. For example, you can have a controller to handle flight search screen(view) which has a JTable to display the search resutls. In this case, the search flights controller can handle the JTable model as well.
Server side component acts as a servant to answer any call by client which is mentioned in the contract between the client and the server in the form of "java.rmi.Remote" interface.
If you are unfamiliar with RMI, I suggest you read the Sun tutorial on Java. Try developing simple applications in RMI and then come back to this assigment and think about how to implement it using RMI. Good luck.
Richard Phen
Ranch Hand

Joined: Apr 27, 2002
Posts: 52
Hi,Sai,
Thank you for your reply! I still have questions for Data.java. Which methods in Data.java do I need to implement?
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
I will ask you to read the requirement documents more carefully. You need to implement criteriaFind(), lock() and unlock() methods.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: confused
 
Similar Threads
how to identify state of a particular client after passivation??
EJB interview questions ??
Can you explain this?
Using CacheRowset
desing patterns