I'm thinking about the best approach to separate Model View and Controler - for Java and using Eclipse, if if it makes any difference.
I used to separate each type's MVC inside its own package, but I'm start to think that this is not the best approach:
- com.company.client (controler)
- com.company.client.model
com.company.client.view
com.company.another (controler)
- com.company.another.model
com.company.another.view
com.company.yetAnother (controler)
- com.company.yetAnother.model
- com.company.yetAnother.view
(assume a lot of different packages, each one with its own view and model)
I thought about use:
- com.company.client
- com.company.another
com.company.yetAnother
com.company.model.client
- com.company.model.another
com.company.model.yetAnother
com.company.view.client
- com.company.view.another
- com.company.view.yetAnother
I even thought about put controler, model end view in different projects, Maybe it would be even move modular, and I would have more sure that the view is not using the controler, for example (as the controler project would include the view, but not the otherwise.
So, if its one of this or not, what is the best approach to separate M, V and C?
(consider web and desktop apps, not just web)