Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm fully aware I'm a rather mediocre frontend developer so my opinion on the matter has very little value, but on the other hand I have this feeling that HTML, CSS and JS on the hindsight were probably some of the least suitable technological choices for what the current usage of the web actually needs to achieve this objective.


The triad of HTML, CSS, and JavaScript are actually fantastic for the web if used intelligently. Unfortunately the "used intelligently" part is skipped way more often than it should be.

Having HTML be the first resource at a URL is awesome. HTML can have lots of "invisible" metadata for a variety of user agents. Not every user agent is a graphical browser wanting to run arbitrary code. The microbrowsers that generate previews when shared by messaging apps have different needs than a graphical desktop browser which has different needs than a screen reader. The same HTML can serve all the user agents "for free".

Sticking styling and interactivity into separate resources let's the user agent figure out what it needs to load. A screen reader likely doesn't care about images, a phone might load a custom CSS based on a media tag, and a microbrowser wants the OpenGraph data in the header.

HTML also makes it trivial to point readers to different sections of itself so a user agent can jump to a relevant part of the page. So you get hyperlinks between documents and even specific sections of documents.

HTML is not perfect but it's great for documents. Even full JavaScript apps should at least provide a skeleton of HTML saying they need JavaScript to run and give non-graphical user agents pointers to appropriate resources. Much of the content of the web would work just fine as documents and does not need to be constructed on the client with megabytes of JavaScript and hundreds of calls to different resources.


There was once the idea, that the web could work like other objects in programming. You would download an object and then send it messages (message passing concept). I think this was imagined to be in some kind of Smalltalk image like environment. I think Alan Kay mentioned the idea in one of his talks, or I have read about it elsewhere related to Smalltalk.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: