As with Microsoft Content Management Server 2002, Microsoft Office SharePoint Server 2007 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.
Office SharePoint Server 2007 is built on top of Windows SharePoint Services 3.0 and Microsoft ASP.NET 2.0. 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 Windows SharePoint Services 3.0 FileProvider object, and it renders the field controls and Web Parts from the fields onto the page. The following figure shows the page processing model in Office SharePoint Server 2007.
The Page Processing Model
The following list gives a step-by-step breakdown of how ASP.NET 2.0 and Windows SharePoint Services 3.0 interact to render pages in a SharePoint site:
- The browser requests a Web page from Microsoft Internet Information Services (IIS).
- IIS passes the request to ASP.NET 2.0.
- An HttpApplication pipeline is created for the request.
- ASP.NET 2.0 fetches the page via the Windows SharePoint Services 3.03 file provider. ASP.NET passes the URL to the file provider, and the file provider fetches the page and returns the page stream. The Windows SharePoint Services file provider implements caching and reduces round-trips to the database.
- ASP.NET loads a Page class, parses the page stream, and finds a reference to the page layout upon which the page is based.
- The ASP.NET engine compiles the page stream and stores it in memory.
- ASP.NET queries the Windows SharePoint Services file provider for the page layout.
- ASP.NET loads the stream for the page layout associated with the current page.
- ASP.NET compiles the page layout and stores it in memory. ASP.NET can free this memory later if the system needs memory.
- ASP.NET determines the master page for the site and fetches the master page via the Windows SharePoint Services file provider.
- ASP.NET compiles the master page and writes to the disk so you never have to recompile the master page unless you modify it.
- The page layout runs each control on the page in the context of the page that was requested.
- ASP.NET updates the necessary caches.
- 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:
- The browser requests a Web page from IIS.
- IIS passes the request to ASP.NET 2.0.
- An HTTPApplication pipeline is created for the request and hits the HandleRequest.
- ASP.NET uses all the internal caches.
- ASP.NET renders the HTML for the controls.
- IIS returns the page to the browser.When a site visitor requests a page, SharePoint combines content and templates from the site to render the fi nal page. SharePoint begins by retrieving the requested page from the Page library. This provides SharePoint with the metadata that identifi es the web page, as well as the content that the author entered into the page. Next, SharePoint retrieves the Master Page and the Layout page from the Master Pages and Page Layouts gallery. SharePoint determines the correct page layout by
examining the content type of the requested web page. Finally, SharePoint combines the Master Page, Layout page, and content into a rendered HTML page that it sends back to the end user ’ s browser.There is an important relationship between the templates and content that is defi ned by content types. The content type is a container for the site columns that defi ne the content and metadata for the web pages. As the container for this information, the content type acts as the glue between the content and the templates. The content type is assigned to both the template and the Pages library. This allows the template to use placeholders that align to the site columns, and it allows the author to use the template within the site.
No comments:
Post a Comment