<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://microformats.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=LilaoRoloa</id>
	<title>Microformats Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://microformats.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=LilaoRoloa"/>
	<link rel="alternate" type="text/html" href="https://microformats.org/wiki/Special:Contributions/LilaoRoloa"/>
	<updated>2026-04-17T09:53:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://microformats.org/wiki/index.php?title=naming-principles&amp;diff=37449</id>
		<title>naming-principles</title>
		<link rel="alternate" type="text/html" href="https://microformats.org/wiki/index.php?title=naming-principles&amp;diff=37449"/>
		<updated>2009-01-08T02:31:18Z</updated>

		<summary type="html">&lt;p&gt;LilaoRoloa: c4tdelmo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;boeltvar&lt;br /&gt;
&amp;lt;h1&amp;gt;Naming Principles&amp;lt;/h1&amp;gt;&lt;br /&gt;
{{TOC-right}}&lt;br /&gt;
One of the key [[microformats]] [[principles]] is re-use, and in particular, re-use of names of objects, properties, and values from existing formats and standards when possible.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;span id=&amp;quot;Author&amp;quot;&amp;gt;Author&amp;lt;/span&amp;gt;&lt;br /&gt;
:[[User:Tantek|Tantek Ãelik]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
One of the key [[microformats]] principles is re-use, and in particular, re-use of names of objects, properties, and values from existing formats and standards when possible. -Tantek&lt;br /&gt;
&lt;br /&gt;
I explicitly created this principle in response to the anti-patterns that I saw in many (most?) existing standards efforts such as:&lt;br /&gt;
&lt;br /&gt;
* Making up names from thin air&lt;br /&gt;
* Ignoring all earlier work&lt;br /&gt;
* Actual hostility towards using names/terms from other standards&lt;br /&gt;
* Using others' names to mean different things&lt;br /&gt;
* Using new names to mean the same thing&lt;br /&gt;
* Endlessly debating and &amp;quot;name-smithing&amp;quot; in order to come up with a slightly more perfect name&lt;br /&gt;
&lt;br /&gt;
=== human nature ===&lt;br /&gt;
Perhaps it is human nature to want to create new names, or name new things.  Certainly there is some amount of ego involved in the creation of a new thing which you can then claim to have invented or named.  Some of these tendencies are also a form of &amp;quot;Not Invented Here&amp;quot; (NIH) syndrome which unfortunately is quite common among software engineers.&lt;br /&gt;
&lt;br /&gt;
=== novelty hurts interoperability ===&lt;br /&gt;
Unfortunately such desire for novelty is bad for standards, and certainly bad for interoperability, which depends on being able to depend on the same name meaning the same thing.  It's also bad for language and communication among humans.  Even though humans can deal with some ambiguity and overloading of terms (using context to disambiguate), it's easier for humans as well when there is less ambiguity and less overloading.&lt;br /&gt;
&lt;br /&gt;
=== documenting principles helps ===&lt;br /&gt;
We're not going to be able to fully eliminate such &amp;quot;Tower of Babel&amp;quot; tendencies, but at least we can minimize them, especially when they are bad for standards and interoperability.&lt;br /&gt;
&lt;br /&gt;
With the experience of developing new microformats such as [[xfolk|xFolk]], [[hreview|hReview]], and [[hatom|hAtom]], it has become quite clear that we need to explicitly document some of the specific design principles that went into naming the objects and properties of some of the early established microformats like [[hcard|hCard]] and [[hcalendar|hCalendar]], and that's the purpose of this document.&lt;br /&gt;
&lt;br /&gt;
== Naming Principles ==&lt;br /&gt;
=== Semantic XHTML Design Principles ===&lt;br /&gt;
&lt;br /&gt;
First, it is important to note the naming principles which have been defined and explicitly referenced in (most of) the above-mentioned microformats.&lt;br /&gt;
&lt;br /&gt;
{{semantic-xhtml-design-principles}}&lt;br /&gt;
&lt;br /&gt;
=== Some Details ===&lt;br /&gt;
&lt;br /&gt;
* '''hyphen-separated-lowercase-words'''. [http://w3.org/ W3C] [http://w3.org/Style/CSS/ CSS] (cascading style sheets) introduced the convention of lowercasing all property/value names (identifiers) and separating words with hyphen&amp;quot;-&amp;quot; characters for reasons of better human readability as compared to other approaches like CamelCase (or even camelCase).  Microformats property names strictly adopt this approach as well.&lt;br /&gt;
&lt;br /&gt;
=== Unique Root Class Names ===&lt;br /&gt;
&lt;br /&gt;
I've also written a bit about the design principles that went into the *root* class names (which require a bit different treatment than property class names) in the microformats, but this is described in the hcard-parsing page currently:&lt;br /&gt;
&lt;br /&gt;
http://microformats.org/wiki/hcard-parsing#root_class_name&lt;br /&gt;
&lt;br /&gt;
Need to copy some of that text here and make it not-hCard specific.&lt;br /&gt;
&lt;br /&gt;
=== Minimal Vocabulary ===&lt;br /&gt;
&lt;br /&gt;
This is one of two additional key principles that I think I need to outline in more detail.  The [[principle]] of &amp;quot;[[minimal vocabulary]]&amp;quot; is actually directly derived from the principle of [[solve-simpler-problems-first|start as simple as possible]].&lt;br /&gt;
&lt;br /&gt;
* minimal vocabulary.  We try to introduce as few new microformat terms as possible.&lt;br /&gt;
&lt;br /&gt;
=== Reuse ===&lt;br /&gt;
&lt;br /&gt;
Reuse microformats first, other standards second.&lt;br /&gt;
&lt;br /&gt;
This is actually outlined quite clearly in the [[principles|microformats principles]], but deserves both explicit repeating here with &amp;lt;strong&amp;gt;strong emphasis&amp;lt;/strong&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* reuse building blocks from widely adopted standards&lt;br /&gt;
** semantic (http://tantek.com/presentations/20040928sdforumws/semantic-xhtml.html), meaningful (X)HTML (http://tantek.com/presentations/2005/03/elementsofxhtml). See SemanticXHTMLDesignPrinciples for more details.&lt;br /&gt;
** &amp;lt;strong&amp;gt;existing microformats&amp;lt;/strong&amp;gt;&lt;br /&gt;
** &amp;lt;strong&amp;gt;well established schemas from interoperable RFCs&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The key here is that this principle is not only about reusing whole microformats (e.g. don't invent a new person property for your microformat, just reuse [[hcard|hCard]]), but also about where to get names for properties.&lt;br /&gt;
&lt;br /&gt;
In particular, if you find that your new microformat has a property which means the same thing as an exsiting microformat, you SHOULD (maybe I should make this a MUST) reuse the class name from that existing microformat.  This practice also follows the principle of minimal vocabulary, and of re-using the same name to mean the same thing (instead of using two names to mean the same thing).&lt;br /&gt;
&lt;br /&gt;
==== For Other Standards, Prefer Older to Newer ====&lt;br /&gt;
&lt;br /&gt;
If there is no microformat name for a property, and we are reusing names based upon research of existing formats, then often there is more than one format with more than one name for the particular concept.&lt;br /&gt;
&lt;br /&gt;
Often times new standards are developed which (most often) needlessly rename names from older standards.  Thus to repair such naming drift, all other things being equal (e.g. both standards have been widely interoperably implemented), we prefer the older name over the newer name.&lt;br /&gt;
&lt;br /&gt;
== Examples of Following the Naming Principles ==&lt;br /&gt;
&lt;br /&gt;
We've followed these naming principles from the start, and made changes to microformats in development as a result.  For example, [[xfolk|xFolk]] was changed from v0.4 to v1RC.  xFolk dropped the new class name &amp;quot;extended&amp;quot; in preference for re-using the existing &amp;quot;description&amp;quot; class name.  See [http://microformats.org/wiki/xfolk#Changes_since_xFolk_0.4 Changes since xFolk 0.4] for details.&lt;br /&gt;
&lt;br /&gt;
== Naming Patterns Under Consideration as Principles ==&lt;br /&gt;
&lt;br /&gt;
A few patterns have arisen in the naming of class names for microformats, and while these patterns are not conventions (yet), it may be worth considering them.&lt;br /&gt;
&lt;br /&gt;
=== dt properties ===&lt;br /&gt;
&lt;br /&gt;
So far, all datetime class names start with &amp;quot;dt&amp;quot;, and all class names that start with &amp;quot;dt&amp;quot; are ISO8601 datetime properties.  E.g.&lt;br /&gt;
&lt;br /&gt;
* dtend - [[hcalendar|hCalendar]]&lt;br /&gt;
* dtstart - [[hcalendar|hCalendar]]&lt;br /&gt;
* dtreviewed - [[hreview|hReview]]&lt;br /&gt;
&lt;br /&gt;
Note that &amp;quot;dt&amp;quot; is also [[rest/datatypes#Proposal|under consideration for type XOXO]].&lt;br /&gt;
&lt;br /&gt;
Undefined: dtstamp - [[hcalendar|hCalendar]]&lt;br /&gt;
&lt;br /&gt;
==== exceptions to dt prefix ====&lt;br /&gt;
However, some proposed/underdevelopment microformats currently have class names for datetime properties without the &amp;quot;dt&amp;quot; prefix:&lt;br /&gt;
&lt;br /&gt;
Draft:&lt;br /&gt;
* rev - [[hcard|hCard]]&lt;br /&gt;
* bday - [[hcard|hCard]]&lt;br /&gt;
&lt;br /&gt;
Proposed:&lt;br /&gt;
* updated - [[hatom|hAtom]]&lt;br /&gt;
* published - [[hatom|hAtom]]&lt;br /&gt;
* not yet named (date of authority) - [[species|Species]]&lt;br /&gt;
&lt;br /&gt;
=== h word ===&lt;br /&gt;
So far, all uses of a single &amp;quot;h&amp;quot; prefix in a property name apply to (potential) root elements.   But not all (potential) root elements start with &amp;quot;h&amp;quot; (which is ok).&lt;br /&gt;
&lt;br /&gt;
E.g.:&lt;br /&gt;
&lt;br /&gt;
* [[hatom]]&lt;br /&gt;
* hentry - [[hatom|hAtom]]&lt;br /&gt;
* [[hreview]]&lt;br /&gt;
* [[hlisting-proposal|hlisting]] (proposed)&lt;br /&gt;
&lt;br /&gt;
Should we enforce the rule that only (potential) root elements may begin with an &amp;quot;h&amp;quot; prefix?&lt;br /&gt;
&lt;br /&gt;
Non-h-prefixed root elements:&lt;br /&gt;
* vcard - [[hcard|hCard]]&lt;br /&gt;
* vcalendar - [[hcalendar|hCalendar]]&lt;br /&gt;
* vevent - [[hcalendar|hCalendar]]&lt;br /&gt;
* [[xfolk]]&lt;br /&gt;
&lt;br /&gt;
== Anti-Patterns ==&lt;br /&gt;
Here are things ''not'' to do when creating names&lt;br /&gt;
&lt;br /&gt;
=== Namespaces ===&lt;br /&gt;
Avoid namespaces (i.e. class names of ''microformat''-''key'']); read [[namespaces-considered-harmful]]. [[hatom|hAtom]] uses a limited amount of namespacing to [[hatom-faq#Why_does_hAtom_use_class_name_namespaces|exactly reuse a particular semantic]] from the Atom spec.&lt;br /&gt;
&lt;br /&gt;
==Issues==&lt;br /&gt;
* Shouldn't '''brevity''' be a consideration? Not to the point of loosing meanings ('''class=&amp;quot;b&amp;quot;''')  but to prevent needless verbosity ('''class=&amp;quot;thing-that-we-have-no-short-name-for&amp;quot;'''). More prgmatically, abreviations should be meaningful and appropriate (e.g. '''var''' for '''variety''' as used in botanical naming) - Andy Mabbett&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[existing-classes]] for class names already in use&lt;br /&gt;
* [[class-design-pattern]] to see how class names are used in microformats&lt;br /&gt;
* [[semantic-xhtml-design-principles]]&lt;br /&gt;
* [[naming-conventions]] for microformats.org wiki pages&lt;/div&gt;</summary>
		<author><name>LilaoRoloa</name></author>
	</entry>
</feed>