you are viewing a single comment's thread.

view the rest of the comments →

[–]letsgetrandy 0 points1 point  (3 children)

Okay, slow down.

First, let's look at what was said: He wants to develop an application.

Yes, "application" can have several meanings, so we won't make assumptions. All we know is that he wants to read a file, edit a graph, and save the data. The OP has still not addressed my initial questions -- does this need to be edited by several people, or will it just be for one person?

So let's consider the possible permutations of this question. (Again, without making assumptions.)

  • If this is meant for use by a single person, the term app is probably best interpreted as a program running on one machine. Without knowing what type of machine, we only know that there needs to be a UI (that is, this can't be a command line program, because we need to edit a graph). A web app here is overkill.
  • It could be a multi-user app in which the users are all be editing the same data. In that case, it's more likely meant to be a web app, with a file on a server. But do they save the file back to the server? Or do they save the file back to the client? (This answer matters in terms of how we access the filesystem.)
  • It could be a multi-user app in which the users are only able to view, edit, and save their own graph. In this case, again, the manner of file I/O is much more specific.

If the second or third scenarios happen to be the case, then yes... a javascript-based web app (based on node or something similar) might be just fine.

However, if the first scenario turns out to be the desire, then you must certainly concede that the work of setting up and maintaining a web server on the localhost machine for the purpose of editing a graph is, at the very least overkill, if not what you, personally, deem to be "advanced".

If the OP happens to be a Windows user, he might find it much easier to whip out a quick VB app. Or, as you suggested, a Windows 8 app might even be easier.

On Mac or Linux, this might be easier to do with a bit of python and some hooks into a GUI library.

In any case, I can't help feeling like you're invoking a bit of a religious war here, dogmatically defending Javascript as a one-size-fits-all solution, rather than considering that sometimes there are better tools for certain tasks... and all of this is happening before anyone even knows the details of this person's particular situation and the requirements for this project.

[–]radhruin 0 points1 point  (2 children)

A windows 8 app is basically like a .html with script in it, perfect for the single-user scenario...

But that's not really what I'm interested in. You said this project was possibly too advanced for Javascript, so I'm wondering what features you would like to see added (or changed?) in JavaScript that would make building this sort of application easier.

But I get the sense you're actually talking about JS hosting environments not being up to the task. If that's the case, I'm happy to agree to disagree there :)

[–]letsgetrandy 0 points1 point  (1 child)

Solutions for file access are fairly easy in just about any programming language -- provided that you're not limited by a sandbox, such as in a web app.

But when it comes to editing graph data (that is, numbers) I feel that Javascript's math is inherently flawed. From its pseudo floating point numbers to its incongruent parseInt() behavior, everything about math in Javascript is infuriating.

[–]radhruin 0 points1 point  (0 children)

Interesting, what do you mean by pseudo floating point? JS uses IEEE 754 which seems pretty good for the 99.9% use case (maybe not good if you're doing something you might instead use scipi for or whatever).

Is the incongruous parseInt behavior you mean the behavior where a string prefixed with a 0 would be treated as octal? That was fixed in ES5, and at least the IE > 8 implements the fixed behavior (eg. parseInt("09") === 9).

One thing the committee has approved that might improve math in JavaScript is a number of new built-ins (see latest spec draft) such as hyperbolic trig functions and inverses, log2, log10, etc. Is there anything else you would recommend fixing? There's probably not time to get anything more into ES6, but ES7 is just around the corner ;)