This article is the introduction to the USP Journal issue Developing SharePoint Content Types, the second edition updated for SharePoint 2010 (currently in production). If you want to be informed of upcoming issues, sign up for the USP Journal newsletter at http://uspjournal.com/newsletter
Let me make one thing absolutely clear. If Chuck Norris was a SharePoint feature, he’d be content types. In fact, I’m fairly certain that if you were to ask Chuck Norris (who, of course, is also the world’s biggest SharePoint guru) what his favorite thing in the whole universe is, he’d say SharePoint content types.
You may have seen something you think is cool before, like ice or liquid nitrogen. You are wrong. If you haven’t seen SharePoint content types, you have not seen cool. Let me show you what I mean.
Content types are actually business concepts. Your boss will understand content types, as will the nice lady down in human resources or John in the finance department. In fact, business people work with concepts that are perfect candidates for content types every day.
Despite being a business concept at its core, content types are exceptionally cool from a technical perspective too. As a developer, you’ll find that content types map nicely into the object oriented mentality of programming. And, you’ll also quickly realize, that this is just the tip of the iceberg.
Excited yet? Let me tell you about a few more things that you can do with SharePoint content types.
You can construct and represent anything in the world as a content type. I don’t care if it is bikes, invoices, vinyl records, employees, or quantum states of electrons. If something exists, you can construct a content type to represent it.
Of course, that begs the question of what existence really is, but do not despair, you can explain deep philosophical ideas such as Plato’s theory of Forms using content types.
On a more mundane level, content types are perfect tools for anything that is taxonomy related. In other words, categorizing and defining something is the job of a content type. This is true because a content type at its core is just a type of content, or even more elementary, it is a thing.
Go beyond the most common usage scenarios, and thanks to its core simplicity and power, content types can be used to build functionality into SharePoint that nobody has even dreamed possible yet. I can’t even count the times I’ve built solutions where content types serve as plugins to expand the solution years after I’ve left the project. Content types in these solutions are the pathway to future extensibility and maintainability of solutions.
Further, content types can make your data behave, and yes, that means exactly what it says. It’s a very weird concept for most people, wrapping your head around the idea that data, essentially just a long series of zeroes and ones, can behave.
What’s even better, once we’ve taught our content types how we want them to behave, we don’t need to do anything for that behavior to happen. The content types are aware of what goes on and reacts to the events to which we have taught them to react, exhibiting exactly the behavior we tell them to exhibit.
It’s a bit like Pavlov’s dogs, except our content types can do much more than salivate.
Of course, there’s a deeper technical explanation for exactly how this happens, including another very cool concept called event receivers, but more on that another time.
We haven’t even begun talking about appearance. Content types control the appearance of your data too, and I’m not just talking about web pages here. On a fundamental level, content types can be anything, whether that’s a form on a web page, a JSON object, an InfoPath form, a Word document, or an XML representation. And it can be all of these things at the same time.
Chameleons have nothing on content types when it comes to adapting its appearance to the needs of a situation.
Do you think that content types are cool yet? Well, if not, here’s an idea for you. You can extend content types to be exactly what you want.
I have said that content types can extend SharePoint, but not that you can extend the actual content types. Is there anything you cannot do with content types the way Microsoft designed them? Well, you can adapt them to suit your needs by using XML representations of any other concept or idea that you need to support.
In other words, if content types aren’t perfect for what you need, you can change them to be exactly what you need. There are no situations in which content types are not suited.
All these factors combined is why content types, on the scale of importance to your SharePoint development career, with 1 being that awful web page thing they slapped on in SharePoint 2007, and 10 being having a heartbeat, content types score 87.
If there ever is a Nobel peace prize for marvelous ideas, I vote to award it perpetually to whoever came up with the idea of SharePoint content types.
Found this article valuable? Want to show your appreciation? Here are some options:
a) Click on the banners anywhere on the site to visit my blog's sponsors. They are all hand-picked and are selected based on providing great products and services to the SharePoint community.
b) Donate Bitcoins! I love Bitcoins, and you can donate if you'd like by clicking the button below.
c) Spread the word! Below, you should find links to sharing this article on your favorite social media sites. I'm an attention junkie, so sharing is caring in my book!