The Metadata Plugin
Metadata Management for Manila
 
Site last updated
2/24/2006; 12:33:21 PM
 
Home

Why

Features

FAQ

Updates

Documentation

Download

Developers

Bugs

Feedback

Discuss

Planned
Features

 
 

Why the Metadata Plugin is Important

A database consists of tables of structured data. In Manila, messages are stored in a message table. You can think of the message table as a table like this:

MsgNum 
------ 
   1    
   2   
   3   

Each story is a record in our little database. (For a background on how stories and messages relate, see here). What other information does Manila have? Well, if you look at the database table where Manila stores this, you'll see plenty. Check out yourManilaWebsite.["#discussiongroup"].messages.["0000001"] if you have your own copy of Frontier. For each record we know

  • when it was posted
  • when it was last updated
  • who posted it
  • how many times it's been read
among other things.

Notice that each of these could be considered an attribute of the record. This is a basic database table. To make it simple, think of attributes as columns, keyed on message number:

MsgNum Subject               PostedBy        When
------ --------------------- --------------- -------------------
   1   How to frisk a cat    mo@zzzzzzz.com  5/16/00; 3:39:24 PM
   2   Getting rid of fleas  mo@zzzzzzz.com  5/16/00; 3:42:10 PM
   3   Shedding on the rug   mo@zzzzzzz.com  5/16/00; 3:55:33 PM

What the Metadata Plugin lets you do is add columns to this table.

This gives you incredible flexibility. Suppose you are using Manila to build a how-to site about cats. Let's add a Topic column and a few more records:

MsgNum Subject               PostedBy        When                Topic
------ --------------------- --------------- ------------------- ----------
   1   How to frisk a cat    mo@zzzzzzz.com  5/16/00; 3:39:24 PM Thievery
   2   Getting rid of fleas  mo@zzzzzzz.com  5/16/00; 3:42:10 PM Pest Control
   3   Shedding on the rug   mo@zzzzzzz.com  5/16/00; 3:55:33 PM Grooming
   4   What to feed your cat mo@zzzzzzz.com  5/17/00; 1:00:01 PM Diet
   5   Fluffing your cat     mo@zzzzzzz.com  5/17/00; 2:03:38 PM Grooming

Now we can ask the computer questions like, "Show me all the stories related to grooming posted after May 16." This is easy for the computer. All it does is check each record to see if the Topic entry is "Grooming", right? Not so fast, buster. We could do it that way, but after we've got 10,000 records it's going to take a while to check every one. That's why databases make indices (one index, two indices).

The Metadata Plugin can make a handy index of each column you define. So it's got an index of Topic already built. It built it a little at a time as our friend Mo was posting web pages (that is, creating new records). Now all it has to do is check the index entry for "Grooming", and return what it finds there, namely messages number 3 and 5. We're done.

But wait! We also asked the computer only for records after May 15. So the computer can now filter the results by checking them one by one. This is time-consuming because every record in the result set must be examined, but because our result set is fairly small it doesn't take very long.

I can see you mulling this over. You're thinking, but wait...couldn't an article fit into more than one topic? Maybe we'd like to write about your cat's bad habit of stealing Frosted Flakes from the cupboard and gorging on them. This would fit under both Thievery and Diet, you point out. Good thinking.

Because of that, each entry in a metadata column (like the Topic column) is a Frontier list. It probably should be a table if we wanted to accomodate 500 multiple items in one column entry, but for now it's a list. The issue is really how these values appear in the index. They appear individually, so we can look up one topic at a time very quickly.

You delimit the list using commas. In the future we'll probably use a customizable delimiter for each column.

Can you begin to sense the power of metadata? Manila becomes the front-end to a database that you can use any way you wish. The most common uses will be what we've demonstrated here (show me all messages that have attribute x) and building tables of contents or indices. There are macros for this type of thing, e.g.

{metaDataMacros.query(metaname,metavalue)}

Let's get that list of Grooming articles:

{metaDataMacros.query("Topics","Grooming")}

Results:

Want to crank through the Topics column to generate an index of articles by topic? No problem. How about adding another column called Breeds, and generating a topical index by breed? No problem. Assign a Price column and charge for each article! Assign a Ranking column and increment it each time a user clicks a This Is Useful button. Assign a FreeBinkyToy column and send everyone an appropriate cat toy for reading an article! You can take it from here.

How do you get the information into Manila? Easy. When you choose Edit this Page, you get fields for two metadata values, Title and Text. Additional metadata values show up below this. Here's a screenshot of a me editing a story on a site that has a column called keywords:

Screenshot:
metadata entry screenshot: Screenshot

The metainformation gets posted right along with the traditional Title and Text you've been entering.

Also, the metainformation is available inside HTML META tags in the HEAD section of your document. If that's all you want the Metadata Plugin to do, it will accomplish that task handily, as my buddy Bill found out.

The Metadata Plugin can be downloaded here.

- John VanDyk

Comments...


This page last updated Monday, August 19, 2002 at 12:02:03 PM. (22146)