
About HTML semantics and front-end architecture - thisisblurry
http://nicolasgallagher.com/about-html-semantics-front-end-architecture/
======
jerf
Whatever the opposite of "I stopped reading when they said X" is, I did that
when Nicolas drew a distinction between local and global semantics. Anyone who
talks semantics without understanding that they require contexts to have any
meaning at all is someone not worth listening to, and man oh man is the
"semantic web" full of people ready and indeed _anxious_ to make that
fundamental mistake.

In the interests of counterbalancing the tendency to have nothing but
criticism up in comments, let me just say: This is great stuff.

~~~
irickt
The topic here is completely unrelated to the semantic web, except in a
tangential mention (the "etc"): "We can leverage the agreed “global” semantics
of HTML elements, certain HTML attributes, Microdata, etc."

Your caricature of semantic web "people" is misplaced. Local specialized
semantics is fully a part of the design. _No one_ believes there is a single
master schema.

~~~
batista
I don't think parent meant the semantic web as in the Tim Berner's Lee version
of it, he just refers those "semantic" html advocates (hence the quotes).

As for the semantic web in the TBL meaning, it is not worthy of caricature,
anyway, considered the utter failure of RDF and XQuery outside of tiny niches,
not to mention the flawed premises under it all.

~~~
irickt
Tiny niches? All the data tables in Wikipedia; Apple acquires Siri; Google
acquires Freebase; the Google and Bing search indexes, .... This story is not
over.

Bitter, absolute statements like that are regurgitations of a myth. (And maybe
you mean SPARQL not XQuery.)

~~~
jerf
"This story is not over."

Which is to say, the Semantic Web didn't happen as promised, and it didn't
happen in exactly the way you would guess based on my message, which is that
where you had something that could create a local context it could happen in
pieces, but no global whole has emerged, nor is there any particular evidence
one is emerging.

[http://reprog.wordpress.com/2010/09/02/bibliographic-data-
pa...](http://reprog.wordpress.com/2010/09/02/bibliographic-data-part-1-marc-
and-its-vile-progeny-2/) \- read parts 2 and 3 as well. It may not seem
directly related at first, but you should soon figure out why I consider this
three-part blog series to be the thing that proves global semantic contexts
are a hopeless pipe dream. (And remember that entire bit is about _librarians_
; if they are that hopeless nobody else has a chance.)

------
Jare
Sound advice, I found myself nodding at the various bits in the article, and
recognize that over time I have gravitated towards similar patterns even in my
limited amount of frontend work. The underlying idea is that CSS classes
should be treated as rigorously as any other kind of identifier in a
programming language: naming structure, precision in usage and clarity of
scope are important.

------
ehutch79
So, this is the 'best practice' for the week then?

