Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting javascript development - what to do?

Tags:

javascript

What it a good starting point for learning javascript? I'm a well versed C and Java programmer and I have some decent experience in C++, so I'm looking for a few suggestions:

  • What is some good reference material?
  • Is there a particular IDE/editor that is worth looking at? I use vim for C/C++ development and I used IntelliJ Idea for Java. I'm limited to either Linux or Mac based tools.
  • How do you debug javascript code? Is it just a series of alert()'s?
  • Am I required to run a webserver to test javascript, or can I load the .js file directly? If so, are there limitations to this approach?
  • Any other advice for a javascript beginner?

Thanks

like image 617
Drew Frezell Avatar asked Sep 17 '08 13:09

Drew Frezell


People also ask

What should I learn before starting JavaScript?

You are advised to work through the following modules before starting on JavaScript: Getting started with the Web (which includes a really basic JavaScript introduction). Introduction to HTML. Introduction to CSS.

Can I start with JavaScript as a beginner?

JavaScript is beginner-friendly Compared to many other programming languages, JavaScript offers one of the more beginner-friendly entry points into the world of coding.


2 Answers

I think that there are a lot of good answers here with a lot of good suggestions, however, I also disagree with most of the answers that say "start learning with jQuery." I'm passionately against learning a framework for a language before learning the language in which the framework is implemented. You're automatically creating a level of abstraction for yourself. Knowing the language prior to learning jQuery or any other framework will help enhance your ability to understand what the framework is doing, how to write better code, and how to implement a feature into the framework that you wish was there but isn't.

With that said, here's a set of resources that I have found to be extremely helpful in learning JavaScript (some of them have already been mentioned):

Websites

Books

  • Head First JavaScript. This book is really good at getting you up to speed on the synxtax of JavaScript and what it's capable of without getting you bogged down into the technical implementations of the language. It also helps connect the dots between JavaScript and the DOM.
  • JavaScript: The Good Parts At approximately 150 pages, this is a relatively easy read that explains the good parts of the language and the bad parts of the language. This book will make you a better JavaScript programmer by staying away from the 'awful parts' of the language while also helping you to stick to the good parts and writing more clear, maintainable, expressive code.

Videos

  • Douglas Crockford's videos on "Advanced JavaScript" (1, 2, 3)
  • Douglas Crockford's video on "JavaScript: The Good Parts"

Frameworks

  • jQuery. This seems to be the favorite around Stack Overflow. I've done some work with it and it really is a good library.
  • Prototype. This is another library that I enjoy using. It's class creation and inheritance support are nice as well as its API.

IDEs

  • Aptana Studio is the best JavaScript IDE that I've ever used. It has all of the features you'd expect from a powerful IDE with respect to JavaScript.
  • Notepad. You don't really need anything other than a web browser and text editor for writing JavaScript, so if this floats your boat, then go for it.

Yes, there are more websites, books, and videos that can help you get started, but for someone that has a programming background, I can't imagine that picking up JavaScript would be utterly difficult. Additionally, there are other frameworks available, but jQuery and Prototype are the ones with which I'm most familiar and have found them to be really useful.

like image 77
Tom Avatar answered Sep 21 '22 18:09

Tom


Try your best to learn it WITHOUT relying on a library first. Since you have background in C, its going to be a quick learn for you, so do so without being flavored by jQuery or Prototype. Learn to build a good XMLHTTP Request, manipulate the DOM, build your own objects, etc etc. Once done, look at all the libraries and see which suits your needs the best.

Always test in the latest browsers, and then work your way back.

If you're a very visual learner, the Head First series is good.

like image 43
user16169 Avatar answered Sep 18 '22 18:09

user16169