Difference between Application Pages and Site Pages

Leave a Comment
Hi All,

In following post ,  i am going to discuss on differences between Application Pages and Site Pages.

Application Pages:

1. These are the normal pages deployed in SharePoint ,most of them are found under _Layouts folder
2. These can be deployed at farm level or application level
3. If they are deployed within _layouts folder or global SharePoint Virtual Directory, then they can be used by any SharePoint application (available at farm level)
4. These are typical ASP.Net aspx pages and can utilize all of the functionalities available within ASP.Net including code-behind, code-beside, in-line coding etc.
5. Since application pages are compiled once, they are much faster.
6. These are ghosted Pages

Site Pages:

Site pages are pages that are created, edited, and customized by end users. They are primarily used for the content in a site. Site pages come in two types—a standard page and a Web Parts page. A standard page contains text, images, Web Parts, and other elements. A Web Parts page contains Web Parts in Web Part zones. They have a predefined layout that uses Web Part zones. Both types of site pages are edited using a Web browser or Microsoft SharePoint Designer.

1. Site Pages is a concept where complete or partial page is stored within content database and then actual    page is parsed at runtime and delivered to end-users.
2. Pages stored in Pages libraries or document libraries or at root level within SharePoint (Wiki pages) are        Site Pages.
3. these are at user-level not at web-application or farm level and can be customized per site level.
4. Since their definition is retrieved from database, they can utilize master pages stored within SharePoint     master pages library and merged with them at run time for rendering.
5. They are slower as compared to Application pages as they are parsed every time they are accessed.
6. SharePoint specific features like Information Management Policies, Workflows, auditing, security role   can only be defined against site pages not against application pages.
7. Since they are rendered not compiled hence it is not easy to add any inline code, code behind or code beside. Best way of adding code to these pages is through web-parts, server controls in master pages,         user controls stored in “Control Templates” folder or through smart parts.
8 These are Un-ghosted Pages.
"SPVirtualPathProvider” is the virtual path provider responsible for handling all site pages requests. It handles both ghosted and un ghosted pages requests as shown below:





Ghosted and Un ghosted not a page types, it's a page state. Application page is always ghosted as you mentioned, but site page can be ghosted or un ghosted (if changes have made through SharePoint Designer)





Related Post

0 comments:

Post a Comment