3

I started out with Rails development, but soon I realized Rails without JS is pretty much useless. So, I am trying to play with JS in my free time.

So, what are the "tools of trade (IDEs if any)" for JS development?

My primary focus is usage of APIs, Ajax etc, so that I don't get lost when I get develop Rails apps which uses JS.

There are many tutorials for using JS for Open graph API or twitter API, but that is to get things done and abstract some feature sets which a beginner should know.

I generally start learning a language by making a calculator, end to end (always works for me). But I cannot make a calculator and use API/Ajax calls.

So, what are your suggestions?

PS: I am aware about Douglas Crockford's video lectures, they are awesome, but I need some thing more concrete.

UPDATE:

My 2 original questions:
1. What are the tools of trade for JS? Like Eclipse:Java::X:Javascript, What is X (multiple Xs are allowed)?
2. What sample app do you recommend for me to start with?

1
  • I code in Notepad++. I recommend you to learn to work in at least one JS library (my choice is jQuery). Commented Nov 15, 2010 at 1:05

3 Answers 3

4

I think the most important thing is: Know your language!

JavaScript libraries are useful, but if your do not know the language, you have no chance of getting something done that cannot be achieved using your library of choice. For example: JavaScript's prototype-system is very valuable and important for building robust applications. I really recommend that you experiment with this before diving into something you barely know. Closures are also very important to understand.

One thing is important, though: Do not spend too much time on browser incompatibilities. This is what most libraries are for. What you need to know is how the language works. Implementation-specific things are not worth learning (in most cases), since somebody already fixed those for you.

@PS: Douglas Crockford indeed does a pretty awesome job on explaining how JavaScript really works. You should keep watching this.


@UPDATE:

  1. I think the X has it's origin in JavaScript's MIME-type: application/x-javascript. My tool of choice for web-development (including JavaScript) is NetBeans IDE. I use it in my workplace and it is very reliable and comfortable to work with. This is subjective (of course). Most other IDE's will do, too.
  2. This is difficult to answer. I will update my post if something comes to my mind.
Sign up to request clarification or add additional context in comments.

Comments

1

(I realize my comments below typically refer to using javascript with regards to websites, so ymmv if you're using js for a different environment, like couchDB)

For an ide, any text editor will do, but I prefer convenient features like:

  1. syntax coloring (because it's so pretty)

  2. (s)ftp plugins - makes saving files convenient

I would probably go with something like notepad++, or aptana studio (although I find aptana to be a bit of overkill at times, but very powerful). Adobe Dreamweaver works nicely too, if you wanna pay. Otherwise, the bare minimum would be notepad and an ftp client (again, with regards to front-end web development work)

For debugging or trying out quick javascript, I find safari's and chrome's built-in development tools handy, but on firefox, it's firebug all the way. Firebug is awesome.

I notice that in my work environment that some people (particularly the business side) use the words javascript and the DOM interchangably, but I find that their attempts at explaining something simply leads to confusion. That being said, if you're writing web apps, I find the mozilla DOM reference to be pretty awesome and used to hit it up all the time before I got familiar: https://developer.mozilla.org/en/DOM

Actually developer.mozilla.org is overall pretty awesome.

Other than that, getting started is simply a matter of learning the syntax. I would probably get used to the syntax first (which should be pretty quick anyways) before I start thinking about other concepts like learning how to prototype and whatnot (which you can look up on this site).

A framework like jQuery is very convenient for various repetitive tasks, but I wouldn't necessarily jump straight into using jQuery without being familiar with the js syntax first.

Comments

0

The most important thing you should learn is jQuery. It is now the de facto standard javascript library.

jQuery is great regardless of what you are doing with it, but since you mentioned AJAX, I'll point out that jQuery makes AJAX stupid easy, because you can do things like this:

$.ajax({
    url: 'some/ajax/endpoint',
    success: function(data) {
        // do something with data
    }
});

Obviously there are a lot of other options you can pass along, but the basic structure is really simple and easy to use.

jQuery also has a really powerful syntax for selecting parts of the DOM and adding events. For example, if you wanted to catch anytime some clicked on an image and tell them the image src, you can do something like this:

$('img').click(function() {
    alert($(this).attr('src'));
});

14 Comments

There's a very good book, jQuery in Action. Helped me shape up on jQuery very quickly.
@zengr: I wouldn't recommend it.
jQuery is JavaScript, so it's silly to say you can "jump directly to it" without learning JavaScript. But by starting out with jQuery you don't have to waste time and energy learning a thousand quirks of how different browsers work. You can instead learn a tiny, simple, easy to use framework that takes care of the browser quirks and focus your time on learning the powerful JavaScript language instead.
+1 for a good recommendation but I agree also with elusive's answer; it is important to first learn the capabilities of straight Javascript to even understand what jquery (and others) offer and how they do so.
@Ben - I didn't down-vote you, but really, "The most important thing you should learn is jQuery"? jQuery can be helpful, as can other libraries, but learning a particular library is (in my opinion) far from the most important thing.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.