namespaces-considered-harmful: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
mNo edit summary
(added rhetorical question from hsivonen on #whatwg about how many hours he has wasted looking up namespace URIs)
Line 1: Line 1:
<h1> namespaces considered harmful </h1>
<h1> namespaces considered harmful </h1>
 
{{TOC-right}}
(This article is a stub, feel free to expand upon it)


In particular namespaces for '''content''' are considered harmful (e.g. XML namespaces, QNames in attributes etc.).  Namespaces for code is outside the bounds of the topic of this page.
In particular namespaces for '''content''' are considered harmful (e.g. XML namespaces, QNames in attributes etc.).  Namespaces for code is outside the bounds of the topic of this page.


Author/Editor: [http://tantek.com/ Tantek Çelik]
Author/Editor: [http://tantek.com/ Tantek Çelik]
__TOC__


== namespaced content has failed ==
== namespaced content has failed ==
Namespaced content on the Web has failed.
Namespaced content on the Web has failed.


Line 21: Line 16:


=== namespaced content is not well supported ===
=== namespaced content is not well supported ===
Namespaces are actually *not* well supported in sufficient modern browsers, nor even sufficiently with enough W3C technologies or test suites as compared to [[semantic-xhtml|(X)HTML]] + [[semantic-class-names]] + CSS.
Namespaces are actually *not* well supported in sufficient modern browsers, nor even sufficiently with enough W3C technologies or test suites as compared to [[semantic-xhtml|(X)HTML]] + [[semantic-class-names]] + CSS.


=== articles documenting the failure of namespaced content ===
=== articles documenting the failure of namespaced content ===
The mixed namespace approach has already been tried by *numerous* others since 1998 and has failed on the Web.
The mixed namespace approach has already been tried by *numerous* others since 1998 and has failed on the Web.
* [http://blog.davidjanes.com/:entry:davidjanes-2005-10-04-0000/ XML - what is it good for? by David Janes]
* [http://blog.davidjanes.com/:entry:davidjanes-2005-10-04-0000/ XML - what is it good for? by David Janes]
Line 32: Line 25:


== namespaces for content are a negative ==
== namespaces for content are a negative ==
Namespaces are actually a *huge* negative.  Search for:
Namespaces are actually a *huge* negative.  Search for:
* [http://www.google.com/search?q=namespaces%20Tower%20of%20Babel namespaces Tower of Babel]
* [http://www.google.com/search?q=namespaces%20Tower%20of%20Babel namespaces Tower of Babel]
Line 38: Line 30:


=== namespaced content discourages interoperability of data ===
=== namespaced content discourages interoperability of data ===
Namespaces encourage people to seclude themselves in their own namespace and invent their own schema rather than reusing existing elements in existing formats.  This hurts interoperability because a dozen different namespaces can all have their own slightly different semantics for the same element.  See [http://esw.w3.org/topic/BuildOrBuyTerms BuildOrBuy] for support for this argument, specifically  
Namespaces encourage people to seclude themselves in their own namespace and invent their own schema rather than reusing existing elements in existing formats.  This hurts interoperability because a dozen different namespaces can all have their own slightly different semantics for the same element.  See [http://esw.w3.org/topic/BuildOrBuyTerms BuildOrBuy] for support for this argument, specifically  
<blockquote>Use somebody elses rather than making aliases on purpose. It's one thing to make your own and then discover that there's something equivalent out there. It's quite another to willfully clutter the semantic web with aliases; the latter increases the burden on the community of consuming your data, so it's anti-social.</blockquote>
<blockquote>Use somebody elses rather than making aliases on purpose. It's one thing to make your own and then discover that there's something equivalent out there. It's quite another to willfully clutter the semantic web with aliases; the latter increases the burden on the community of consuming your data, so it's anti-social.</blockquote>


If you start thinking about the web in terms of OOP and polymorphism, namespaces break the polymorphic model that allows you handle widely varied data structures using the same methods.
If you start thinking about the web in terms of OOP and polymorphism, namespaces break the polymorphic model that allows you handle widely varied data structures using the same methods.
=== using namespaces cost a lot of time ===
From the #whatwg IRC channel on irc.freenode.net [http://krijnhoetmer.nl/irc-logs/whatwg/20071025#l-148 on 2007-10-25]: <blockquote><p># [15:43] &lt;<cite>hsivonen</cite>&gt; I wonder how many hours in my life has been wasted looking up namespace URIs for copying and pasting</p></blockquote>


=== non-namespaced techniques have been succeeding ===
=== non-namespaced techniques have been succeeding ===
 
On the other hand, XHTML + [[semantic-class-names]] (aka [[POSH]]) has seen widespread adoption among the web authoring/design/IA/publishing community.  Microformats is leveraging the approach that is both working better and frankly dominating in practice on the Web.
On the other hand, XHTML + [[semantic-class-names]] has seen widespread adoption among the web authoring/design/IA/publishing community.  Microformats is leveraging the approach that is both working better and frankly dominating in practice on the Web.


== See Also ==
== See Also ==
* [[plain-old-xml-considered-harmful]]
* [[plain-old-xml-considered-harmful]]
* [[microformats-easier-than-xml]]
* [[microformats-easier-than-xml]]

Revision as of 19:32, 25 October 2007

namespaces considered harmful

In particular namespaces for content are considered harmful (e.g. XML namespaces, QNames in attributes etc.). Namespaces for code is outside the bounds of the topic of this page.

Author/Editor: Tantek Çelik

namespaced content has failed

Namespaced content on the Web has failed.

It's been tried by numerous groups, before microformats, and after. It's even been tried in the context of RSS and RDF, and in practice people write scrapers that look for namespace prefixes as if they are part of the element name, not as mere shorthands for namespace URIs.

If you want to carry on a theoretical discussion of namespaces, please do so elsewhere, for in practice, discussing them is a waste of time, and off-topic for microformats lists.

namespaced content is not well supported

Namespaces are actually *not* well supported in sufficient modern browsers, nor even sufficiently with enough W3C technologies or test suites as compared to (X)HTML + semantic-class-names + CSS.

articles documenting the failure of namespaced content

The mixed namespace approach has already been tried by *numerous* others since 1998 and has failed on the Web.

namespaces for content are a negative

Namespaces are actually a *huge* negative. Search for:

namespaced content discourages interoperability of data

Namespaces encourage people to seclude themselves in their own namespace and invent their own schema rather than reusing existing elements in existing formats. This hurts interoperability because a dozen different namespaces can all have their own slightly different semantics for the same element. See BuildOrBuy for support for this argument, specifically

Use somebody elses rather than making aliases on purpose. It's one thing to make your own and then discover that there's something equivalent out there. It's quite another to willfully clutter the semantic web with aliases; the latter increases the burden on the community of consuming your data, so it's anti-social.

If you start thinking about the web in terms of OOP and polymorphism, namespaces break the polymorphic model that allows you handle widely varied data structures using the same methods.

using namespaces cost a lot of time

From the #whatwg IRC channel on irc.freenode.net on 2007-10-25:

# [15:43] <hsivonen> I wonder how many hours in my life has been wasted looking up namespace URIs for copying and pasting

non-namespaced techniques have been succeeding

On the other hand, XHTML + semantic-class-names (aka POSH) has seen widespread adoption among the web authoring/design/IA/publishing community. Microformats is leveraging the approach that is both working better and frankly dominating in practice on the Web.

See Also