Hello:
I started my design from GUI. I decide to use MVC design
pattern for GUI design. I have already had the View done. I have several questions related to the GUI design. I need some comments and helps.
My view is called FlightView. It is composed of:
a) TablePane (derived from JScrollPane) which contains a table.
b) SearchPanel - It has several comboboxes and a search button that allows user to choose and serch the database.
c) ReservePanel - It has textfield and button which allows user to enter the number od seats to reserve.
d) Menubar - Has three menus - File, Connect, and Help
e) Status bar - show the processing result
My question are:
1) Since the View is composed of different panels, should I have separate models for these panels ? Can I design a single model ? How about controller ?
2) How does View get notified of change from model ? I know that Observer design pattern might be a good choice. However, Table model seemingly does not need that.
3) The exam requires user to do the search. In order to allow user to serach, I have to design some method like "getSearchCriteriaData" in the controller to get origin, destination, carrier info from database to populate the combo boxes.
Will this method caused the "lock" and "unlock" to be called ? From the assignment description, it seems that the databse should be locked even the user just do the reading. However, this retrival of information is not caused by user interaction. Can the client get the initial search criteria data by reading the database without locking ?
Please gime me the necessary comments ?