4 ms·
So, how does one become a good, non-spaghetti-code javascript developer for the web? I don't really like js so far, but there are just no alternatives in some
by perlgeek 16y ago
So, how does one become a good, non-spaghetti-code javascript developer for the web?
I don't really like js so far, but there are just no alternatives in some cases. And my code ends up like those counter examples. Where can learn how to organize it properly?
- ionfish 16y agoJames Coglan has written a lot [1] about these issues. His series on evented programming [2] is a good place to start. [1] http://blog.jcoglan.com/ http://blog.jcoglan.com/ [2] http://blog.jcoglan.com/2010/02/21/events-theyre-not-just-for-the-dom-you-know/ http://blog.jcoglan.com/2010/02/21/events-theyre-not-just-fo...
- DanielRibeiro 16y agoNo alternatives? Coffeescript is always an alternative to js: http://jashkenas.github.com/coffee-script/ http://jashkenas.github.com/coffee-script/
- bcrescimanno 16y agoCoffeescript "compiles" to JS--so it's not an alternative to using Javascript; just an alternative syntax for writing javascript.
- DanielRibeiro 16y agoCoffeescript is a different language though. It has different grammar, different keywords and so on. It shares the same object model, and it is usually used on compile form. There are other alternatives as well[1], such as: - LLVM languages: http://syntensity.blogspot.com/2011/04/emscripten-10.html http://syntensity.blogspot.com/2011/04/emscripten-10.html - HotRuby: http://hotruby.yukoba.jp/ http://hotruby.yukoba.jp/ - Smalltalk: http://clamato.net/ http://clamato.net/ - Haxe: http://haxe.org/ http://haxe.org/ - Mascara: http://www.mascaraengine.com/ http://www.mascaraengine.com/ And so on. Coffeescript is just closer to javascript than most alternatives. But it is a different language, and a nicer one in my humble opinion. [1] https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS https://github.com/jashkenas/coffee-script/wiki/List-of-lang...
- bcrescimanno 16y agoI disagree that any language that "compiles" into another language can be considered an "alternative." I'm not bashing CoffeeScript; I haven't played with it much and don't know enough about it say anything one way or the other; but at the end of the day, the result is still Javascript.
- dionidium 16y agoWell, yeah, but you might as well say that JavaScript is just an alternative syntax for writing assembly language or machine code.
- chihiro 16y agoUse a good webframework http://ukijs.org/ http://ukijs.org/
- augustl 16y ago> So, how does one become a good, non-spaghetti-code javascript developer for the web? Like everything else: throw a lot of time at it, and have a desire to make awesome things. Other than explicit feedback on written code, there is no one thing I could tell you to help you write better JavaScript for web browsers.
- irahul 16y ago> how does one become a good, non-spaghetti-code javascript developer for the web? Just like anything else, it will take time and active effort. Till then, I suggest work with frameworks which help you structure your code. I use backbone.js and I have heard good things about YUI.
- Ruudjah 16y agoGWT solves it for me while javascript has these problems.
- bad_user 16y agoIMHO, now you've got 2 problems.