Last post Jan 03, 2012 12:02 PM by NewToDotNet
Jan 02, 2012 03:10 PM|NewToDotNet|LINK
I am a webforms developer. I was doing some reading on the MVP pattern. I have never used this pattern. While I think I understand the basics of the pattern, a question came to mind. Am I correct that since the presenter interacts with the model that
users of the MVP pattern don't use the datasource controls or declarative databinding to move data between the webform and the model?
ps. I know that some of the readers of this post will wonder why I am looking at MVP instead of the MVC architecture. I am just curious about how the MVP pattern works.
Jan 02, 2012 05:12 PM|atconway|LINK
users of the MVP pattern don't use the datasource controls...
I wouldn't say this is an absolute; have a look to the following:
ASP.NET databinding in an MVP design using the ObjectContainerDatasource:
Model View Presenter (MVP) design pattern and data binding:
Jan 03, 2012 01:31 AM|cnranasinghe|LINK
MVP is a architecture for removing page functionality to another layer (presenter) for webform architechture. Hence you are a webform developer, best option is to use MVP rather than MVC. Basic purpose of MVP is seperate the business logic from the UI. If
you want to databinding or whatever, you must do it on the presenter. if you do the databind code behind there is not use of MVP.
Ex: Binding a gridview
you have to take GridView control to the present as a property
on the code behind of the page,
Public GridView as GView
Also put the property in to page interface as well, otherwise grid control is not visible to the present.
on the presenter,
View.GView.Datasource=//bind ur data here, you can load a dataset from the Database
Jan 03, 2012 01:37 AM|amitpatel.it|LINK
You can fine specific information from below
Jan 03, 2012 12:02 PM|NewToDotNet|LINK
Sorry it took so long to respond. My companies internet access was down.
Thanks for all of the good information. It is appreciated.