Learning JavaScript… Should I skip straight to the good stuff (the frameworks)?

后端 未结 9 1542
小蘑菇
小蘑菇 2020-12-30 15:48

I learnt HTML/CSS a good few years back, then PHP a little later. I\'ve recently become interesting in web development again, just started playing with frameworks like Djang

相关标签:
9条回答
  • 2020-12-30 16:25

    What makes you think that the frameworks are the good stuff and the JavaScript is not?

    If you ask me, I will say that JavaScript is a real fun language and you should learn it first. JavaScript has received bad rap because it was mainly used for browser scripting and those browsers were buggy making people think that JavaScript sucks.

    Crockford says that JavaScript is the world's most misunderstood language.

    If your prior experience is with PHP (or any non functional language for that matter), the concept of 'first class functions' will really give you an 'aha' moment. 'Closure' will be another tool which will simplify your code and will make you wonder why all languages don't have it. Prototype inheritance will show you that there are alternatives to OOP. I would definitely suggest that you learn JavaScript first before you jump to any frameworks. I must add that you will also have to learn the concepts (first class functions/closure/prototype inheritance), to use any JS framework efficiently as all frameworks exploit the features of JavaScript.

    To learn JavaScript, get Crockford's 'JavaScript, The Good Parts' book and try to learn the language using a standards compliant browser (say Firefox [with FireBug], Safari, Chrome) without focusing on DOM manipulation. This presentation by Simon Wilson is also good.

    Once you have a good feel for the language, move on to the next step i.e. manipulating the DOM. I would personally suggest that you try to do some DOM manipulation using bare bone JavaScript to get better understanding of the DOM and the pain points involved. [E.g., when I attach a method to onClick of event, 'this' doesn't refer to what I think it refers to?]

    After you have suffered a little bit of pain by doing DOM manipulation by hand, move on to a JavaScript framework which removes all the pain and makes JavaScript fun again. Personally, I would highly recommend jQuery over other frameworks.

    And if you have any questions while on your JavaScript journey, you can always ask them on SO! :) Good luck.

    0 讨论(0)
  • 2020-12-30 16:26

    I wouldn't touch any framework in any language until I have good basic understanding of underlying technology. Worth type of coder is one that uses tool without a knowledge. JavaScript has somewhat sad history but in its latest incarnation it's surprisingly powerful and even fascinating language. I say - learn it well, then use whatever framework suits your current needs

    0 讨论(0)
  • 2020-12-30 16:27

    Starting with the basics of JavaScript is a good idea, IMHO.

    Read JavaScript: The Good Parts, by Douglas Crockford. Very, very good book.

    Cover for JavaScript: The Good Parts by Douglas Crockford

    You should also check out Douglas Crockford's web site.

    I also had to come back here and mention this in an update:

    Douglas Crockford presented an illuminating talk about JavaScript - past, present, future - at the Microsoft MIX10 conference earlier this year. You'll find the full video for Crockford's talk at Microsoft MIX10 - The Tale of JavaScript. I Mean ECMAScript.

    0 讨论(0)
提交回复
热议问题