J
Jeff S
I'm designing an implementation of the Model View Presenter (MVP) pattern
for a Windows Forms MDI application.
Question: From where would it generally make sense to *initiate* data access
(e.g, CRUD) operations - the Model or the Presenter?
Please note that I'm *not combining* the data access layer with the MVP
objects. Rather, I have a completely separate DAL. Even so, the DAL methods
must be called/initiated from somewhere within the MVP objects. My tendency
is to put DAL calls into the Model (e.g., DAL.UpdateThisThing(thingID)), but
doing that would seem to have the model doing much more than the MVP pattern
intends for it to be doing. So this leaves the Presenter as the apparently
reasonable place in which to place calls to the DAL.
Thoughts? Opinions? Perspective?
Thanks!
for a Windows Forms MDI application.
Question: From where would it generally make sense to *initiate* data access
(e.g, CRUD) operations - the Model or the Presenter?
Please note that I'm *not combining* the data access layer with the MVP
objects. Rather, I have a completely separate DAL. Even so, the DAL methods
must be called/initiated from somewhere within the MVP objects. My tendency
is to put DAL calls into the Model (e.g., DAL.UpdateThisThing(thingID)), but
doing that would seem to have the model doing much more than the MVP pattern
intends for it to be doing. So this leaves the Presenter as the apparently
reasonable place in which to place calls to the DAL.
Thoughts? Opinions? Perspective?
Thanks!