0
votes

I have done many a search on this issue with mixed results and ensuing ambiguity. The time has come to nail it down for good. If I'm developing the equivalent of a complex ASP.NET application, and I want to run it on top of SharePoint 2010, is it best to develop each page as a web part or an ASPX application page? The pages are many and varied, but each one interacts with a SQL 2008 R2 backend via custom WCF services.

I have yet to see a definitive and authoritative answer to this question. I'm looking for an official guideline from Microsoft or similar. Here's a breakdown of what I have found so far:

The following non-official post would clearly favor application pages for my case. However, it was posted back in the MOSS 2007 days, when SharePoint development was more of a challenge. http://grounding.co.za/blogs/brett/archive/2008/07/13/sharepoint-the-role-of-a-web-part-vs-using-application-pages.aspx

Microsoft, in comparing application pages to site pages, states, β€œAn application page is the best type of page to create if you want the page to contain custom code.” http://msdn.microsoft.com/en-us/library/ee231581.aspx

So far, so good. But what threw me off was this other seemingly contradictory link, also from MS: "We currently recommend that third-party developers develop custom Web Parts, which can be added to site pages, to handle their solution's functionality whenever possible, rather than develop custom application pages.” (msdn.microsoft.com/en-us/library/gg552610.aspx)

I'm biased toward application pages because that's what our team has been using all along and has had no problems. Everything from the development experience to debugging and deployment support has been top notch. But internal forces are pushing for us to make the switch to web parts, so I'm looking for justification.

1
This is too broad a question for Stack Overflow. Consider searching on SharePoint. – John Saunders

1 Answers

1
votes

It depends on what your desired behavior. If you want content from your dynamic pages to be embedded inside the SharePoint master pages (with all the navigation and styling), you would create web parts and attach the web parts to web part pages or any SharePoint page. If your content pages can stand on their own without the need of SharePoint navigation, you can create application pages.

Need SharePoint navigation (UX)? Then create web parts. Not depended on SharePoint navigation? Create application pages.