Yesterday, I listened to an episode of the .NET Rocks podcast featuring Scott Hanselman and Chris Sells talking about HTML and JavaScript in today’s modern web. While the episode is essentially hysterically funny and I quite like Hanselman and his (at times) extremely helpful blog posts, there is a lot in this particular episode that rubbed me the wrong way and I somehow need to get this off my chest.

<rant>
HTML is a language for defining documents and content, not applications. With HTML alone, you can write an entire book. You cannot, however write the tiniest bit of interactivity that surpasses the functionality of an anchor without using JavaScript and/or any number of server technologies. That statement alone should make you stop and think. Seriously, if you take any website and strip away all styling and JavaScript, that’s what HTML was actually meant to do!

Then we come to the aspect of graphics and in particular the expectations that users have in terms of graphics. Users will never understand why a particular graphical effect is difficult (and cumbersome) in a web application. The whole layout mechanism of HTML – the CSS box model, the DOM structure, everything – is specifically targeted towards documents. It doesn’t have the flexibility (or API) to allow the kind of control required for a real graphical application. So, in addition to the whole browser-specific implementation of a gigantic CSS(3) standard, even if everything works as designed it still doesn’t give you what you actually need.

And then there is of course JavaScript… I could rant all day about JavaScript alone, but at this point I’ll make it simple: JavaScript, is the only language I have ever encountered that while being touring complete, manages to get everything else wrong that a language can possibly get wrong. A language is supposed to give programs structure, make code readable, maintainable and reusable. While it is technically possible to write readable and maintainable JavaScript, there’s next to nobody that can actually do it and the simple fact remains that the language makes it too damn hard! I feel that a useful language has to be opinionated to a certain extent, to declare that there is a right way of doing things and make it hard for the developer to do something else. JavaScript does the exact opposite. And the fact that quite literally every dumbass that has ever picked up a book that had some code snippets inside thinks that he/she can write JavaScript just makes the whole thing even more frustrating. A little knowledge is a dangerous thing, and in web development, there is just way too much “little” knowledge.

These are things that will never change, so we as web developers are left with the task of using fundamentally flawed technologies (JS, CSS) to do stuff with them they were never designed to in the first place. I don’t actually understand how it could get this far – that we came to live in a world where so much of our business is completely handled on a platform that is and always will be inadequately equipped to fulfill the business’ requirements without compromising everything that makes good software.
</rant>

For the record, I don’t think that HTML itself is bad. I actually think it is the right way to go if you want to get (textual) content out there. For example in the form of *.epub e-books which (as many of you will know) are based on XHTML. But I do think that most things (next to everything) you see on today’s web is a clear abuse of the technology.

Do you seriously believe that the web is the way to go for application development? To slowly let those technologies penetrate our desktop environments (e.g. win.js on Windows 8) and even completely abandon desktop environments in favor of a HTML/JS mono-culture?

Leave a Reply

Your email address will not be published.

*