abbr-design-pattern

(Difference between revisions)

Jump to: navigation, search
(Added examples, rules for use, added discussion information)
Line 46: Line 46:
</ol>
</ol>
-
Use #1 is encouraged if there's a reasonable need for it. Use #2 is discouraged under the Don't Repeat Yourself principle (''we need a link here''), as: "#2 is a case of *more* information being invisibly present, namely, the
+
Use #1 is encouraged if there's a reasonable need for it. Use #2 is discouraged under the [http://c2.com/cgi-bin/wiki?DontRepeatYourself Don't Repeat Yourself principle], as: "#2 is a case of *more* information being invisibly present, namely, the
last name in this case. If someone is not willing to make some information visible, then we
last name in this case. If someone is not willing to make some information visible, then we
shouldn't be encouraging them to store that information invisibly, for all
shouldn't be encouraging them to store that information invisibly, for all

Revision as of 21:49, 13 October 2005

Contents

Abbr design pattern

Purpose

How to use it

Example

The datetime-design-pattern formally encodes (the notoriously unparsable) datetimes into an abbr element.

Before:

The party is at 10 o'clock on the 10th.

After:

The party is at 
<abbr class="dtstart" title="20051010T10:10:10-0100">10 o'clock on the 10th</abbr>.

Discussion

This discussion is culled from here. Consider two possible uses for the abbr-design-pattern:

  1. using ABBR to encode machine readable data around human readable data
    <abbr class="dtstart" title="20051010T10:10:10-0100">10 o'clock on the 10th</abbr>
    
  2. using ABBR to encode more formal human data around something less formal
    <abbr class="author" title="Danny Ayers">Danny</abbr> 
    

Use #1 is encouraged if there's a reasonable need for it. Use #2 is discouraged under the Don't Repeat Yourself principle, as: "#2 is a case of *more* information being invisibly present, namely, the last name in this case. If someone is not willing to make some information visible, then we shouldn't be encouraging them to store that information invisibly, for all the same reasons that invisible metadata is bad/futile in the first place."

I'd like to delete this below, as the points are covered above

See Also

abbr-design-pattern was last modified: Wednesday, December 31st, 1969

Views