SlideShare a Scribd company logo
Naming stuff isn’t
that hard
(if you cheat)
– Phil Karlton
“There are only two hard problems in computer
science: cache invalidation and naming things.”
Naming stuff is really important
Naming stuff is really important
Our CSS should be
• Readable
• Maintainable
• Scalable
Can’t someone else do it?
Yes they can
Naming things isn't that hard
✻
✻ Obligatory Star Wars reference
It’s all just semantics
Microdata
RDFa Lite
Microformats
It’s all just semantics
Microdata
RDFa Lite
Microformats
= metadata
Microdata
RDFa Lite
Microformats
Microformats
http://microformats.org
http://microformats.org/wiki/h-card
http://microformats.org/wiki/h-adr
Naming things isn't that hard
RDFa Lite
Microdata
RDFa Lite
http://rdfa.info
http://www.w3.org/TR/rdfa-lite/
RDFa Lite
RDFa Lite
RDFa Lite
Microdata
http://www.w3.org/TR/microdata/
Microdata
• http://www.lexus.com/mod
els/RX
http://www.lexus.com/models/RX
Microdata
https://chrome.google.com/webstore/detail/openlink-structured-data/
https://addons.mozilla.org/en-US/firefox/addon/openlink-structured-data-sniff/
RDFa Lite
Microdata
Naming things isn't that hard
Naming things isn't that hard
Name all the things
http://schema.org/Thing
So where’s the CSS?
So where’s the CSS?
So where’s the CSS?
So where’s the CSS?
So where’s the CSS?
Naming systems are good
Naming systems make our CSS
• Readable
• Maintainable
• Scalable

More Related Content

PDF
An Introduction to Linked Data and Microdata
PDF
2010 06 rdf_next
PPTX
Aileen O'Carroll - DRI Training UCC: Introduction to Metadata
PPTX
Introduction to RDF Data Model
PDF
Yahoo7 Semantic Web Presentation
PDF
Linked (Open) Data: A quick introduction
PPTX
DLF 2015 Presentation, "RDF in the Real World."
PDF
Linked open data for cultural heritage
An Introduction to Linked Data and Microdata
2010 06 rdf_next
Aileen O'Carroll - DRI Training UCC: Introduction to Metadata
Introduction to RDF Data Model
Yahoo7 Semantic Web Presentation
Linked (Open) Data: A quick introduction
DLF 2015 Presentation, "RDF in the Real World."
Linked open data for cultural heritage

What's hot (19)

PPTX
RDA: Alive and Well and Still Speaking MARC
PPTX
Fedora Migration Considerations
PPTX
Vocabulary Development for Local Use: A DIY Introduction
PDF
4. pentz orcid outreach_20121016
PPTX
NISO Webinar: Authority Control: Are You Who We Say You Are?
PDF
Portland Common Data Model (PCDM): Creating and Sharing Complex Digital Objects
PPTX
Publishing and Using Linked Open Data - Day 2
PPT
Ontology Web services for Semantic Applications
PDF
PPTX
Shrinking the silo boundary: data and schema in the Semantic Web
PDF
2013 CrossRef Annual Meeting Flash Update CrossRef Metadata Search Karl Ward
PDF
Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...
PPTX
Integrating with others: Stable VIVO URIs for local authority records; linkin...
PDF
Ontology, Semantic Web and DBpedia
PPT
Unlocking Doors: recent initiatives in open and linked data at the National L...
PDF
The Semantic Web and Drupal 7 - Loja 2013
PDF
Karma is a tool! Managing your Data
PPTX
Multilingual issues in the representation of international bibliographic stan...
PPTX
RDA: Alive and Well and Still Speaking MARC
Fedora Migration Considerations
Vocabulary Development for Local Use: A DIY Introduction
4. pentz orcid outreach_20121016
NISO Webinar: Authority Control: Are You Who We Say You Are?
Portland Common Data Model (PCDM): Creating and Sharing Complex Digital Objects
Publishing and Using Linked Open Data - Day 2
Ontology Web services for Semantic Applications
Shrinking the silo boundary: data and schema in the Semantic Web
2013 CrossRef Annual Meeting Flash Update CrossRef Metadata Search Karl Ward
Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...
Integrating with others: Stable VIVO URIs for local authority records; linkin...
Ontology, Semantic Web and DBpedia
Unlocking Doors: recent initiatives in open and linked data at the National L...
The Semantic Web and Drupal 7 - Loja 2013
Karma is a tool! Managing your Data
Multilingual issues in the representation of international bibliographic stan...
Ad

Similar to Naming things isn't that hard (7)

KEY
Darwin web standards
PDF
Microformats I: What & Why
PPTX
PDF
The Naming Of Things
PPTX
Microdata semantic-extend
PDF
X-TREME THEMES
PPT
Pimp your content with structured data
Darwin web standards
Microformats I: What & Why
The Naming Of Things
Microdata semantic-extend
X-TREME THEMES
Pimp your content with structured data
Ad

Recently uploaded (20)

PPTX
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx
PPT
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
PPT
Ethics in Information System - Management Information System
PDF
BIOCHEM CH2 OVERVIEW OF MICROBIOLOGY.pdf
PPT
250152213-Excitation-SystemWERRT (1).ppt
PPTX
module 1-Part 1.pptxdddddddddddddddddddddddddddddddddddd
PPTX
The-Importance-of-School-Sanitation.pptx
PPT
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
PPTX
artificialintelligenceai1-copy-210604123353.pptx
PDF
Alethe Consulting Corporate Profile and Solution Aproach
PDF
Containerization lab dddddddddddddddmanual.pdf
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PDF
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
PDF
Understand the Gitlab_presentation_task.pdf
PDF
Alethe Consulting Corporate Profile and Solution Aproach
PPTX
Internet Safety for Seniors presentation
PPTX
newyork.pptxirantrafgshenepalchinachinane
PPTX
E -tech empowerment technologies PowerPoint
PPTX
Cyber Hygine IN organizations in MSME or
PPTX
Slides PPTX: World Game (s): Eco Economic Epochs.pptx
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
Ethics in Information System - Management Information System
BIOCHEM CH2 OVERVIEW OF MICROBIOLOGY.pdf
250152213-Excitation-SystemWERRT (1).ppt
module 1-Part 1.pptxdddddddddddddddddddddddddddddddddddd
The-Importance-of-School-Sanitation.pptx
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
artificialintelligenceai1-copy-210604123353.pptx
Alethe Consulting Corporate Profile and Solution Aproach
Containerization lab dddddddddddddddmanual.pdf
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
Understand the Gitlab_presentation_task.pdf
Alethe Consulting Corporate Profile and Solution Aproach
Internet Safety for Seniors presentation
newyork.pptxirantrafgshenepalchinachinane
E -tech empowerment technologies PowerPoint
Cyber Hygine IN organizations in MSME or
Slides PPTX: World Game (s): Eco Economic Epochs.pptx

Naming things isn't that hard

Editor's Notes

  • #3: Phil Karlton, formerly at Netscape, once said “There are only two hard problems in computer science: cache invalidation and naming things.”
  • #4: In CSS, as in computer science, naming stuff can be really hard. Even when you’re using frameworks like Bootstrap and Foundation or methodologies like OOCSS, SMACSS and BEM they may not provide names for your elements in your project.
  • #5: But naming stuff is really important when we’re writing code that’s easy to read and maintain and can scale to large sites, as we should be.
  • #6: Maybe you’ve given up. Maybe you’ve got to the point I have and just said “Can’t someone else do it?”.
  • #7: And the answer my friends is “Yes”. Yes, someone else can do it.
  • #8: In fact there are whole groups of people who have been doing all the hard work for us: coming up with names for everyday web objects and things so that we don’t have to think for ourselves.
  • #9: Which is awesome.
  • #10: By adding extra semantic markup using recognised standards like Microformats, RDFa Lite or Microdata, we can not only solve the problem of what to call things
  • #11: but add valuable metadata about our sites’ content which makes it more findable by search engines and more useful to other tools.
  • #13: Probably the simplest to understand is Microformats. Microformats uses a system of class names to add extra meaning to your elements.
  • #14: The classes are not just easy for us as developers to understand, but they are also understood by search engines and will be displayed in search results. For example I can mark up contact details using the h-card Microformat
  • #15: Or mark up an address using h-adr
  • #16: And I can embed the address as part of the contact details. There’s a whole system of classes for people, places, events, recipes, reviews and so on.
  • #17: While Microformats uses class names, RDFa and Microdata use their own HTML attributes. The parent element references a URL of the thing’s schema, in this case Person, and uses either the property or itemprop attribute for each item’s properties.
  • #18: So, using RDFa we can mark up
  • #19: contact details
  • #20: an address and, as with Microformats
  • #21: we can embed properties inside each other.
  • #22: Microdata was going to be part of the HTML5 spec but isn’t any more. Microdata seems to have been developed because people had forgotten there was such a thing as RDFa and then went “Oh yeah”. So now everyone is backing RDFa.
  • #23: But, I’ve left it in here because Microdata is still used in the wild,
  • #24: and it’s still recommended by Google and supported by the other search engine vendors.
  • #25: Now you’ll notice that both RDFa and Microdata both reference a site
  • #26: called schema.org
  • #27: This is where the magic happens because schema.org is an Aladdin’s cave of names for elements which describe things: people, places, events, recipes, reviews and so on. There are names for pretty much everything.
  • #28: Including Things. It’s not the only source of schemas. You can use Facebook’s Open Graph, Dublin Core, Friend of a Friend (FOAF) and many more. You can also write your own, but you probably don’t need to.
  • #29: But enough with the HTML semantic thing already! Where’s the CSS? Once all that groundwork is in place, the CSS is easy. Just select the element and style it, same as always. Use the Microformats classes …
  • #30: … Or use the attribute selectors for RDFa and
  • #31: Microdata
  • #32: Or, as on the Lexus site,
  • #33: … use a class as well as the attribute.
  • #34: So, by adding semantic markup we’ve made our site more useful and we have a ready-made naming system to help make our CSS easier to read, maintain and scale.