Live data from Hacker News

HTML is object code

rondam.blogspot.com

41–50 of 68 posts

Re: HTML is object code

#41
post #26

Earlier quoted context omitted.

The problem is that, unlike Word vs. Publisher, we don't have a set medium that we're working toward (e.g. paper.) When CSS was created, it controlled and formatted all the things that browsers could present, which wasn't very darn much. Then we thought of more things for browsers to do, and had to make our CSS much more complicated to get the same effects. To give an even older parallel, when HTML was created, it ha…

It's a lovely story, but it isn't true. Designers have been trying to create grid-based layouts since the beginning of the graphical web. CSS was created after that, and its creators did not see fit to bestow on us the basic tools (flexible boxes) that could be used to create these layouts elegantly. As a result HTML and CSS have always been coupled. Only by using both together, can engineers create the layouts desig…

CSS does support flexible grids (with power equivalent to HTML tables), it is just that IE has not supported it until IE8, which means it hasn't been used widely.

I fint it strange that people keep blaming the shortcomings of IE6+7 on the CSS standard.

Re: HTML is object code

#42
post #38
post #26

Earlier quoted context omitted.

The problem is that, unlike Word vs. Publisher, we don't have a set medium that we're working toward (e.g. paper.) When CSS was created, it controlled and formatted all the things that browsers could present, which wasn't very darn much. Then we thought of more things for browsers to do, and had to make our CSS much more complicated to get the same effects. To give an even older parallel, when HTML was created, it ha…

First, I agree wholeheartedly that the language we use is never powerful enough for us to express ourselves. I'd say that even goes for print... but whatever. I spent a few hours reading old RFC's because of this whole thread. It looks to me like rfc 1942 got popular, and the CSS folks never came to grips with that. CSS1 is pretty given the constraints of the day. I think about CSS in two terms (I don't think there's…

CSS1 was mostly about typography, but CSS2 supports layout equivalent to (or rather a superset of) what is possible with HTML tables.

Re: HTML is object code

#43
post #17
post #11

He seems to argue that alternative renderings - eg. for blind users - could be generated on the server rather than the client. This glosses over the important point that nobody is actually going to do that. The beauty of correct use of html and css is that the burden of choosing an appropriate rendering is pushed to the client, which in turn means that the developer does not have to know in advance what kind of devic…

If I may monkeypatch the original argument, I'd point out that there isn't any particular reason that you can't output perfectly accessible HTML with this approach. In some ways its likely to be easier than some other approaches, since when you think this way, you're starting out with more actual, factual semantics in your data representation. Moreover, if you're going to argue the "nobody's actually going to do it"…

Obviously if you generate semantic HTML there is no problem. But the article argues (in the end) that accessibility instead can be achieved by generating different "object-html" renderings on the server based on e.g a header that says "i am blind". That is totally unrealistic!

Semantic HTML on the other hand is accessible by default, you have to specifically go out of your way to make it inaccessible or platform-specific.

Re: HTML is object code

#44
post #26

Earlier quoted context omitted.

The problem is that, unlike Word vs. Publisher, we don't have a set medium that we're working toward (e.g. paper.) When CSS was created, it controlled and formatted all the things that browsers could present, which wasn't very darn much. Then we thought of more things for browsers to do, and had to make our CSS much more complicated to get the same effects. To give an even older parallel, when HTML was created, it ha…

I agree! But the main failing of the original design of CSS (which could resolve most of these arguments) is that they didn't include a way to do page layout in the way that tables work. Many years later, with CSS3, they've finally adding it. But it seems like an obvious layout deficiency given the previous use of tables for layout.

Page layout equivalent to tables was already included in CSS2 which was finalized more than a decade ago. It is just that browsers - specifically IE - were slow to support it.

CSS3 has some proposals for grid based layouts that is much more powerful that CSS2/tables.

Re: HTML is object code

#45
post #2

This a a major leap. Once you understand that HTML is object code, a whole new world of architectural possibilities opens up to you. Not exactly a new idea either. pg talked about this years ago... http://news.ycombinator.com/item?id=50159

This is also the approach in ASP.NET. You build the page out of controls, and each control knows how to render itself as HTML.

Re: HTML is object code

#46
post #36

Funny, I thought HTML was a markup language. The article says HTML is (or can be) both source code and object code. I say it's neither. HTML isn't the source code for some application or piece of software, and it's not the application or software itself. It doesn't tell a cpu what to do, it tells a browser what to show.

Yes, of course. But it was clearly meant as an analogy.

The elements of good coding style that apply when writing a program in C don't necessarily apply to a compiler when it compiles a higher level language down to C.

Similarly, the best practices for writing HTML by hand don't necessarily apply to a program that generates HTML from a higher level abstraction.

Re: HTML is object code

#47

The "tables vs. CSS" argument has a clear answer and I can't believe we are still arguing about it. CSS people who argue against tables are obeying their instinct that content and presentation should be separate. They are mostly right about this (I say mostly because the more graphical a webpage is, the more the content and the presentation are inextricably linked). What the CSS people refuse to acknowledge is that C…

"The table-based paradigm is a very natural way to describe layouts -- that's why everyone used tables for this prior to CSS!" Wrong and wrong. Tables for layout didn't really take off until the late 90's, and mostly were popularized by the work of one person (Dave Siegel, who wrote a book where he referred to table-based techniques as part of "third-generation" web design, implying just how much had come before). An…

> Tables for layout didn't really take off until the late 90's

Which was coincidentally when websites started having sidebars. Are you arguing in favor of pre-1995 web design? Are you arguing that there is a more natural way than tables to express site layouts with sidebars?

When I say "prior to CSS" I mean "prior to wide CSS adoption and browser support". Yes, CSS1 was released in 1996, but it didn't really catch on among web authors for a few years (and wasn't really practical to use anyway due to limited browser support). In that intervening time, websites started sprouting sidebars, and basically all the sites that used sidebars did so with HTML tables.

> And even when they did take off, tables were still burdened with the sorts of quirks and browser incompatibilities people complain about with CSS

Quirks or no, HTML-based tables are more fit for describing layouts than CSS ever will be until web authors can use "display: table" or something like that. With HTML-based tables, you're working around browser quirks (which really aren't as bad as you make them out to be). With CSS, you're working with a language that is too weak (even if implemented perfectly) to express what you're trying to say. With CSS, a three-column layout (something that many, many sites want) is considered a "holy grail" (http://www.alistapart.com/articles/holygrail/).

CSS (pre-"display:table") doesn't have the right abstractions for achieving designers' demonstrated needs. Why do you live in denial of this fact?

Re: HTML is object code

#49
post #43
post #17

Earlier quoted context omitted.

If I may monkeypatch the original argument, I'd point out that there isn't any particular reason that you can't output perfectly accessible HTML with this approach. In some ways its likely to be easier than some other approaches, since when you think this way, you're starting out with more actual, factual semantics in your data representation. Moreover, if you're going to argue the "nobody's actually going to do it"…

Obviously if you generate semantic HTML there is no problem. But the article argues (in the end) that accessibility instead can be achieved by generating different "object-html" renderings on the server based on e.g a header that says "i am blind". That is totally unrealistic! Semantic HTML on the other hand is accessible by default, you have to specifically go out of your way to make it inaccessible or platform-spec…

But you also have to go way out of your way to make it look good. And with pure semantic HTML there are layouts that are flat out impossible. The only way to do certain things with CSS is by cluttering one's clean HTML with random divs everywhere (killing the markup/style separation in the process)...

Where the author suggested outputting audio when confronted with a "blind" header, I thought more along the lines of returning pure semantic markup. And presumably the abstract code that compiles down to html is purely semantic so it would be trivial.

Re: HTML is object code

#50
post #43

Earlier quoted context omitted.

Obviously if you generate semantic HTML there is no problem. But the article argues (in the end) that accessibility instead can be achieved by generating different "object-html" renderings on the server based on e.g a header that says "i am blind". That is totally unrealistic! Semantic HTML on the other hand is accessible by default, you have to specifically go out of your way to make it inaccessible or platform-spec…

But you also have to go way out of your way to make it look good. And with pure semantic HTML there are layouts that are flat out impossible. The only way to do certain things with CSS is by cluttering one's clean HTML with random divs everywhere (killing the markup/style separation in the process)... Where the author suggested outputting audio when confronted with a "blind" header, I thought more along the lines of…

I think HTML is intermediate code, not object code, not source code.

Just like you could code assembly by hand (and plenty of people still do) you can code HTML by hand. But in reality most html is generated by machine and then 'rendered' into a visual representation, the final binary end-product.

Post reply on HN