Nov 30, 2008

SharePoint Feature

Feature is mechanism that SharePoint used to deploy customized components. The built in components like document list, team site also deployed using feature. So basically, everything can be deployed as feature, for example list definition, content type, site column, workflow and etc, except a site template. The core of the it are two files feature.xml and elements.xml.

When you deploy features, you put all your files into the a folder, and organize the folder with this structure, CONTROLTEMPLATES, FEATURES\FEATURE_NAMES, IMAGES. The content of the folder will copied to the Template folder(c:\program files\common files\microsoft shared\web server extensions\12\Template).

The elements.xml has lots of element. But one of common use is deploying files by using Module element. You can deploy files like the following.

            Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c
            Yet Another Web Part is Born
              This Web Part was added through declarative logic
            Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c
            Watch My Gears Run

No comments:

Post a Comment