开发者

User Confirmation in MVP Pattern with Passive View

开发者 https://www.devze.com 2023-01-07 23:26 出处:网络
How would you handle calling a user confirmation dialog before continuing with a task in a web-based MVP pattern implementation? It\'ll have to do a postback in between and the confirmation would go o

How would you handle calling a user confirmation dialog before continuing with a task in a web-based MVP pattern implementation? It'll have to do a postback in between and the confirmation would go out of the scope of the presenter function that called it. I'd prefer to keep to a pure MV开发者_如何学GoP implementation but is it even possible?


You can't implement this logic in one single server-side function. I believe the standard approach to tackle this is either to

  • Have multiple steps that each involve one postback to the server. One of these steps would be the confirmation dialog you mentioned

or

  • Show the confirmation dialog via Javascript
0

精彩评论

暂无评论...
验证码 换一张
取 消