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 devices or assistive technologies will be used to render the content.
HTML is object code
11–20 of 68 posts
Re: HTML is object code
#12Earlier quoted context omitted.
What are the blind spots to his argument? I read your comment but didn't see anything particularly in contrast with the post. Edit: Oh actually I presume you're implying the ability to easily swap stylesheets, and that would be a valid point.
Huh? Why would that be a valid point? It's no harder to swap out different kinds of render methods than it is to swap style sheets. BTW: > Programs written in compiled or runtime-based languages either run or they fail. This is simply not true. No matter what you're writing code in, you can write it in a way that exhibits graceful degradation. It's just that some languages make it easier than others.
Don't bother answering, I'm really confused. Why doesn't the world use XML and XSLT? I give up. I'm gonna just code using tables from now on.. o_O
Re: HTML is object code
#13Earlier quoted context omitted.
What are the blind spots to his argument? I read your comment but didn't see anything particularly in contrast with the post. Edit: Oh actually I presume you're implying the ability to easily swap stylesheets, and that would be a valid point.
Huh? Why would that be a valid point? It's no harder to swap out different kinds of render methods than it is to swap style sheets. BTW: > Programs written in compiled or runtime-based languages either run or they fail. This is simply not true. No matter what you're writing code in, you can write it in a way that exhibits graceful degradation. It's just that some languages make it easier than others.
its much much harder to switch rendering engines than to switch css files
try changing this websites rendering engine, first you need to hack the server, then you need to understand the source code(and learn the language if you dont know it already), then learn how the renders are perfomed, how the data is modelled.
then try switching its stylesheet, that can be a click away if you want it.
Re: HTML is object code
#14Of course, in the best of all possible worlds, you'll end up with a perfect abstraction layer which is powerful enough to allow you to do everything you need, while hiding all of the the gory details. In the worst case, you end up with a leaky abstraction. Suddenly you need to know not only the underlying language, but also how the compiler works.
That's not to say that all abstraction layers are evil. C vs. machine code is an example of an abstraction that works well. You rarely need to dive down into the machine code and you can, to a large extent, be ignorant of how the compiler works and still be able to be a decent C programmer.
There's no doubt that developing for the web can be quite hairy and sometimes you wish you didn't have to deal with all of the compatibility issues etc. It's possible that the solution is something like Vaadin, which lets you develop web applications as if they were Java desktop applications. But I'm not convinced just yet.
I guess the real question is, what exactly is the problem with HTML? If the problem is that HTML isn't abstract enough, then yes, an abstraction layer would be the answer. But if the problem is something else then slapping an extra layer of complexity on top of HTML won't magically solve those problems.
Re: HTML is object code
#15Re: HTML is object code
#16I think this makes good points about how we should be working with html these days, except those few of us who do static tables by hand. One thing I am concerned about in the concept of doing all the work on the server is that CSS has the ability to let the client override some of the presentation issues, such as is the case for accessibility. I wonder if that can be done as effectively on the server.
Re: HTML is object code
#17He 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…
Moreover, if you're going to argue the "nobody's actually going to do it" argument, I'd say that "nobody's actually using CSS to generate one HTML page that works in a screen reader, cell phone, rich browser, and REST API" either. For the same value of "nobody", which is to say, not literally nobody, you can find a handful of people, but the idea that there's some mass of developers "correctly" using CSS is pretty silly too.
Re: HTML is object code
#18Ah yes. The old "x is hard. Writing x sometimes gets messy. I don't want to deal with all the intricacies and details of x. I know, I'll create an abstraction layer!" Of course, in the best of all possible worlds, you'll end up with a perfect abstraction layer which is powerful enough to allow you to do everything you need, while hiding all of the the gory details. In the worst case, you end up with a leaky abstracti…
HTML is ok, it's CSS that's got the problem. It's the difference between Microsoft Word and Publisher; CSS doesn't provide enough layout primitives to do common web layouts easily. Instead, you have to specifically structure your HTML for it and layer on the tags and copious amounts of CSS code.
Re: HTML is object code
#19Re: HTML is object code
#20Earlier quoted context omitted.
Huh? Why would that be a valid point? It's no harder to swap out different kinds of render methods than it is to swap style sheets. BTW: > Programs written in compiled or runtime-based languages either run or they fail. This is simply not true. No matter what you're writing code in, you can write it in a way that exhibits graceful degradation. It's just that some languages make it easier than others.
'Huh? Why would that be a valid point? It's no harder to swap out different kinds of render methods than it is to swap style sheets.' its much much harder to switch rendering engines than to switch css files try changing this websites rendering engine, first you need to hack the server, then you need to understand the source code(and learn the language if you dont know it already), then learn how the renders are perf…
I find it a bit distressing that I would have to explain this here on HN of all places.