I wasn't terribly comprehensive in terms of my idea for content types in my last post. I blame this on it being late when I had written it, and my blogging skills being rusty due to disuse. I had spent a little time on IM after posting my last entry talking with Trice about the idea. There seems to be a bit of confusion on how this will be implemented. First, a little background.
Drupal is the content management system powering deninet. Drupal conceptualizes a single piece of content as a node. So, this blog post is a node. My last blog post is a different node. The deninet staff channel is yet a third node. At time of this writing, there are over a 1000 nodes on the site (actually quite few as Drupal sites are concerned).
Each node as a type. So, this blog post and the one before it are of type "blog". Types are what you select when you go to the create page. At present there are only a handful of types available -- blog posts, book pages, channels, and Images. I actually see a few more types (Group, FAQ) due to my admin status. There's more information about nodes and types on this page.
There's a third data layer that's important to bring up -- fields. Types specify certain kinds of fields. All types have two basic fields -- Title and Body. Things like Blog posts are little more than a title and a body. Channels have a few extra fields, such as "description" that channel admins use to provide a brief description on their channel. Fields are actually a complex mechanism that can allow nodes to have files attached, images displayed, references to other nodes, and so on.
Deninet uses views to display anything that isn't a node. Views can query nodes for specific fields and use them to create lists of content. The user track page is actually a view. We use views extensively to display content throughout the site.
Now that we have some concepts laid down, I can start explaining my idea.
One of the things I would like to see deninet become is a repository for our creative content. This includes written works, pieces of artwork, and possible music and video in the future. In essence, I want deninet to be our own, personal DeviantART.
The problem I face as the site designer is how to package all this kinds of media. I've basically come up with three different models:
- The Musketeer model insists that there is one and only one content type for all creative works posted to the site -- a "creation". Any time you go to the create page, you would click on the "creation" link and upload a file of your work. The file upload would basically be a single Field. Special code would need to be written to handle this that would identify the file type you uploaded, and decode and display the content. The benefit is a huge amount of customization and refinement of the UI is possible, but at the risk of development time and bugs.
- The opposite model is the Content Type Sprawl model. This is where we have not one content type, but scores of them. Poetry would be a different content type from Prose. Architectural photographs would be a different content type from that of people. This leverages Drupal's abilities, but also makes things dreadfully complicated. Each type would need customizations and testing and would result in a similar development burden in terms of time as the Musketeer model. The creation page would also be a mess of different options that would be very confusing to the end user.
- The How it's Packaged model is a middle of the road approach. Instead of looking at what the creation is, we look at the kind of data we save it as. Poetry, prose, non-fiction, novellas, are all written material. In terms of data packaging, they're all text (*.txt). Music, podcasts, voice acting, and so on are all saved as audio files (*.aac, *.mp3). Photographs, sketches, and so on are saved as image files (*.png, *.jpg). Anything with video such as a TV show, video recording of a lecture, etc, are saved as video files (*.avi, *.mp4, *.mkv, *.mov). Users would select the type of data they have to post, and then select the content type (one of four, basically) appropriately.
All of these models assume that things that aren't creative works such as blog posts, book pages, or channels, still exist as separate content types. That will not change. I'm only speaking to adding content types, rather than replacing them.
I've been arguing over these three different models for months now. In the end, however, the How it's Packaged model seems to be the best course of action. First of all, it would require the least development effort on my part. Images, Video, and Audio already have modules that provide the necessary fields. Creating four content types, each incorporating their respective field, would be a trivial task.
One question that Trice asked me is how we will handle categorization. If all written works are one content type, how will people be able to find poetry posts, or prose posts without shoveling through all the other potential kinds of text content? This is actually not that hard to solve. Drupal provides a complex tagging mechanism called Taxonomy that can be used to categorize content. When posting, a user would select the category of their content. It would be similar to how tags are entered in with Blog posts. Views would then be used to allow users to narrow down results to the particular category they want to see.
Another question Trice had asked is how we shall we handle an ordered series of posts? I believe this can be done with an additional content type -- Collection. A collection is a grouping of Creations (text, audio, video, image). Creators can make Collections for their own material. It may also be possible for users to create collections of anyone's material by linking back to the originals. I haven't fleshed out the details here as of yet, but I have some ideas.
It's possible I may be able to configure the appropriate node types by the end of the week using the model I suggest. Refinement will take longer, of course, but I believe this is a good start for us.