Hello
,
I am trying my best here to have a proper structure for something that seems somehow very simple:
Basically, i have a Model class and i want to format some of its data before fowarding it to the View.
I also would like to decorelate the view from the model.
Basically the view in this application is some XML output, so it is not interactive.
I thought of two possible
patterns :
Adapter : the view calls the adapter method which retreives the data from the model (correct me if am wrong). Factory: my controller calls a factory method which takes our model (or its interface) then creates an appropriate view.
Which method would you think is better, do you have another solution to this problem?
I am opened to any suggestions...