• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

MVC model-view-mapping

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wishes to every one. This is my first posting to this great knowledge group.
I'm in the analysis stage of SCJD. While thinking of MVC architecture, I'm unable to decide on the followng:

The CONTROLLER must be aware of mapped between VIEW and MODEL. Should the mapping between view and model be hard coded or should it be externalized in a config file. I like the externalizing concept. Can we use XML config file like Struts-Config file. Which is a better way of doing.

I'm raising this question as I don't want to over do things than what is expected of our exam. What have our fore-fathers :-) done

Please give your suggestions. Have a wonderful day.

Thanks,
Skely
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're not allowed to use xml.

My mapping between model-view, model-controller, controller-view happens in the base class of my GUI application, so it's hardcoded.

What you suggest is beyond the scope, so don't need to worry about that I guess
 
Skely Vengaboy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your suggestion Kristof.
I guess you are loading all the relationships as a Map and catching them in memory.

I believe your view passes a Key to the controller that suggests which Model to invoke for a particular action. After the Model has finished its execution, what determines which view must be shown next?

Model execution can end up either in a success scenario or a failure scenario. I want to show different views based on the scenario. I'm unable to decide who is responsible for determining which view must be displayed when...

Thanks,
Skely
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic