Tuesday, March 22, 2011

Difference between site pages and application pages in SharePoint 2010

In this post we will discuss about Difference between site pages and application pages in SharePoint 2010.

Also you can check out:

- What is Document Sets and How to create Document Sets in SharePoint 2010?

- Call jQuery to SharePoint page using Custom Action

- SharePoint 2013 deployment Scenarious

Site pages support page customization through the browser and with SharePoint Designer 2010. Examples of site pages include the home page (default.aspx) for a site, as well as the pages associated with lists and document libraries, such as AllItems.aspx, NewForm.aspx, and EditForm.aspx.

The downside to site pages is that they require an elaborate processing infrastructure that has implications on security, performance, and scalability.

Customized site pages run in safe mode and, consequently, do not support inline code. To process the request for a customized site page, SharePoint Foundation must retrieve the
content of pages from across the network in the content database. SharePoint Foundation must also parse each customized site page individually, as well as execute it in a special no-compile mode.

Since each customized page instance must be loaded separately into memory, it will affect the performance of large server farm.

Application pages do not support customization, which gives them a few distinct advantages over site pages.

- Application pages are not tracked in the content database.

- They never run in safe mode and they can contain inline code.

- Each application page is always compiled into a single assembly DLL so that it performs and scales better than site pages that can be customized.

- Since application pages must be deployed inside the SharePoint Root directory, they cannot be used within sandboxed solutions. If you are required to build a SharePoint solution that targets the sandbox, the only type of page that you can add to a site is a site page.