开发者

SharePoint WebParts MVP Pattern

Can anyone explain how to implemen开发者_StackOverflow中文版t MVP pattern for SharePoint Webparts when you have user controls (with dropdowns) and webpart properties (or even more editorparts).

Thank you so much.


Treat the webpart controls and the webpart properties (including the data they store) as view code. You really don't want to persist any domain model information inside the webpart properties. This makes it easier to create a presenter interface the both the webpart property and webpart control views can call to retrieve domain model information.

Create a decent factory to get an instance of the presenter and your code should be nicely separated.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜