Live data from Hacker News

JavaScript is not suitable for large web apps

blogs.adobe.com

151–160 of 218 posts

Re: JavaScript is not suitable for large web apps

#151
post #30

For a certain definition of "large" and for certain domains ( especially finance ) his argument is very, very valid. 200 average developers working with GWT->JS are anyday going to be more productive than coding native JS to get the same functionality. This isn't anti-JS...end of the day if you are on the web your code is JS. Thing is, how do you get there - do you hire 20 pricey smart JQuery guys, or 200 average Jav…

I guess I am not understanding why you would be compelled to re-write massive Java apps in JavaScript. Especially anything to do with heavy finance algos.

Replacing swing UI's seems like a reasonable thing to tackle using HTML/CSS/JavaScript. You could just pass data back and forth over HTTP if you are talking remote client/server or bundle a local webserver if running host only.

In the case of a platform like Windows 8, you can write actual apps using JavaScript (no server) but you can also write libraries in native code and access them directly from the JS.

I think this is just a classic case of "use the right tool for the job".

Re: JavaScript is not suitable for large web apps

#152
It would be interesting to see someone go through a public repository and compare error rates / bug fixes between dynamic and static languages implementing the same kind of products. Might not point out differences in the approach but at least in the entire ecosystem (tools+developers+code).

At a certain distance you can swap the approaches anyway (but for syntax):

static as dynamic: Use Thing = HashMap instead of objects. dynamic as static: Put assert(type(x)=="int") everywhere.

As to building large apps. If you need to build a large app (ie you cant divide it into isolated subsystems) then your goose is already well and truly cooked :)

Re: JavaScript is not suitable for large web apps

#153
post #46

Earlier quoted context omitted.

> 200 average developers This is the problem, and as you implicate, the exact sort of thing we need to stop doing.

Sure. So long as you have a full proof way of identifying the best developers. Hint: the best developers aren't the ones who can recite the API off hand.

> Sure. So long as you have a full proof way of identifying the best developers.

It's easier to grow them.

Re: JavaScript is not suitable for large web apps

#154
post #151
post #30

For a certain definition of "large" and for certain domains ( especially finance ) his argument is very, very valid. 200 average developers working with GWT->JS are anyday going to be more productive than coding native JS to get the same functionality. This isn't anti-JS...end of the day if you are on the web your code is JS. Thing is, how do you get there - do you hire 20 pricey smart JQuery guys, or 200 average Jav…

I guess I am not understanding why you would be compelled to re-write massive Java apps in JavaScript. Especially anything to do with heavy finance algos. Replacing swing UI's seems like a reasonable thing to tackle using HTML/CSS/JavaScript. You could just pass data back and forth over HTTP if you are talking remote client/server or bundle a local webserver if running host only. In the case of a platform like Window…

Moreover the original author says

"JavaScript is not suitable for large web apps.

I am serious: Don’t write large web apps in JavaScript."

I don't know how the first flows from the second. Certainly I wouldn't write a large web app in Javascript! I might write Javascript in a large web app though.

So I agree and think the original article overreached.

Re: JavaScript is not suitable for large web apps

#155
As long as you keep using frameworks, yes!

Instead just use a base library to give you a cross-browser wrapper and few more utils, then develop the whole application core layer on top it to separate it from your sandbox. Write all processing in core JavaScript unless you are trying to access DOM where the library (usually jQuery) wrappers would come into picture. This would give you immense power to control what you develop; will be highly scalable and of course, not to forget, performance.

Don't even complain if you have server side frameworks which will generate JavaScript for you; that will never work and is only good till your project is in Mock-up (prototype) stage.

The problem seems, you don't have good UI guys.

Re: JavaScript is not suitable for large web apps

#156
I don't understand the article. He seems to be confusing using a language in a project vs using a language as the primary one in a project. We might say "Assembly language is not suitable for large OS kernels. Do not write your OS kernel in assembly language."

But I don't think that follows. Assembly language (the article's metaphor) is something that most OS kernels will use from time to time and in moderation. Similarly I don't see anything wrong with Javascript for some pieces of a large web app.

Re: JavaScript is not suitable for large web apps

#157
Sheesh fellas, lighten up, he has some interesting things to say. He's not laying out the 10 web commandments, just some opinions about software design. And his thoughts have some merit. It is distinctly hard to build large applications with a language as dynamic as javascript. At least in python and ruby you have classes. In javascript all you can do is duck type. Also javascripts scope is great for being the worlds most flexable language but not for building large web apps or hiring devs for that matter.

JS is a great and flexible language that runs on more devices than practically any other language. But it is hard to write large web apps in it.

Re: JavaScript is not suitable for large web apps

#158
post #35
post #14

This article only proves the author's incompetence to develop and maintain large JavaScript projects, nothing more. > I don’t know why but JavaScript programmers tend to put all of their code into few files. That’s not so useful, though, if you want to have multiple developers work on the same project. Splitting up the code into multiple files enabled us to scale the project. Let me rephrase that: "I don’t know why b…

Ok, seriously, I'm sort of sick of the file-stew meme in software development these days. Our editors aren't particularly designed for the one-file-per-function method of development that's been ohh-so-common. Serious, if a file is under a hundred lines of code, it probably doesn't need to be a separate file, it only undermines the grouping value that files are useful for.

I usually do the following:

- if function A and B are always used together, than they are one file.

- if linecount gets to big, split A and B into separate files

- if function C is shared between modules than it belongs in it's own file

So far it worked out great.

Re: JavaScript is not suitable for large web apps

#159

This is more of a rant against dynamically typed languages than against javascript itself, and making the argument that dynamically typed languages are not suitable for large web apps is a difficult (not impossible) one to make. The author also complains about some javascript projects being split up into enough files, which is hardly a side-effect of using javascript. The author inherited what sounds like a pretty di…

And it's an Adobe blog. Their employees are quite likely to be biased in favour of their statically-typed variant, ActionScript 3 (well, it has a lot of changes, but it's essentially a JS variant at heart)

I find it very difficult to swallow anything written by the OP from the obstructed view at Adobe. After spending nearly every billable hour for more than three years buried in AS3's woeful inconsistencies, undocumented (or un-addressed) compiler issues, seemingly infinite application-crippling bugs, schizophrenic deprecation- any dev who had the misfortune of being relegated to work primarily in AS3 (and god help you if you had to support AS2 and AS3 applications simultaneously) the mere suggestion that Adobe has an opinion that is anything but a head up its own ass probably makes you break out in hives like i just did.

Re: JavaScript is not suitable for large web apps

#160
post #137

There are reasonable objections to JavaScript, but this is inane. He uses an example of someone committing a classic mistake in software design. This error would be the same in JavaScript or Java. I'd like to see how his ActionScript translation magically fixed it. However, the remedies for the mistake differ in each language. It is somewhat difficult to fix it in Java's statically typed straightjacket (which I assum…

>In my experience most Java developers don't even do that. They... It's awesome how, on Hacker News, people whose job require them primarily write code in Java are some sort of stupid luddites ready to be easily generalized as the worst kind of programmer. Way to stay objective, guys.

You don't get any hipster cred for using actual useful languages on Hacker News, you've got to use languages which have no proven track record, makes JavaScript look blazing fast and preferably supports more paradigms than libraries.
Post reply on HN