Model View Controller in android
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
I write android project that use MVC concept , and load available data from the model to controller to pass it to view to display it .But is there any way to load data not available and when you ensure this data is available to controller to pass it to View class to display it?. | |||
Observer Pattern is the answer. You will need a mechanism that Controller will register himself for Load Data Event. Which basically triggered by an Observable Class which tells observer that something has changed. And whenever this event will occur Controller will go and get the data from Modal and forward it to View. | |||
default
.
stackoverflow.comm
No comments:
Post a Comment