• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Design Objects

 
Terry McKee
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't seen anyone talk about using business objects. For instance, I was thinking of creating Flight, Aircraft, and Person objects. Is this to much work?
 
Gennady Shapiro
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Object model usually follow the data model. In our case the data model is oversimplified, it's just one table. So, the Flight object is the only one that makes sense. I was also thinking of creating a (City extends String) object and have a Collection of them to populate Dest and Origin combo boxes.
Also, I have seen guys talking about using the Observer design pattern to separate business logic from GUI. So this is where your Flight object comes in.
 
Gennady Shapiro
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just thought of something else.
The database scheme is modifyable. Therefore you should have a number of Flight classes supplied ,maybe, by FlightFactory. But then how do you map a Flight class to a DB scheme?
Or you could build Flight class reflectively based on DataInfo, but its messy and very not OOP.
Really how do we model objects here?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic