addedValues Plugin

...Powerful Free! Database Expansion for Manila
logoBottle:

(1 or more words)


Get tropes here!
Click to see internals
Report bug


Imperia Winter Regatta

sitepic_iwr.jpg:
Viewable with Any Browser

Members
Join Now
Login

Why the addedValue Plugin is Important

This page was adapted from one by John VanDyk - Why the Metadata Plugin is Important - about his Metadata Manila plugin, which was the predecessor of addedValues. Thi article can be found on the web at http://zelotes.ent.iastate.edu/metadata/why.

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 message is a record in our little database. 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

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:

msgnumSubjectPosted byWhen
1367do these get read or answered ?ben@dp.co.nz2007/08/06
1364Added Values logo thing ..ben@dp.co.nz2007/06/18
1363Removing variable uniqueness (and forms)ben@dp.co.nz2007/06/18
1362AV accross Manila sitesben@dp.co.nz2007/06/06
1352tinyMCE not working as Edit this Page editor.josh_allen@dpsk12.org2007/05/10
1169HOW TO : Make an Export of addedValues Data in Tab, CSV and XML formatsben@dp.co.nz2006/09/17
1002Different date formats in multilanguage sitescat@catconsulting.ch2006/06/18
469Fluffing your catmo@zzzzzzz.com2005/04/26
468What to feed your catmo@zzzzzzz.com2005/04/26
467Shedding on the rugmo@zzzzzzz.com2005/04/26
466Getting rid of fleasmo@zzzzzzz.com2005/04/26
465How to Frisk a Catmo@zzzzzzz.com2005/04/26

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

This gives you a lot of 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:

msgnumSubjectPosted byWhenTopic
1367do these get read or answered ?ben@dp.co.nz2007/08/06use of discussion
1364Added Values logo thing ..ben@dp.co.nz2007/06/18Added Values logo
1363Removing variable uniqueness (and forms)ben@dp.co.nz2007/06/18variable uniqueness
1362AV accross Manila sitesben@dp.co.nz2007/06/06AV query
1352tinyMCE not working as Edit this Page editor.josh_allen@dpsk12.org2007/05/10WYSIWYG
1169HOW TO : Make an Export of addedValues Data in Tab, CSV and XML formatsben@dp.co.nz2006/09/17Exports
1002Different date formats in multilanguage sitescat@catconsulting.ch2006/06/18Different date formats in multilanguage sites
469Fluffing your catmo@zzzzzzz.com2005/04/26Grooming
468What to feed your catmo@zzzzzzz.com2005/04/26Diet
467Shedding on the rugmo@zzzzzzz.com2005/04/26Grooming
466Getting rid of fleasmo@zzzzzzz.com2005/04/26Pest Control
465How to Frisk a Catmo@zzzzzzz.com2005/04/26Thievery

Now we can ask the computer questions like, "Show me all the stories related to grooming posted after April 25th." This is easy for the computer. All it does is check each record to see if the Topic entry is "Grooming", right? Well no, 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 addedValues Plugin can make an index of each column you define, although you have to ask it to do so. 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 467 and 469. We're done.

But wait! We also asked the computer only for records after April 25th. So the computer can now filter the results by checking them one by one. Since addedValues can be told to build an index for the When column also, it can use its index for that and that's a fast operation too.

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.

To satisfy that need, it's allowed to define a column (or addedValues variable) which has multiple values. They are stored in Frontier as a table inside the message table; but the important detail is really how these values appear in the index. They appear individually, so we can still look up one topic at a time very quickly.

You delimit the list using commas.

Can you begin to sense the power of addedValues? 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. In addedValues we call that a query and we write it like this

name of attribute = value of attribute

The query is entered into a dictionary of queries and named, and we can call it up with a macro. The answers are formatted by another addedValues entity called a report, in this case a search report.

{addedValueMacros.query(query name, report name)}

This is a tad more complicated than how things were done in the Metadata plugin, but the tradeoff is greater flexibility in formatting the answer. And to keep things simple, the minimum needed to create new report is to name it and identify it as a search report for messages, all the rest can be tweaked at yoru convenience.

Let's get that list of Grooming articles:

{addedValueMacros.query("someCatTopics","someCatTopics")}

Results:

*Shedding on the rug
*Fluffing your cat

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 Manila values, Title and Text. Additional addedValue values show up below this. Here's a screenshot of creating a message that has a column called topic:

Screenshot:

New Message with Cat Topic:

The additional values gets posted right along with the traditional Title and Text you've been entering. The values of a message are soemtimes called metadata or metainformation, and of the interestign things you can do with metainformation is make it available inside HTML META tags in the HEAD section of your document. If that's all you want the addedValues Plugin to do, it will accomplish that task without fuss.