Sunday, August 9, 2009

Sharepoint Page Types - Application and Site Pages

Hello Friends

SharePoint allows page ghosting, the ability to store a single copy of a page as a page template (on the file system). From which it creates page instances. Top level pages that are identical for many web applications are handled as ghostable pages, however once a page is customized, it becomes unghosted. The purpose of page ghosting is to improve efficiency and scalability. The idea is that if 100 websites need the same default.aspx page, then that page is handled very efficiently via page ghosting. Ghosted pages are compiled into a DLL which is kept in memory.

Since customized pages are numerous, it would take too much memory to compile each of them into a DLL and store them all in memory. SharePoint provides a mechanism that allows customized .aspx pages to be stored in the context database. For this to work SharePoint must be able to find the page in SQL instead of on the local drive. SharePoint provides SPVirtualPathProvider a class that abstracts the Page Parse. This class decides whether a page is ghosted or unghosted. Unghosted page must be individually parsed and loaded into memory.

SharePoint websites contain some special virtual directories: _layouts, _vti_bin, and _wpresources which are used by the WSS runtime. The physical location of these virtual directories is under web server extensions.

SharePoint supports application pages and site pages. Application pages can not be customized. They perform better and can contain inline code. You can create new application pages and integrate them into menus using CustomActions.xml elements. An application page is typically used in many websites. A good example of application page would be settings page which administrators can find in the Site Actions menu.

Application pages are deployed in the <12 hive>\TEMPLATES\LAYOUTS folder. Application pages are scoped at the farm level. They are used to provide much standard functionality for provisioning and administering sites.

Site pages can be customized and are unghosted. Although they must be retrieved from the content database, parsed, and then loaded into memory, unlike DLLs, they can be unloaded from memory too. Possibly this makes websites with a large number of pages because memory is freed up when pages are no longer needed.

The SPFile class is used to read and write to the contents of a site page. The SPFolder class supports a hierarchy of site pages.

Disha Shah

1 comment:

  1. Disha,

    I've created an email distribution list on the Exchange server and security enabled it and now I can see that group with an .npe extention in Sharepoint 2010 but when I setup alerts against that group the individuals get the notification that they are added to receive alerts but when the announcement is created they never actually receive an email with the announcement in email. Do you have a fix or does anyone have a fix for this? if you create the group in Sharepoint Design you will never see those groups in Sharepoint. The only way around them is creating them on the exchange and selecting it.