Advocacy
Dojo (HowTo)
Reference
Markets
Museum
News
Other
|
Meta- (prefix) means: altered, changed, derivative, more comprehensive, above and beyond -- and so on. What am I talking about?Metatags are a very simple concept -- they are just custom comment tags in HTML, that you use to extend HTML.
In HTML anything put inside of <!-- HERE --> is a comment. That means that browsers will not display the tag, and it will basically be ignored. "So what is the big deal?", you say. Well, just because browsers ignore them does not mean that you should. HTML formatting (tags) are not always clean and clear. It would have been great if HTML Documents were two separate streams or files -- one for the text (body), and a file bound to that which had all the formatting for that text. Think of the possibilities -- you could change the style without effecting the content, the text (content) would be readable by lay-people, and so on. This concept has been done in computers for many other things (the Mac does something like this with its data / resource fork, and so on), and is so versatile and clean that it couldn't possibly be used (that would mean that someone was thinking ahead). This is basically what WC3 is trying to do NOW with CSS (Cascading Style Sheets), a decade late -- but CSS doesn't work with all browsers (and won't for years), and isn't exactly fully implemented. So all of us webmasters are still left with the problems today. What we have is formatting and text information in the same stream (file) that looks something like this;
And so on.... If the formatting is messed up in one part of the stream, it generally screws everything up for quite some time (or until the end of the document). Bleck. Well enough ranting. The point is that we webmasters want to separate the formatting from the content -- so that we can globally alter the formatting for our entire site. Well with metatags, we can do the next best thing. Imagine this;
What does that give us? Search and Replace (RangeTags)There are many search and replace tools that can replace from the end of one item, until the start of another item. So if I have created all my pages to have metatags, I can tell them to replace everything between <!-- start Metatag1 --> and <!-- end Metatag1 -->. Or in other words, I can completely replace that formatting, without effecting the body text. The metatags would give me (the webmaster) a way to separate the streams -- the body from the formatting. Now on a page by page basis that is cool -- but there are many tools that can also replace things in a series of Documents as well. So they can do replacement not just on a single page, but on your whole site at once. BBedit can do a GREP search on a directory (web site, or part of one), using a search string like -- <!-- start Metatag1 -->[^*]+<!-- end Metatag1 --> Some tools are even scriptable. So not only can you replace one part of the format at a time, but you can have the script replace multiple things on each pass, or make multiple passes. Meaning that with the press of one button (after writing a script), you can have your whole site updated -- all because you used Metatags. What does all this do for you? Well, the first time you decide to change your format, and you have metatags in place, and you don't have to manually cut and paste your format into 50, 100 or 500 documents, you will be a metatag convert for life. They are a godsend! To quote Mr. Popiel, "Now how much would you pay? But wait, there's more". TemplateTagsIf you look at <!-- Metatag2 -->, there was nothing around it. It didn't have any formatting - why? Well, what if you created an AppleScript to do a simple search and replace (automatically). The script could open a source file, replace "<!-- Metatag2 -->" with the formatting information you want (say the contents of another file), and save in a destination directory. Viola. You have added formatting information to a file that didn't previously have any. As a webmaster, you could give a file to you writers that is very a simple template like:
Writers would just add the information between the tags that you want. Easy for people who are not HTML savvy to do (something that even most writers can figure out). Then you "compile" the file (run it through your script), and presto -- it now has your format. If you change your format, you just recompile this article -- and presto again, you have a newly reformatted version of your file. A simple AppleScript to do some of this (using BBedit) might be: ConclusionSo there are quite a few things you can do with metatags. I created a few scripts to do both types of functionality -- and both saved me a lot of time over doing it manually. Sites start small (and maintainable) -- but they grow quickly. It is a good idea to start using these metatags early in your process. Define the ones that make sense for your application. The trick is to be religious about it! Use them in EVERY file (or you'll regret it later). In general, if you create a form with metatags (and have tools to replace the metatags with a format), or if you have metatags around your major format groups, then you will be able to alter your formatting in the future, far easier than if you don't use metatags. There is still a learn curve, and it causes a little more work early on. But learning the intricacies of a search and replace tool, or some scripting, is often far easier than fixing dozens or hundreds of files. Most of the techniques discussed are used in Frontier (either automatically, or through your own additions) -- which is why many webmasters consider it such a great product. However, I am pretty harsh on bad interface, proprietary technology and large learning curves (Frontier has all of those) -- and more importantly, I am trying to teach how it is done, so that people understand the concepts. Knowing this, you should be able to understand and use Frontier (if you choose).
Books on GREP (Regular Expressions)
|