This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes MVC model-view-mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "MVC model-view-mapping" Watch "MVC model-view-mapping" New topic

MVC model-view-mapping

Skely Vengaboy

Joined: Mar 08, 2006
Posts: 2
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.

Kristof Janssens

Joined: Jan 05, 2005
Posts: 23
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

SCJP 1.4 (90%)<br />SCJD (in progress)
Skely Vengaboy

Joined: Mar 08, 2006
Posts: 2
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...

I agree. Here's the link:
subject: MVC model-view-mapping
Similar Threads
MVC -2+ views for 1 controller??
JSF 2.0 Dependency injection problem
Applying pure MVC to Swing/JFC
struts2 Vs spring mvc
Relationship between Model, View and Controller