News for hackers. Stuff that matters.
Re:HTML is object code by edw519 on Saturday August 01, 2009 @07:47PM (#736848)
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

Re:HTML is object code by olavk on Sunday August 02, 2009 @08:38AM (#737376)
The linked comment seem to state that if you consider HTML object code, then you don't have to worry about accessibility. This is obviously wrong - HTML does not become more or less accessible whatever you call it.

However, used in the right way, an abstraction on top of HTML can improve accessibility. For example IE versions before version 8 does not support display:table, which lead many developers to chose table markup rater than CSS (because the share of IE users on a given site typically is greater than the share of disabled users). But with a higher-level language you can write:

  (flexible-grid
    (row
      (cell (width fixed 200px) "This is a sidebar")
      (cell (width spring) "This is the main content")))
And for IE-user you render this as table-markup, and for everyone else (Firefox-users, small devices, Google etc.) you render as accessible non-table HTML+CSS.

Some developers claim to find table-markup much more intuitive than equivalent CSS. In that case you can choose a language like:

  (table
    (tr
      (td (width: 200px) "This is a sidebar")
      (td "This is the main content")))
...and still render it into clean, accessible HTML for everyone except IE<8 users. Win-win!
Re:HTML is object code by anc2020 on Saturday August 01, 2009 @08:20PM (#736879)
Ron Garret reads or has read HN, so its very possible he knew about that comment.
Re:HTML is object code by lisper on Saturday August 01, 2009 @08:24PM (#736882)
I didn't know about that particular comment, but I did know that this is not an idea that's original with me. It's completely obvious to anyone who has learned Lisp. The only reason I wrote it is that it's apparently not completely obvious to CSS advocates. I seemed to have garnered their attention for reasons passing my understanding, so I thought I'd try to take advantage of that to spread some enlightenment. I have found that sometimes merely stating the obvious somewhere that people can see it and link to it can be useful.
Re:HTML is object code by mahmud on Sunday August 02, 2009 @01:02AM (#737093)
Not only is HTML object code, but the code that generates my HTML is also object code. Macrology is fun :-)
Re:HTML is object code by olavk on Sunday August 02, 2009 @05:38AM (#737262)
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 by stcredzero on Saturday August 01, 2009 @10:22PM (#736983)
Seaside and Web Velocity are very much in line with this idea.