Unit test: MVP vs pm

Source: Internet
Author: User

Smart Client software factory team is recommending the "Model View presenter" pattern. They have created guidance package for using this pattern.

From my experience, the "Presentation Model" pattern is better. when I asked if SC-SF can also include guidance package for PM, it looks like people may think MVP is more suitable for unit tests than PM. read this thread.

To me, PM is even easier for unit testing, because it is less coupled.

I have refactored the cab smart part Quick Start project to use MVP and PM patterns and have also created unit test projects for comparison.

Source code:

  • Smartpartquickstart_mvp.zip
  • Smartpartquickstart_mvp.test.zip
  • Smartpartquickstart_pm.zip
  • Smartpartquickstart_pm.test.zip

They can be added to the cab smart part quick start solution.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.