It is not necessary to implement user controls to use this pattern, in short. Very briefly, you need a view (could be aspx or wpf or winform or console, etc. ), a presenter that'll read from/listen to events from the view, make a call to the model and finally populate view with the right data, that's what MVP pattern is edit: this example is simple enough.
It is not necessary to implement user controls to use this pattern, in short. Very briefly, you need a view (could be aspx or wpf or winform or console, etc. ), a presenter that'll read from/listen to events from the view, make a call to the model and finally populate view with the right data, that's what MVP pattern is. Edit: this example is simple enough.
Thanks. Can you point to some basic examples of this kind using webformsmvp. Com ,because whatever examples I got from there had pages full of user controls.
Thanks – Rohit Nair Nov 1 at 16:54 the example was very useful. But I guess my question is more specific to the API I was referring to. – Rohit Nair Nov 1 at 18:28 Not sure exactly what you'd like to know.To answer your question, no you do not need to implement MVP through user controls.
Now, I do not know why they did it that way, may be just because of the flexibility and usability of user controls. But what do you exactly want to know? – AD.
Net Nov 1 at 18:36.
You don't have to use user control to use MVP pattern. MVP is GUI pattern that helps you to separate your concern. For example, You write ASP.NET web page to calculate two numbers, with out MVP or MVC or any other GUI pattern, you would write all this logic in your code behind file which is very hard to test.
If you want to test it, then you are bringing lot of extra baggages like ASP. NET framework.In other hand, you write this app using MVP, you would do this. View => Dumbest in all three.
Doesn't have any or minimun logic.So you don't have to unit test it. It simply "tells" the presenter something happened and does what presenter asks. Presenter => Controls the flow Model => Business Logic/persistent logic.
I'm the author of the Web Forms MVP project you mention. This answer is specific to that library (which is just one implementation of the MVP pattern). No, you do not need to use user controls.
If you want, you can make your page inherit from MvpPage and it will then work with a presenter itself. We recommend that you do use user controls though, even if you aren't using the control multiple times in your site. This lets you keep the view, view model and presenter logic nice and bundled as a logical unit for a particular feature.
Pages are then used purely for laying out controls.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.