다음을 통해 공유


SharePoint Page Processing Model (ECM)

Applies to: SharePoint Server 2010

Microsoft SharePoint Server 2010 is a template-based page rendering system. The two fundamental templates used for page rendering in SharePoint sites are master pages and page layouts. Master pages can be used by all page instances in a site. Page layouts can be used by all page instances that are based on that page layout. Page layouts are stored as list items in the Master Page and Page Layout Gallery, so you can use versioning, check-in and check-out, workflow, and other features available for SharePoint document libraries.

SharePoint Server 2010 is built on top of Microsoft SharePoint Foundation 2010 and Microsoft ASP.NET. The ASP.NET engine interprets and runs all SharePoint page requests. For example, suppose a user requests a page named welcome.aspx in the browser. The ASP.NET engine retrieves the page layout associated with the page and the master page associated with the site via the SharePoint Foundation 2010 FileProvider object. It also renders the field controls and Web Parts from the fields onto the page. Figure 1 shows the page processing model in SharePoint Server 2010.

Figure 1. Page processing model in SharePoint Server 2010

Page processing model in SharePoint Server 2010

The Page Processing Model

The following list describes how ASP.NET and SharePoint Foundation interact to render pages in a SharePoint site:

  1. The browser requests a Web page from Microsoft Internet Information Services (IIS).

  2. IIS passes the request to ASP.NET.

  3. An HttpApplication pipeline is created for the request.

  4. ASP.NET fetches the page via the SharePoint Foundation file provider. ASP.NET passes the URL to the file provider, and the file provider fetches the page and returns the page stream. The SharePoint Foundation file provider implements caching and reduces round-trips to the database.

  5. ASP.NET loads a Page class, parses the page stream, and finds a reference to the content page upon which the page is based.

  6. The ASP.NET engine compiles the page stream and stores it in memory.

  7. ASP.NET queries the SharePoint Foundation file provider for the content page.

  8. ASP.NET loads the stream for the page layout associated with the current page.

  9. ASP.NET compiles the page layout and stores it in memory. ASP.NET can free this memory later if the system needs memory.

  10. ASP.NET determines the master page for the site and fetches the master page via the SharePoint Foundation file provider.

  11. ASP.NET compiles the master page and writes to the disk, so that you do not have to recompile the master page unless you modify it.

  12. The content page runs each control on the page in the context of the page that was requested.

  13. ASP.NET updates the necessary caches.

  14. IIS returns the page to the browser.

The next time the page is requested by the same user or by a different user who has the same permissions to see the page as the first user, page processing is much more efficient:

  1. The browser requests a Web page from IIS.

  2. IIS passes the request to ASP.NET.

  3. An HTTPApplication pipeline is created for the request and calls the HandleRequest.

  4. ASP.NET uses all the internal caches.

  5. ASP.NET renders the HTML for the controls.

  6. IIS returns the page to the browser.

Note

Even though this process takes little time, ASP.NET renders the controls each time. If you do not want the controls to be rendered each time, you can turn on the ASP.NET page output caching feature.

See Also

Tasks

How to: Extend Caching by Using the VaryByCustom Event Handler in SharePoint Server 2010 (ECM)

Concepts

Custom Caching Overview in SharePoint Server 2010 (ECM)

Output Caching and Cache Profiles in SharePoint Server 2010 (ECM)

Other Resources

Master Pages