Sharepoint to support MVC

2019-09-02 04:27发布

问题:

I am a sharepoint developer and an asp.net mvc developer and the thing is I prefer developing Asp.net MVC web applications compare to sharepoint. It hurts but reality bites that sharepoint is totally frustrating for developers or maybe not for some of you but for me most of the time it does although I still love developing sharepoint. When MVC was introduced many developers embraced it and until now many are still craving for it. As to what I can see, if MVC will be fully integrated with sharepoint I could possibly say that sharepoint can make a big difference and say thanks to MVC.

My question is could sharepoint ever have the chances to be integrated with MVC? What part of sharepoint could possibly fail MVC to be integrated? Could you give a big reason why Sharepoint is a big NO to MVC?

回答1:

SharePoint is a really big, complex web application with a huge install base and no control over end user customization. That sort of system can't be rewritten from scratch without a really good reason, and even when there is a really good reason, any attempt to do so is doomed to failure.

There are ways you can use MVC alongside SharePoint though. Any .net application running on the right server can access the SharePoint API. You can also wrap mvc views in SharePoint web parts / pages. Getting the web forms view engine to run under SharePoint requires the sort of hacking that will never get past corporate infrastructure people, but hosting Razor views in SharePoint is relatively easy to set up.



回答2:

Check out SharePointMVC project