This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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

MVC Confusion in FBN GUI

 
Raju, Gentle
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am in confusion to implement MVC pattren for GUI.
I have a panel (inputpanel) which takes input for the
flight information and creates the criteria and calls criteriaFind to get the results. These results are
displayed in the table. Table is set for single selection
only and any row selected here will show up in booking
panel either in the form of table or any other form
( I am yet to decide here ). There is button on bookingpanel
and an input field to enter the number of seats to enter.
Button click will call bookFlight on the Client.

Here the the FBNClient and the these classes (panles and tables) are tightly integrated for calls criteriaFind and bookFlight calls. To implement MVC model here I have decided that inputpanel is the contorller and table is the view. I am really confused here as to what should the model be ? If I create a separate class for model, how do I integrate FBNClient & this model ? Or should I make model as member of FBNClinet ?
Your comments are appreciated.

[This message has been edited by Raju, Gentle (edited October 04, 2001).]
[This message has been edited by Raju, Gentle (edited October 04, 2001).]
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your TableModel provides a starting point for your model. At the very least, the model should expose the data in a TableModel interface. Then, you also need methods for searching, and a business to (attempt to) book a flight.
The smallest footprint interface that the model could expose is something like findFlights(origin, destination), getTableModel(), bookFlight(flightNo, numSeats). I'm not saying that this is complete or necessarily the best interface.
- Peter
 
niharika singh
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Peter den Haan:

The smallest footprint interface that the model could expose is something like findFlights(origin, destination), getTableModel(), bookFlight(flightNo, numSeats). I'm not saying that this is complete or necessarily the best interface.
- Peter

hi,
Can you put some more light on it?
TIA
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic