Enterprise Search Friday, Sep 5 2008 

Introduction:
Enterprise Search is one of the most compelling features of SharePoint Server 2007. The out-of-the-box capabilities can drastically improve end users’ experience in retrieving relevant information. The same capabilities are available for custom SharePoint applications through dedicated APIs.
There are three ways to create and run search queries against the SharePoint API, each with specific advantages. A description of each approach follows.
  • Keyword Search Queries
  • Search Web Service
  • List Query API (SPQuery Class)

Keyword Search Queries:

This is the most straightforward approach. Once you specify in your code what keywords to look for, you can just run that query and start retrieving results. For its simplicity, the keywords-only approach comes with limitations. In particular you will not be able to define comparison constraints in the query.

Search Web Service:

SharePoint Server 2007 exposes most of its search functionalities as a web service. You can reference this web service from any other application to run queries against your SharePoint farm and use those results outside the context of SharePoint Server. Because all our code executes in the context of SharePoint Server, we passed on leveraging the search web service to favor full text SQL queries.

List query API (SPQuery class):

SPQuery is the class of choice to query and return items from a single SharePoint list. The query syntax uses CAML (Collaborative Application Markup Language). CAML queries were already available in SharePoint Server 2003. They provide a way to run XML-formatted queries against SharePoint content. The syntax is quite powerful, with the ability to filter data based on field comparisons. Note that by default only queried items in a single list folder will be returned. Items from subfolders will not be included in the search results.

Cheers…

To create a minimal master page Monday, Sep 1 2008 

  • Open SharePoint Designer.
  • On the File menu, click New, point to SharePoint Content, and then click the Page tab.
  • Double-click Master Page to create a new master page.
  • Click Design to show the master page in design view. You should see header and left margin areas and several content placeholders in the master page.
  • Click Code to show the master page in code view.
  • Copy the Code into the Master Page.
  • On the File menu, click Save As, provide a unique file name with the .master extension, and then save the file to the master page gallery (/_catalogs/masterpage) in your site collection.

Cheers…

How to: Create a Minimal Master Page Monday, Sep 1 2008 

Introduction
One of the first tasks that you must complete when configuring a Microsoft Office SharePoint Server 2007 Web site is to create one or more master pages. A master page contains references to elements that you can share across multiple pages in an Office SharePoint Server 2007 site, such as navigation, search controls, logon controls, and banner images. A master page can also contain the cascading style sheet (CSS) and ECMAScript (JScript, JavaScript) references that define the overall look and feel of your site. Commonly, every site—and therefore every page—in your site collection uses the same master page to present a consistent user experience across the entire site collection. Depending on your needs, you can use a different master page for one or for all of the sites in your site hierarchy to distinguish the various areas of your portal.
Master Page Galleries
When you provision a site collection in Office SharePoint Server 2007, the system creates a master page gallery that contains all the master pages and page layouts for that site collection. If the site collection uses either the Publishing Portal or Collaboration Portal templates, the master page gallery includes several master pages that are provided with Office SharePoint Server 2007, such as BlueBand.master. These master pages are located in the path C:\Program%20Files\Common%20Files\Microsoft%20Shared\web%20server%20extensions\12\TEMPLATE\FEATURES\PublishingLayouts\MasterPages\, with other example .master pages. You can use any of these master pages as they are, or you can customize them fully to create unique branding for your site.
Why Start with a Minimal Master Page
Creating and completing a master page to begin your SharePoint site customization takes planning and time. If you can, you want to prevent having to rewrite or back out code you don’t need in your master page. This topic shows you how to create a minimal master page that includes only the minimal functionality that Office SharePoint Server 2007 requires so that you have a stable platform upon which to build your own master pages. Creating a minimal master page can help you avoid the time-consuming process of backing code out of a pre-existing .master page such as BlueBand.master, or removing functionality and then building it back in when your customization needs change again.
You can, of course, create a master page from scratch. However, we generally do not recommend this because a truly empty master page does not include all the content placeholders that the Office SharePoint Server 2007 page model needs to work correctly.
The sample code in the following procedure includes only what the Office SharePoint Server 2007 page model requires—necessary content placeholders and controls to work with the page layouts that are included in a default Office SharePoint Server 2007 installation. Office SharePoint Server 2007 requires a master page that includes a title, branding, logon functionality, search functionality, breadcrumb functionality, and basic structural elements such as page areas, separators, borders, consoles, and description placeholders.
The following procedure uses Office SharePoint Designer 2007 as the master page design environment. You can, however, use a text editor, a Web editor such as Microsoft Office SharePoint Designer 2007, or an integrated development environment (IDE) such as Microsoft Visual Studio 2005 to create a master page.The master pages included with Office SharePoint Server 2007 are based on the SPWeb.CustomMasterUrl property of the SPWeb class in Windows SharePoint Services.
Cheers…