[ASP. NET] MVP demo

Source: Internet
Author: User

There is not much to write about. there is only one DDL read on the UI. then some of the baseclass in sysframework also have todo, which can be implemented according to your own taste. the focus of the demo is not to demonstrate too many details, but to express the entire architecture.

The SQL used in the database comes with the example Database: northwind

The data access layer uses nhib.pdf

 

Projects description:

Aspnetmvpdemoapp. dataaccess (data access layer)
Aspnetmvpdemoapp. dataaccess. Interface (data access interface)
Aspnetmvpdemoapp. Model (M in MVP)
Aspnetmvpdemoapp. Presenter (P in MVP)
Aspnetmvpdemoapp. View. Interface (V interface in MVP)
Aspnetmvpdemoapp. sysframework (system framework core layer)
Aspnetmvpdemoapp. Web (V in MVP)

Intention
1. Use the Inheritance Method of inhibernatebasedao-> nhibernatebasedao <t>-> somemodeldao to reuse public methods such as selectall () in each somemodeldao.

2. The nhibernatesessionmodule uses the httpmodule "filter" method to uniformly Process sessions on/off in Nhibernate; the start and commit of transactions. In this way, do not repeat these operations in each method in Dao.CodeImplementation.

3. using windsorcontainer (windsorcontainer is a control reversal container created on the basis of a microkernel, this microkernel can scan classes and try to find the object references and object dependencies used by these classes, then, provide the dependent information to the class .) Implement "auto-fill" for P of M and V to decouple high-level code.
But now the problem is: Add V to windsorcontainer and retrieve it from the container. You cannot directly use the UI control in V (null reference error ...),At present, this intent has not been implemented. Who knows how to solve it?

:
Http://download.csdn.net/detail/camelials/4841497

PS:

I mentioned the differences between MVC, MVP, and mvvp in a simple sentence in the previous article. The difference between them is too general, which may make everyone understand deeply, in addition, the question of MVC-> mvvm is very wide. My understanding is basic.

I want to find time to write an mvvm demo under WPF to explain it. The other party hasn't used WPF to write anything for a long time. It's a pity. Thank you for your attention.

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.