Hacker News new | ask | show | jobs
by kennet 5609 days ago
I am probably in the minority on HN thinking this, and it's a pity that there is no chance of this ever changing, but lets go with it anyway:

HTML, CSS and JS are a very bad way to create websites today. It could be worse, but it's bad enough. They were decent once, when we didn't need them to the extent that people are using them today.

As others have mentioned, the signs of this problem is when people are writing language X to language Y converters to accomplish the same job, because language Y is detestable. This would be your HTML, CSS and JS. Tools like HAML, SASS and CoffeeScript are a very good sign of this.

For myself, there are two things that are really pissing me off: 1) Lack of security by default, 2) Lack of choice in client-side scripting. I am at the whim of JavaScript which is pretty terrible. Of course, there is no hope of anyone producing a browser that offers an API, and a set of languages that can access that API. So it's just JS. That's fucked to me. I have more gripes but I'd like to keep this post short.

On the server side, it's easier. We have more choices, because our clients are not tied into a specific server technology; I used to write PHP, but since then I moved on to something that's a lot more thought out for serving webpages. MVC is the ideal for this kind of thing. The server will give the browser what it wants, and this does not concern the customer. On the browser end? We are screwed. There is quite likely nowhere to go.

Unfortunately, we have four big companies (Google, Microsoft, Mozilla and Opera) pouring in a lot of money to keep this technology afloat. And it's very sad. These companies should be leading the way, not holding back technology.

Very sad.

5 comments

HTML, CSS, and JS are actually pretty good at doing what they were made to do. Unfortunately, that vision bore little or no likeness to modern web applications.

The time is ripe for changing the way people use the internet, and I think that is part of what the whole "native app markets" thing is about. The problem with that is multiple platforms - multiple browsers together with their cesspool of languages pale in comparison to the pain of developing for multiple platforms. There have obviously been a lot of attempts to make it easier, but they all sucked in their own way.

It will get better, and we'll have new things to complain about at some point. Until then, developing for the web means cobbling together antiquated standards and forcing them to do things previously unheard of. Which, ultimately, is kind of fun.

EDIT: If anyone else is interested in discussing what a solution could look like, I'd love to chat about it. Would certainly be a very fun (if not extremely ambitious) open source project. (Contact through my profile.)

I agree completely. Javascript is just a bad language(1), and HTML and CSS are fundamentally unsuited for the kinds of apps that we're using them for. After years of effort we've managed to get to the point where they sort of work, but it could have been much better.

(1) Yes, I know the cool things you can do with closures. Python and Ruby do them too, without the insane misfeatures like default global scope and bizarre implicit type conversions.

> Python and Ruby do them too..

Ruby has decent lambdas/closures, but Python absolutely does not. Its lambas are horrifically limited. Because of that alone, Javascript is a much better at functional programming than Python.

I agree that default global scope is a misfeature, but the solution is trivial--declaring variables--which I think makes the language much more readable anyway. I quite dislike the Python style of coding in which the local variables are just causally used without listing them somewhere--it's too easy for things to get lost. On the other hand, maybe I just need better syntax highlighting? The new "use strict" should completely fix accidental globals, as I understand it.

People complain about the implicit type conversions but I'm not sure I've had that pose a problem in real life and I've written my share of Javascript. I'm not even sure what that kind of bug would look like. I'd love an example.

I don't agree with your assessment of python closures. Just because you have to name all inner functions doesn't mean they're not proper closures.
I personally think we've got lucky to have JS for client-side scripting. Despite all the efforts from Sun and MS.
Is Flash a 'solution' to the problems you see with HTML, CSS and JS? Not just video, but overall user interaction?

I'm not sure about the 'security' aspect, but wasn't it created to do much of the interaction we are now doing in JS?

I seriously doubt you're alone in saying that we can do better than HTML/CSS/JS. But despite their warts, Flash just ain't the answer.