Live data from Hacker News

Enough with the JavaScript already

fr.slideshare.net

31–40 of 231 posts

Re: Enough with the JavaScript already

#31
post #24

I wonder if there'll ever be an alternative to Javascript. I'm not talking about those things that eventually get translated to Javascript, I'm talking about a native platform well thought-through and based on a typed language that isn't a mess. Yeah, I know: it's not Javascript that's broken, it's the DOM. I'd argue that both should be replaced by something else, otherwise the future will be 90% native mobile apps,…

The mistake, perhaps, is that people (us) are trying to shoe horn an application into a Document object model - its in the name for christ sakes! Document! Not application object model!

This!

Re: Enough with the JavaScript already

#32
post #24

Earlier quoted context omitted.

The mistake, perhaps, is that people (us) are trying to shoe horn an application into a Document object model - its in the name for christ sakes! Document! Not application object model!

Not just the DOM, HTTP as well. We're shoehorning state into a stateless system, and inventing new crap like WebSockets to overcome limitations of a system designed for document retrieval. The web has turned into the biggest hack ever.

Bigger than x86? I doubt it. It's fine for things to evolve: so long as the complexity is compartmentalised we can forget about it and move on with our lives.

Re: Enough with the JavaScript already

#33
post #15

I wonder if there'll ever be an alternative to Javascript. I'm not talking about those things that eventually get translated to Javascript, I'm talking about a native platform well thought-through and based on a typed language that isn't a mess. Yeah, I know: it's not Javascript that's broken, it's the DOM. I'd argue that both should be replaced by something else, otherwise the future will be 90% native mobile apps,…

What's wrong with the DOM? (Sorry if this is a stupid question)

What's wrong is what the DOM is and what it isn't. The DOM is the Document Object Model data structure along with the parametrized routines that operate on that data structure. It exposes every way in which the apparent simplicity of XML is far from the reality. Then the operations that it provides do little to manage the complexity. They are only relatively "primitive" operations, like getters and setters for the data structure, plus a few things like "getElementsByTagName". That gets a set of elements from which you then should or must exclude what you don't want. If you want a convenient wrapper for the DOM API, you have to find or build one.

Re: Enough with the JavaScript already

#34
post #27

All the includes are insane as well. Run Noscript or any other JS blocker and visit a few big sites and you'll see that you end up running JS from half the Internet. I'm joking of course, but some sites have dozens of includes from other sites, advertisers, CDNs, etc.

Media sites are painful to visit with so many libraries and embedded widgets. Those pages load much faster after using Noscript to selectively load JS. Wish there was a built in repository where people could share whitelists.

Re: Enough with the JavaScript already

#35

I wonder if there'll ever be an alternative to Javascript. I'm not talking about those things that eventually get translated to Javascript, I'm talking about a native platform well thought-through and based on a typed language that isn't a mess. Yeah, I know: it's not Javascript that's broken, it's the DOM. I'd argue that both should be replaced by something else, otherwise the future will be 90% native mobile apps,…

Dart ( http://www.dartlang.org ) is a attempt by Google. Of course, probably no browser except Chrome (and Opera?) will ever have the Dart VM built-in, but Dart also compiles to javascript for those other browsers.

An issue with Dart is it does not support IE 8. IE 8 still ships with Windows 7 and it is quite popular.

It's not reasonable to throw away all IE 8 traffic just to get Dart's features.

Re: Enough with the JavaScript already

#36
post #25

2013 - I stopped paying attention to every new framework or MV-whatever that comes out. What matters is the product and end user experience, and every single decision on how to go about making that product should be made with that thought in mind. For me, it's not even javascript anymore. Objective-C and Java rule 2013 since web apps are not as pleasant to use on mobile.

"Objective-C and Java rule 2013 since web apps are not as pleasant to use on mobile." Or with some MVVM, Xamarin and some C# or F#... write once, compile for all mobile platforms. Never having to once touch the nastiness of Obj-C or Java.

What's nasty about Obj-C?

Re: Enough with the JavaScript already

#37
post #25

2013 - I stopped paying attention to every new framework or MV-whatever that comes out. What matters is the product and end user experience, and every single decision on how to go about making that product should be made with that thought in mind. For me, it's not even javascript anymore. Objective-C and Java rule 2013 since web apps are not as pleasant to use on mobile.

"Objective-C and Java rule 2013 since web apps are not as pleasant to use on mobile." Or with some MVVM, Xamarin and some C# or F#... write once, compile for all mobile platforms. Never having to once touch the nastiness of Obj-C or Java.

I rather use those 5 MB for my application.

Re: Enough with the JavaScript already

#38

2013 - I stopped paying attention to every new framework or MV-whatever that comes out. What matters is the product and end user experience, and every single decision on how to go about making that product should be made with that thought in mind. For me, it's not even javascript anymore. Objective-C and Java rule 2013 since web apps are not as pleasant to use on mobile.

> For me, it's not even javascript anymore. Objective-C and Java rule 2013 since web apps are not as pleasant to use on mobile.

I think this is bad. Not because the technology isn't good, but because small companies (or idealistic organizations, or others with a small budget) will have to implement useful apps for several platforms. Perhaps they cannot afford it (or think it's too much hassle, or don't care).

E.g., say that there is a product made to make life easier for people with a certain disease. Perhaps some users will have to switch device in order to use it. And maybe there are other apps they need which are available only for their old device. (And don't forget that are other platforms than iOS and Android as well, including desktop.)

Web apps (either run on the web, or natively) solves this problem, even though I agree that JavaScript, with it's myriad of ways to shoot yourself in the foot, is not ideal.

Like another commenter pointed out, there are options for compiling to multiple platforms. But it often doesn't seem to happen that way, and perhaps it's not always possible or feasible.

Re: Enough with the JavaScript already

#39
Another presentation making similar conclusions, but with different arguments, that I recently saw on reddit (not sure if it made it to HN).

http://www.infoq.com/presentations/web-development-technique...

http://www.reddit.com/r/programming/comments/1eiykw/web_deve...

(back to me...)

I wonder if the pendulum is finally swinging back, to working with the affordances of the web, instead of fighting them. I hope so.

This might have an interesting relationship to the rise of mobile. It's still not possible to rival native apps with HTML apps on mobile (a controversial assertion, but one that is 'trending' too) -- so if you ARE building a web app, you've got to actually have reasons to prefer web apps. Even if that's just cost/speed of development. But if you've actually chosen to build a web app, maybe you're more likely to want to work within the web instead of fighting it. If you don't like the architecture of the web, you could have just written a native app instead.

Re: Enough with the JavaScript already

#40
JavaScript is a tool. Once it becomes trendy idiots will always abuse a tool. It's not JavaScript's fault people are bad at web design and development. If it wasn't fucked up JavaScript these people were contacting you about it'd be something else, be glad you have a job.
Post reply on HN