Implementing separation of concerns via MVC
- by user2368481
I'm creating a question to see if my understanding of MVC separation is correct, I haven't been able to find a clear answer anywhere online. So is this the right way to implement it (in Java):
I would have 3 .java files, one each for Model, Controller, View.
I would put all the classes related to Model in the Model.java like so:
//Model.java {
public class Model
//class fields
public Model();
public ModelClassA();
public ModelClassB();
public ModelClassC();
}
With the ModelClasses being any class that I consider belonging to the Model. Is it correct to have the classes within the Model Class, as I have read that nested classes should be avoided where possible.