I have been guilty of underestimating the power of Features. It wasn't really until I started digging deep into the bowels of the new Features and Solutions system in SharePoint 2007 that I finally started to realize how pervasive this stuff is. At first glance, its extremely easy to make a sweeping generalization that Features are just a simple ability to add "stuff" in a couple of different locations throughout SharePoint. SharePoint actually does a really good job of hiding its own use of Features, which makes this misunderstanding all the more easy to make.
When you create a new Feature, you essentially define a Scope at which that Feature will be visible, such as Web or Farm, etc. Within your feature, you define Elements. These elements are the key to expanding SharePoint's capabilities. The following is a list of the types of elements that you can have in your Feature (each of these element types corresponds to an XML element in the element manifest for the feature, and you can have 0 to many of each element type):
- List Template - defines the custom schema for a list
- List Instance - indicates that when your feature is activated, the scope in which it was activated will contain an instance of a list
- Module - defines a file set. If you create a feature that adds custom web part pages to an existing site, the module indicates the list of those files to add
- Content Type - defines a custom content type within the feature
- Field - defines a shared column that can be re-used by any list schema within that scope (including lists defined by your feature)
- Workflow Type - defines a workflow that can be used at the site scope
- Event - defines an event binding so that custom code you have created (possibly included in the module file-set) will be invoked upon given events in a given list. Event handlers can be bound to a specific list or to a content type.
- Custom Action - defines a custom action, such as a new menu item in the administration menu or a new link in the "Site Actions" dropdown menu, etc. In addition to defining new custom actions, your feature can hide existing ones!
- Delegate Control - A ridiculously powerful feature that allows you to essentially say "I'd like to replace this stock SP control with my own, add it to the queue of candidate controls for replacement". This is exactly how Portal Server replaces the WSS search that comes with team collaboration sites
- Feature / site Template Association - Allows you to indicate that, when your feature is active, all new provisions of an existing site template will also contain an activated feature of your choosing (could be your own, could be a different feature). Example: you could make it so that, once your My Company Corporate Policy feature is installed, all future provisions of the Team Collaboration site template also include the Corporate Default Document Libraries feature. Hopefully I don't need to explain further how unbelievably useful this type of Feature element can be.
There are two key points that I want to make here. The first is that Features allow you unprecedented ability to create new functionality for SharePoint and extend existing functionality. The second key point is that Features aren't just something that SharePoint implemented to allow you to extend things, SharePoint itself is built using Features. After I wrote some code (you'll have to get the book for that source code, sorry) to enumerate the list of hidden features contained in my test Farm, I found that SharePoint installs with 136 Features. Most of these are hidden Features, but, because they use the Feature infrastructure, all of that pluggable flexibility is available to you as a SharePoint developer.
Here's a quick list of some of the non-hidden Features that ship with SharePoint 2007:
- Team Collaboration
- Review Workflows
- Premium Web
- Slide Library (splits a PPT presentation into individually viewable slides on the site without breaking the PPT file open)
- Premium Web Application
- Premium Root Site
- Transaction Management Library
- Global Web Parts - stock set of web parts that can be used at any scope
- Enhanced Search
- Base Web Application
- Spell Checking
- Signatures Workflow - standard workflow for getting "sign off" on documents
- Reporting
- Premium Site
- Publishing Web - not sure, but I'm pretty sure this is what enables the Wiki functionality
- Base Web
- Base Site
- Basic Search
- Translation Workflow - workflow for sending a document through rounds of translation into multiple languages
- Expiration Workflow
- Excel Server - I could write an entire chapter on..oh wait, I did...
- Search Web Parts
- Publishing Site
- Issue Tracking Workflow - That's right... the "Issue Tracking" list that comes with SharePoint is workflow enabled.
So at this point, you should probably saying to yourself, "Self! I MUST get a hold of SharePoint 2007 when it comes out!!"
Here's the bottom line: If you are going to be developing and writing code for SharePoint 2007, then you must learn about Features and Solutions. Features aren't simple, isolated points of extensibility (this assumption is easy to make, I made it too). Features are, in fact, the exoskeleton on which ALL of SharePoint is based.
tags: sharepoint wss publications beta features
links: digg this del.icio.us technorati reddit