The Joel on Software Discussion Group (CLOSED)

A place to discuss Joel on Software. Now closed.

This community works best when people use their real names. Please register for a free account.

Other Groups:
Joel on Software
Business of Software
Design of Software (CLOSED)
.NET Questions (CLOSED)
TechInterview.org
CityDesk
FogBugz
Fog Creek Copilot


The Old Forum


Your hosts:
Albert D. Kallal
Li-Fan Chen
Stephen Jones

"Separate the content from the presentation"

You know, I keep reading this, and it never sounds quite right, and I suddenly realized why.

I never said she stole money.

That sentence means six different things. What it means depends on where the emphasis is.

*I* never said she stole money.
I *never* said she stole money.
I never *said* she stole money.
I never said *she* stole money.
I never said she *stole* money.
I never said she stole *money*.

Now I'm using asterisks here because we don't have control over style. In rich text I'd use italics.

Never do the right thing.

The problem with all of this is that very often the presentation IS CONTENT. <- note emphasis. Should be bold. See the non-sequitur above? It should be a topic heading, but I couldn't apply any kind of font to it to make it stand out.

When I'm writing a document, I use styles to organize my thoughts - I express myself in style *and* text. I think trying to separate the two would create work and possibly muddle the waters of my thinking.

I know there are LaTEX weavers who swear by their methodology. How long did it take to figure out how to make the thing work? I'm writing a document for a publisher - they sent me a document template and a style guide and in ten minutes I was typing away in Word. Using styles like I use inflection in everyday speech.

Yes, some presentation is purely decorative - the overarching style of a website does not really affect the content of the site. If Joel wants to change the headlines so they're hot pink instead of blue or whatever - doesn't affect what's in here.

But what if he offered rich text, then the next week changed all the italics to be bold, or cursive, or just removed the rich text formatting altogether? Does the content remain the same?
Philo Send private email
Thursday, February 23, 2006
 
 
*Dude*, you're blowing my mind.
Dude, *you're* blowing my mind.
Dude, you're *blowing* my mind.
Dude, you're blowing *my* mind.
Dude, you're blowing my *mind*.
Star Wars Kid Send private email
Thursday, February 23, 2006
 
 
You've got a point, but I think your example is bad.  For instance the <em> tag is perfectly valid HTML, for precisely the reason that you're citing.  Emphasis is a matter of content, not presentation.

The way that the emphasis is displayed (the presentation) is still an completely separate matter.  In fact, your post disproves your point - you're using asterisks to convey the emphasis, when you could use bold, or italics, or another font.  That sort of thing should be in a stylesheet.
Timothy Mark
Thursday, February 23, 2006
 
 
"Emphasis is a matter of content, not presentation. "

Bingo.
MarkTAW
Thursday, February 23, 2006
 
 
The presentation is a visual language that we process before we even read a single word.  You can squint your eyes at this page so you cant read any text, but you sure as heck can see the hierarchy.  So yes, the presentation is just as important as the actual words.  Fail at the presentation, and it is just one more barrier to your readers understanding you.
Cory R. King
Thursday, February 23, 2006
 
 
Try thinking in terms of "Separate the meaning from the presentation".

Consider a sentence as a gramatical structure with emphasis and other hidden information such as poetic structure. Put together it is just information.

A sentence means the same thing if it is read or heard, assuming we all thought the same way.

Changing the presentation layer from sound to paper does not change the information.

That said, it is often not possible to seperate the meaning from the presentation completely.

For example, you might change all <i> tags in a web site to a larger font and red forecolour implying that you really, really *never* stole the money. Here you are really adding extra information that belongs in the 'meaning' layer, but what a pain.

I <reallyreallyinsistantpleading>never<reallyreallyinsistantpleading> stole the money.

With highly visual stuff there is always sooo much information(ie meaning/content) there that it's impossible to seperate it out.
"A pictures worth a thousand words."
Kim
Thursday, February 23, 2006
 
 
"...some presentation is purely decorative ..."

Decoration is information/content as well. Just so subjective that it can't be captured as descrete bits of info, so not worth the bother.
Kim
Thursday, February 23, 2006
 
 
>The problem with all of this is that very often the presentation IS CONTENT

The problem with that is that you might be able to provide different alternative presentations of the content, (to privde the presentation of the same content in different ways)

Now you want at least *some* comonality with that, provided that you are still showing the same *thing*.
Michael Moser
Friday, February 24, 2006
 
 
Okay, so I thought that the "content" meant the information being stored in a program (often in a database) and the "presentation" meant how it is presented to the user.  From purely a programming standpoint, it is advisable to separate the two, otherwise you end up with people embedding SQL statements in Windows forms and I think we can all agree that doing so brings no emphasis to the meaning of the data stored in the database by said SQL statements. 

The presentation if often part of the content when creating something visual for humans to look at.  How you present things almost always conveys obscured information.  How you stand when you speak, the quality of the graphics on your website, the speed with which it loads, or the size of the fonts on your windows form all display inherent information about the content you are displaying.  Sometimes, though, the content is entirely that of the user, and you are just presenting it.  Then, you presentation is your content, as was stated above.
Joshua Volz Send private email
Friday, February 24, 2006
 
 
"Separate the content from the presentation" should be "Separate the content's presentation from the content's presentation's presentation".

Tags like <em> and <i> define the content's presentation. They are in fact content itself most of the time. Stylesheets define how the tags are exactly used, thus they define the presentation's presentation. When the content's presentation reduces to content, the original saying becomes valid again, you only have to know what is meant with "content" and "presentation".

BTW, in plain text as given here in the forum the saying is completely useless, because *we* can't redefine *the* presentation - we can't even separate it.
Secure
Friday, February 24, 2006
 
 
Hm... there is a REAL problem when the presentation's presentation becomes content, too... A sentence in red can give other signals than the same sentence in green.
Secure
Friday, February 24, 2006
 
 
I usually consider presentation as a form of medium instead
of styles or color etc. Are you going to present your content in a form of webpage? voice? or sms etc.
Brian Send private email
Friday, February 24, 2006
 
 
Your bad feeling is not due to the cited principle, but to your misunderstanding of the principle. The example perfectly shows your confusion: emphasis is part of content, not a matter of presentation. Now had you presented the same phrase in ten different fonts, that would be the same content in different presentations.

The biggest trick is deciding which is content, and which is presentation. Content is the stuff required to communicate your meaning fully and without deviation. Presentation is the way you communicate it, including the medium in which you do it.

Get these two straight, and it won't give you a bad feeling anymore.
ping?
Friday, February 24, 2006
 
 
"I'm writing a document for a publisher - they sent me a document template and a style guide and in ten minutes I was typing away in Word. Using styles like I use inflection in everyday speech."

Another example. I'm writing a research paper in LaTeX (it doesn't matter that it is LaTeX; it could be something different with similar capabilities). I don't know which journal I will send the paper to. I don't know which style guide I will eventually have to adhere to. Separating the content from the presentation means I can forget about all that, hack away merrily at my paper, and later decide which style I should adapt it to. It may be as simple as changing the document class (beware: a LaTeX-specific concept!) or redefining some commands.

The more formal your document is, the more important is the separation.
Roman Werpachowski Send private email
Friday, February 24, 2006
 
 
So if <em>is content</em> as well as <i>being content</i>, then I suppose <b> and <strong> qualify as well.

Then how about <acronym title="For Words That Aren't Words">FWTAW</acronym>, or <p>to let people know that it's actually a real paragraph and not just a randomly created sentence</p>.

Or how about <img src="important_information.gif"> for figures, or <object> or <embed> or...

Honestly, I don't think any of the above is important to the question of seperating content from presentation.

The point to the seperation is to know darn well that you've got to use markup inside of the content, but that inside of that markup it's also a darn good idea to <EM>OVERRRIDE</EM> the default behaviours for the markup, or to <em class="MassivelyImportantAllCAPSStyle">override</em> it with more specific control/limits.

<style>
.MassivelyImportantAllCAPSStyle { text-transform: capitalize; }
</style>

Once you've overridden the default behaviour for a tag or defined a class, then you've truly seperated the content from the presentation. All the markup can still be a part of the content - but the presentation has been "ripped" away from it.

The point there is that now you get to change a hundred trillion pages with <em> in 1 place - a stylesheet. It's all about making things easy and manageable. Using <font> tags is a miserable way to work. <span> works much better. Yadda yadda...

Cheers,
Ryan Smyth Send private email
Friday, February 24, 2006
 
 
Aural web browsers exist.

How does italics sound when read aloud?  Does it mean emphasis?  Or is it just delimiting the title of a book or film that we discuss?  I would not want the title we refer to to sound emphasised, even though visually presenting them the same works.

A sentence written in red gives a different impression to a sentence written in green.  But what distinction are you trying to make?  Between success and failure?  Or safety and danger?  I would not want danger to sound like failure.
DAH
Friday, February 24, 2006
 
 
A rule of thumb may be: Can you take it away without changing the intent and meaning? Then it is presentation. More exactly, without changing it too much - there will always be a loss, of course.

You can't take away the <em> tags, since it would change the meaning. But you can very well take away the exact appearance of the tag (within some boundaries), since the text will still be marked in a special way.

When you view the HTML page without the style sheet file, and anything still reads in its original meaning, then you have a clean separation of content and presentation. This means that the color red is part of the content when used as a warning sign. But it is somewhere in between, the same as a stylesheet without a default appearance (like <em> doing nothing without an explicit style definition).

As always, there is no silver bullet and it depends. Is there already an acronym for this? I suggest TINSBAID. ;)
Secure
Friday, February 24, 2006
 
 
This is why when people talk about MVC frameworks, the M and the V are quite clearly defined, but the C is sometimes a bit vague, and it's often difficult to find teh dividing line between V and C in real systems.

Don't get bogged down in dogma - just make systems that work well, are well constructed and that will be maintainable.
revert my buffer
Friday, February 24, 2006
 
 
Spoken English has varioius techniques for changing the focus and even the type of sentence (interrogative or affirmative) by means of stress, pitch and intonation.

It is possible, though clumsy, to use typographical conventions to imitate that.

However written English has evolved certain grammatical conventions to make these 'implicit' differences 'explicit'.

Here are rewrites of your original examples:

It wasn't me who said she stole the money.
Never did I say she stole the money.
I never said anything about her stealing money.
I never said it was her who stole the money.
I said that she took money, but not that she stole it.
I never said it was money she stole.

Now, recasting the sentence so that it gives the same message as in spoken English is not as easy as simply using formatting. It is for this reason that we have English lessons from kindergarten to university.
Stephen Jones Send private email
Friday, February 24, 2006
 
 
Philo, you been to Carnegie?
Bankers Hours
Friday, February 24, 2006
 
 
BillT Send private email
Friday, February 24, 2006
 
 
Presentation is important.  I recently switched from being the "plaintext only email guy" to "Outlook Rich Text email guy". 

It was nice for a while to send all my emails in plaintext that were simple (but ELEGANT).  Then I figured it out: emails look way better with boldable fonts, tasteful use of font colors and embedded screenshots.

Presentation is of course content, and all of the extra expressiveness would be nice on a place like this forum.  I bet the text-only limitation is more due to security/spam concerns than a conscious design limitation (i.e., the statement was probably "We can't allow rich text and images!  What happens when someone figures out you can make 4000pt letters with CSS?" rather than "We're not allowing HTML because everyone will use bold red blinking text and we will be left with a juvenile wasteland.").  Note that Slashdot has a lameness filter to filter out posts for this very reason.

Anyway, separating the content from the presentation like your initial example--attempting to place emphasis on each word--is way easier with the ability to bold (embolden? emphasize?) text.  Sure you can figure out how to reword everything properly, but that's DIFFICULT; it's a snap to just bold up some letters.  And who said making things easier is a bad thing?

There's something to be said for doing it the hard way, of course.  Poetry is built on "real good" word choice [irony noted -ed], and that alone.  Developing writing skills is important--I do acknowledge this.  But the easy way works, too.
pds Send private email
Friday, February 24, 2006
 
 
Go to html rather than rich text.  Rich text causes some email client users to get an email with and unreadable attachment called winmail.dat that actually is your message.
bankers hours
Friday, February 24, 2006
 
 
Ah that old chestnut, where to draw the line between syntax and semantics. Your choice is as arbitrary as mine.
Snark Send private email
Sunday, February 26, 2006
 
 
The goal of separating content and presentation is often impossible to meet in the fullest sense, but the guideline still stands. The reason to do it is so one part can be independently varied without affecting the other.

So, if I create a site with XHTML and CSS, and all the written content is fine the way it is, in theory I can have someone create a new visual appearance to the site by simply asking them to redesign the CSS (presentation). Similarly, when more content is added to the site, HTML writers don't have to add all sorts of irrelevant code for the visuals. When someone updates just the content, the visuals are already there.
John
Sunday, February 26, 2006
 
 
<em> and <strong> embody semantic information about their contents.

<i> and <b> tell the browser how to present their contents.

If you write a stylesheet that says that <em> should be presented as italic and <strong> as bold, you're making decisions about how the semantic information in your text should be presented.

If you write a stylesheet that says that <i> should be presented as bold and <b> as italic, you're implementing a hack.  (Assuming that you're not doing this on a lark, but because you need to in order to get the content to render properly.)  Also, the person who authored your content was making presentation decisions while thinking he was making semantic decisions, and he or she needs to be educated.
Robert Rossney Send private email
Monday, February 27, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz