aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "MVC model-view-mapping" Watch "MVC model-view-mapping" New topic
Author

MVC model-view-mapping

Skely Vengaboy
Greenhorn

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.

Thanks,
Skely
Kristof Janssens
Greenhorn

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
Greenhorn

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...

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