I'm a reasonably experience programmer (10+ years), and have only hacked JavaScript. I don't feel comfortable writing more than a few lines of it, but I'm seeing it more and more unavoidable to learn properly.
I get the same feeling writing JavaScript as I first did writing Unix shell scripts. I d开发者_运维问答idn't fully understand the environment, where things are going, and so forth. It took a few well-timed suggestions to sort it all out.
I have a hard time with Js tools. I'm okay with almost any text editor, but is there anything other than alert('foo') and Firefox error console to see what the heck is going on?
Ps. I have bought books. Yes, I can write code snippits, but nothing sufficiently explained the whole paradigm. It's all code snippits, with no larger picture of how to integrate it architecturally with server side scripts, and not have to duplicate everything on the server side.
Maybe that's the answer. . write some on the server side?
edit:
tl;dr AMA OO PHP programmer. how do I quickly and completely grok javascript/jquery?
This article might be helpful to you: Organizing A jQuery Application. It dissects a non-trivial jQuery application and explains how to architect a whole JavaScript application (as opposed to code snippets). You can download the code there, and sing along.
Learn to use the console tab of Firebug, including breakpoints. It's a simple and powerful way to see what's actually going on in your scripts.
Firebug also gives you a JS command line to work with, which is a great way to experiment with short snippets and see what they do.
http://getfirebug.com/javascript
精彩评论