I'm trying to implement some small projects using the MVC standard: Within the project framework, I've created the following packages:
- View: User interaction screens.
- Controller: I have a class with methods related to user requests, save, change, delete, list.
- Modal: Class that implements the Serializable method.
As the application is with SQLite local database integration, it has two more packages:
- DataModal: Contains the project data model.
- DataSource: Contains the data source, in the same database is created, in this same class I have the method of data persistence. Save, delete and list.
As I understand it, the controller does not communicate with the DataSource, such communication is between DataSource and Model. Should the methods of insertion, update, delete, and list records be created in a separate class in Modal? How would the communication between it and the Controller be, and how does Modal return the information to the View: passing directly, or should it pass to the Controller and the Controller provide this information to View?