Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Some questions about b&s

 
David Ding
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've finished my Data.java file, now I'm designing GUI and the View.

Non-Networked Mode
The program must be able to work in a non-networked mode. In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements.
The operating mode is selected using the single command line argument that is permitted. Architecturally, this mode must use the database and GUI from the networked form, but must not use the network server code at all.

(1)I plan to use rmi for network mode, so I need to declare both Model and View Remote objects, and I want to reuse this view in standalone mode.
(2)I want to define a new Class to store the infomation of each record in db, I don't know whether I should implement Serialize or not if I want to pass an instance of this class as a parameter and as a return of a remote method, of course these methods will be unchanged in standalone mode.
Will these go against the rule listed above?

The User Interface
It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.
Declaration of find in DBMain.java
// Returns an array of record numbers that match the specified
// criteria. Field n in the database file is described by
// criteria[n]. A null value in criteria[n] matches any field
// value. A non-null value in criteria[n] matches any field
// value that begins with criteria[n]. (For example, "Fred"
// matches "Fred" or "Freddy".)
public int [] find(String [] criteria) throws RecordNotFoundException;

I provide two combo boxes which allow user to input or choose name and location, and there's also two radio buttons to choose and/or. If user choose or, input a name but left the location blank, I list all the records; In the same situation, if he choose and, no records will be showed. Am I right?
Tnanks
 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

(2)I want to define a new Class to store the infomation of each record in db, I don't know whether I should implement Serialize or not if I want to pass an instance of this class as a parameter and as a return of a remote method, of course these methods will be unchanged in standalone mode.

Implementing Serializable is perfectly fine.

I provide two combo boxes which allow user to input or choose name and location, and there's also two radio buttons to choose and/or. If user choose or, input a name but left the location blank, I list all the records; In the same situation, if he choose and, no records will be showed. Am I right?

Also sounds good to me.
J
 
David Ding
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
But I still don't know if I implement Serialize, will I go against the rule----must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements.
There's no doubt that there are two different model, one is for standalone, the other is for rmi, but should I also write two view, or I can use the remote view in standalone mode?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic