Is it a good design to have only one model for the whole database and use multiple views for initial search, then results (with a 'book' button) and then a confirmation view ?
The main class or the corresponding controller ? If it is the controller and as a given controller should only be coupled with one model, how can we get the results model to be created ? And in fact is there a way we can make the main class listen to these events ?
And in case there is only one model, and I assume there is no argument over using multiple views, and all the views are listening to the same model's events, how can we make sure only one of the views is shown at any given point of time ?
Last question but on the network side though, does the user need to be given a Menu option to make the application run in network/local mode ?
And I am trying to use FactoryMethod to get a reference to respective Data Service object which could be local or remote. Essentially the user does not know anything about the database mode.
In a real world situation, I do not see why any user would want to use both local and remote databases switching between them. Is my assumption wrong ?
Regards,
Jim
SCJP, SCJD, SCWCD, SCEA Part I
Last question but on the network side though, does the user need to be given a Menu option to make the application run in network/local mode ? I was using a properties file (implementing Singleton) which will tell the app if it is run locally or in network mode at the start up. And I am trying to use FactoryMethod to get a reference to respective Data Service object which could be local or remote. Essentially the user does not know anything about the database mode. In a real world situation, I do not see why any user would want to use both local and remote databases switching between them. Is my assumption wrong ?
I've always been under the assumption that you can have as many views, controllers, or models as you want, as long as that is really what it calls for.
Regards,
Jim
SCJP, SCJD, SCWCD, SCEA Part I
Originally posted by Jim Bedenbaugh:
I suppose this is possible, although I can't think of a reason to have multiple models for the same views and controllers. I mean, doesn't the data only have one state?
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
You could have more than one database for an app... and I suppose you could still have one model then, but I have seen multiple models and still a good solution.
, but I have seen multiple models and still a good solution.
Regards,
Jim
SCJP, SCJD, SCWCD, SCEA Part I
Originally posted by Jim Bedenbaugh:
Me too. We called them FD's in the Data Division of COBOL programs that I wrote for 18 years on mainframes using VSAM files.![]()
I kinda thought we were getting away from all that. . .![]()
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Could you hold this puppy for a sec? I need to adjust this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
|