This may be a silly question, but with my current searches I have found mostly information about the presentation of data and the interplay between the Presenter and the View, but very little about the Model and the Presenter.
Basically, say I have a C# application, and it opens a CSV file that is a 5 by 5 array of numbers. Now if I wanted to load that 5 by 5 CSV array into an array of ints, where is this handled in the grand scheme?
This is my current idea to follow MVP, but please correct me if I am wrong (or confirm that I'm right, if I manage to be).
- The user clicks a button to load the file.
- The View loads a showOpenDialog() for the user to select the file.
- After user clicks okay in that dialog, the View, sends an event to the presenter containing that filename.
- The presenter takes that filename, handles the file opening and parsing it into a 5 x 5 int array.
- The presenter then provides that int array to the Model through an event. The model then stores that array.
- The model gives an event saying that it's data has changed.
- The presenter listens and handles this event, putting that 5 x 5 int array into a DataTable.
- The presenter raises an event saying that it has a new DataTableready.
- The view listens and handles this event, and updates a dataGridView with the information provided by the DataTable.
My understanding of MVP gets murky at about step 5 there. Is that how it should go, or did I misinterpret what each component does in MVP?