

Why I'm Becomming a JavaScript Convert - 3pt14159
http://www.benjamincoe.com/blog/index.php?entry=entry100425-122529

======
jonpaul
I use to hate Javascript. I attempted to build a large enterprise system using
ExtJS... I ran into a number of problems. I then realized that I could
accomplish the same task using GWT/GXT. It was successful. I still don't like
Javascript, but I'm warming up to the idea of embracing it.

It seems to me that with the advent of Node.js and document oriented databases
that use JSON for their document description, such as MongoDB, Javascript will
become the world's most used language. I think Javascript's momentum is
unstoppable.

Time will tell.

~~~
wvenable
JavaScript really doesn't seem appropriate for large software. Much of the
features (like, for example, prototype inheritance) makes for small code but
at the cost of some complexity. Even trying to ensure some measure of
public/private data requires a lot of boilerplate code.

Probably adding the necessary features to JavaScript to make it more
appropriate for these tasks would ruin it for the things it's really very good
at.

~~~
mnemonik
_"Even trying to ensure some measure of public/private data requires a lot of
boilerplate code."_

Just use closures. Thats less code than you would have in many other
languages.

~~~
wvenable
What do you think that boilerplate code is made of? Closures of course. You
simply can't make large scale software using just closures.

~~~
BenjaminCoe
I disagree, regarding JavaScript's ability to scale. It is quite easy to
implement classical inheritance inside JavaScript, public and private methods
really do not seem like a must have to me for code to be 'scallable'. It seems
to me that these concepts are loosely enforced (or not present) in many
popular web languages already.

~~~
mnemonik
Yup, look at Python. Private methods are private by convention (leading
underscore), not because the interpreter enforces privacy.

Python code bases scale easily, in my experience.

------
Kilimanjaro
JS is not perfect but is good enough. It is everywhere and will be used
everywhere in the future, from browsers, to servers, mobile, etc.

Maybe it will be perfected as new versions come along. We should push in that
direction if we feel there are rough spots right now.

I've learned to love it. I wish there is JS hosting solutions as simple to run
as php for newbies. Remember the first one giving such a service, appjet, was
bought by google by millions. There is market for JS on the server.

There is market for JS on the mobile world too. APIs are wonderful, see all
you can do with canvas, svg, websockets, etc. all managed thru JS and you can
do wonders with them.

If the whole iPhone/iPad experience could be accessed using JS apis, it would
grow the ecosystem by tenfold. I hate objective C, but I could easily build a
thousand apps in javascript overnight. No kidding.

JS is here to stay, and I am happy for that.

~~~
BenjaminCoe
Some of the server-side JavaScript stuff is really slick. APE (
<http://www.ape-project.org/> ) runs JavaScript on the server-side, for
instance. You basically write a client and server in JavaScript and it uses
Comet to push events to the client, rather than a JavaScript client needing to
constantly request updates -- a great paradigm, that could lead to much more
robust multi-user JavaScript applications.

~~~
hoggle
"Helma" Framework comes to my mind too: <http://helma.org/>

~~~
mikepurvis
Has anyone here had experience actually using Helma? How does it compare to
other general-purpose code frameworks?

I had it downloaded about a year ago and made a few toy projects, but nothing
serious enough to really give it a proper workout. (And I don't have a VPS to
actually launch anything on...)

------
jayair
I've been in love with JS ever since I started with it in '06. Learnt about
closures, prototypes etc all through it. Loved the FP side of it so much that
I went and read SICP as a result of that.

On a side note I recently wrote up a sliding puzzle in JS as a pre-loader for
Cadmus. Might not be as complicated as the Tetris game but it was fun to write
(and test).

[http://blog.anomalyinnovations.com/2010/04/a-sliding-
puzzle-...](http://blog.anomalyinnovations.com/2010/04/a-sliding-puzzle-while-
you-wait/)

------
mkramlich
For all the positives of JavaScript, I still prefer Python. There are a lot of
similarities, but I give Python higher marks in a few areas. The first one
that jumps out immediately is the lack of requiring "var" in Python variable
declarations. What I'd like to see instead I think is Python built-in to every
major browser as a default language. And/or make it super easy for users to
install runtime plugins for Python, Ruby, etc. that way we're not limited to a
particular language in the browser client.

~~~
baddox
I bet as soon as you attempt to implement a DOM manipulation standard for
Python you'd introduce all the same cross-browser incompatibilities as Java
has. Also, in many ways Javascript is superior to Python. Closures are the
only examples I know of off the top of my head.

~~~
mikeklaas
Python has as much support for closures as javascript. The only significant
feature in this respect that it is missing (that I am aware of) is multi-
statement, in-expression lambdas.

Javascript's syntactic nicety is higher there, but on balance I think python's
is far superior.

Both great languages, though.

~~~
baddox
Last year my Languages instructor mentioned that there was some problem or
incompleteness with closures in Python because Guido didn't want to fully
implement it or something. Perhaps I'm mistaken.

------
arethuza
JavaScript has probably become my all time favorite programming language
(beating Common Lisp and PostScript).

I wonder if anyone has done an OS command line shell with JavaScript as the
scripting language - having commands pipe JSON to each other could be rather
cool.

~~~
jrockway
_Having commands pipe JSON to each other could be rather cool_

<http://en.wikipedia.org/wiki/Windows_PowerShell>

~~~
arethuza
Yeah - I've used PowerShell a lot and while it is a nice idea I sort of find
the overall experience less good than it should be.

For a bit I was doing a fair bit of PowerShell scripting and bash scripting at
the same time and I ended up concluding that I still preferred the Unix
command line. Using JSON as the "standard" data format would seem to me the
ideal compromise between delimited lines of text (Unix shells) and full blown
objects (PowerShell).

------
jasongullickson
I've completed a simular "conversion" myself recently.

After reading "JavaScript: The Good Parts" and with the arrival of things like
Node.js I have come over from being a staunch "C as a first language"
programmer to learning to not only accept JavaScript, but to embrace it, and
the power that comes from becoming proficient in the only programming language
understood by both the web browser and server.

------
ElbertF
I made a Tetris game in JavaScript a while ago, I think it looks better and
works a bit smoother too:

<http://elbertf.com/tetris/>

Source: <http://elbertf.com/tetris/tetris.js>

------
jackfoxy
I recently had an epiphany about JS too. I think Crockford's evangelizing and
the maturing of libraries (especially jQuery) has awoken many to the fact "JS
is what we got to program the client". (I just met someone today at the jQuery
conference from FreshBooks.)

------
zxz
Did you mean "Becoming"?

~~~
BenjaminCoe
Yikes, typo fixed.

