Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am using Nested MVCs in my application and its MVCs in a MVC composition.

I have a Task which has 3 parts.

  1. Grid/Table : Displays collection data
  2. Charts : Displays charts for the collection data
  3. Filter : Filters to be applied on charts or grids.

So I have 4 MVC's for Task, Grid, Charts and Filter. I.e.,

Task MVC is a composition of Grid MVC, Charts MVC and Filter MVC.

Now here is the issue.

From Task Controller I am instantiating the other controllers and passing the respective Model(POJO/DTO) to each of them. So Task Controller is the master MVC. Same filter model can be applied to both Grid data as well as Charts data. In both cases filter model is used in the same manner and on same data. So should I pass the filter model to both Grid MVC and Chart MVC and duplicate the code? or is there any better approach?

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.