I am working on a small project with MVP implementation using Ajax, JQuery.
I implemented passive view MVP pattern and all presenters are connected from view by event handling.
The scenario is displaying a detail popup box from master list by clicking the link on master row.
I have to make an ajax call to display the detail list. Now my question is how can I make a call via Ajax from client side to invoke an event.
There are 2 scenarios in AJAX call that I know:
I googled so many sites but I couldn't find a right answer to implement.
Please clarify my questions and thanks for your support.
Thanks Kalyan P
What I've done in an MVP framework I built was to use a web service, and that web service implements a presenter. So you call the web service, the web service fires an event to the presenter, the presenter responds to the model, and the web service returns anything within the model.
If I call a presenter method directly in my view then It is violating the MVP pattern.
It depends who you talk to; some are in favor of calling a method on the presenter, rather than using a view event (Jeremy Miller blogged about this, for one).