Monday, April 5, 2010

Zen and the Art of CMS, Chapter 1

What you have to do, if you get caught in this gumption trap of value rigidity, is slow down—you’re going to have to slow down anyway whether you want to or not—but slow down deliberately and go over ground that you’ve been over before to see if the things you thought were important were really important and to…well…just stare at the machine.  There’s nothing wrong with that.  Just live with it for a while.  Watch it the way you watch a line when fishing and before long, as sure as you live, you’ll get a little nibble, a little fact asking in a timid, humble way if you’re interested in it.  That’s the way the world keeps on happening.  Be interested in it.

Robert M. Pirsig, Zen and the Art of Motorcycle Maintenance

I’ve been looking for a model to use as an ongoing discussion of Sitecore.  I’ve decided on a tried and true classic (translation: might be outdated) in Bob Boiko’s Content Management Bible.  With 40 chapters and over 1,000 pages, this should give me plenty as a structure to describe every part of the Sitecore CMS, sprinkling in my own lessons learned, discussions with Sitecore implementation partners and clients, and an occasional code sample here and there.  With any system there are absolutely great things and things that become absolutely great with the right mechanic.  There are always challenges.  In almost all cases these are very human challenges, where implementation details follow a frustratingly parallel and distinct path from poorly communicated expectations; where use cases are copied from comfortable but outdated business processes; where the the tool is used with unintended force until it strips the bolt; where the wrong tool is used altogether.

Time to step back, take our time, stare at the machine.  With patience and focus, we’ll tune it for a very long and prosperous ride….

Chapter 1, What is Content?

For Sitecore, What is an Item?

Boiko’s introduction allows us to consider the complementary and colliding concepts of information, data and content.  This introduction to core CMS concepts gives me an opportunity to talk about a core Sitecore concept—the Item.  The Item in Sitecore is the core unit of content.  An item is, on the surface, a collection of Fields.  An Item is much more, though.  It is the container (the honey jar with the label in Boiko’s example) that describes its purpose, its relevance, its allowed position in the information architecture, its review process (workflow), its rules for validation (its page should be XHTML compliant, a particular field within it should be required, another field within should follow a regular expression describing U.S. zip codes, etc.), its access rights for various roles and users of the application.

Let’s take a brief look at the Item, its lifecycle and some of the many things that it can do to help describe your information.  Sitecore has very rich documentation on the Item, the Data Templates that serve as the data and business rules model for the Item and the various user interfaces used to create and maintain the rich content that this architecture promotes.

Let’s create a new News Article and see what we have available to us.  Now, of course, the News Article we create has already been fully modeled for us.  A News Article Data Template has been created in my site (ideally a cross-functional group got together and really talked about what a News Article is for our company) and is available for us to build a new News Article from.  In addition, this group got together and talked about where News Articles should appear in the site—from  presentation, navigation and content hierarchy perspectives.  As you can see below, there’s a News-and-Events area of the content hierarchy, and Sitecore dutifully guides me that my new News Article can go here.

image

Let’s name our new News Article:

image 

…and our News Article is inserted into the content hierarchy.  Notice the right column, where sections upon sections of available fields await our editing.  Many of these are Standard Fields (fields given to our new News Article by its automatic inheritance of the Sitecore Standard Template).  This automatically gives me an incredibly rich container of information—some fields I might never see, care about or maintain, but they are there to further describe my News Article and track its movement through the system.  I can see that this News Article has already begun its track through a workflow process (a handy automatic review process that the cross-functional group decided should be a requirement of all News Articles across the site and therefore set the rule on the Data Template for News Articles):

image

As we start to expand some of these sections, we can get down to the Field level of detail.  Now we’re at the individual pieces of information that go into our container.  Some of these fields will be the core of the News Article itself.  A Title field may be automatically populated by the name of the News Article I just created.  Other fields may be populated with static text (to tell me as a content author what I should do with this field):

image

Other fields may allow me to create links, references within my content hierarchy, tying together like-content:

image

Still other fields allow me to describe my content, targeting it towards specific personas, profiles, campaigns, describing it as appropriate for certain geographical locations, assessing a score or value in a sales or marketing category:

image

All along the way, as this new News Article moves from creation through edited versions to various workflow / review states to readiness for site publication, this container, this Item contains all the fields necessary to track and report on this activity:

image

…and a consistent event architecture to react in your own way as this item moves through the process.  If I wanted to write to my own log file, communicate with another application, etc., I have a clear event model in place.  I could easily call out some Sitecore actions (as in this Validation action that is called out as someone Approves my News Article):

image

 

Or I could call my own Hello World code when the News Article is Saved:

image

Boiko's chapter 1 is certainly not a comprehensive coverage of Content Management.  Likewise, this article isn’t an in-depth, complete document on the Item in Sitecore.  Hopefully this scratched the surface about everything this honey jar is in Sitecore—with the rich field typing system, standard fields and other techniques that promote the meta-information surrounding the Item’s core informational fields, business rules (and I didn’t even yet mention presentation) containment, and an event model to track and react to everything the Item becomes along the way….