| By Kevin Hoffman | Article Rating: |
|
| November 2, 2006 11:30 AM EST | Reads: |
12,277 |
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, it's 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.
After I wrote some code to enumerate the list of hidden features contained in my test Farm (the source code is in my latest book, Microsoft SharePoint 2007 Development Unleashed), 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:
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.
Published November 2, 2006 Reads 12,277
Copyright © 2006 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Kevin Hoffman
Kevin Hoffman, editor-in-chief of SYS-CON's iPhone Developer's Journal, has been programming since he was 10 and has written everything from DOS shareware to n-tier, enterprise web applications in VB, C++, Delphi, and C. Hoffman is coauthor of Professional .NET Framework (Wrox Press) and co-author with Robert Foster of Microsoft SharePoint 2007 Development Unleashed. He authors The .NET Addict's Blog at .NET Developer's Journal.
- Kindle 2 vs Nook
- Practical Approaches for Optimizing Website Performance
- SQL Anywhere Server and AJAX
- PowerBuilder Top Feature Picks
- The Difference Between Web Hosting and Cloud Computing
- PowerBuilder 12 and .NET
- Contrary Opinion: Why Silverlight is Good for Adobe
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Wave on Ulitzer: Confessions of a Google Wave Fanboy
- Cloud Computing Best Practices
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Rich Content Rotator for ASP.NET
- RIAs for Web 3.0 Using the Microsoft Platform
- Kindle 2 vs Nook
- Practical Approaches for Optimizing Website Performance
- Social Media Terrorists
- SQL Anywhere Server and AJAX
- SYS-CON's Cloud Expo Adds Two New Tracks
- PowerBuilder Top Feature Picks
- The Difference Between Web Hosting and Cloud Computing
- Google Maps and ASP.NET
- Crystal Reports XI & How It Has Changed
- Converting VB6 to VB.NET, Part I
- Creating Controls for.NET Compact Framework in Visual Studio 2005
- Where Are RIA Technologies Headed in 2008?
- How to Write High-Performance C# Code
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Implementing Tab Navigation with ASP.NET 2.0
- i-Technology Photo Exclusive: Bill Gates & Steve Jobs In "Nerds"
- .NET Archives: Getting Reacquainted with the Father of C#




































