How would I become a master of JavaScript if I always used frameworks and did nothing by myself?
I asked a question on JavaScript and everyone recommend that I use framework (which won't show me the real core of JS!) instead of hand-coding.
- Did you code your own so-called frameworks when discovering JS for yourself?
- Did you use frameworks like jQuery all the way?
- Could you now consider yourself to be a master of JS?
Well, maybe you could be a master of the framework- you are bound to learn something about javascript in the process.
No, frameworks prevent you from learning the DOM, which is not javascript, but a language neutral API designed by committee, and different in every browser in infuriating ways. By language neutral, I mean that it is designed to also be used from Java, VBscript, and potentially other languages.
There's nothing about frameworks that stops you from learning JS itself though. In fact, they will make it much easier to learn JS, by keeping the DOM out of your way.
Javascript, browsers and APIs like the DOM have some bad and tedious qualities. Libraries have been converging on some much better APIs and often relieve you of the need to do things like browser sniffing and so on.
You'll still be using Javascript.
It can also be important to understand what's going on beneath and why certain aspects of libraries are helping you out so much. You never know when you won't have the opportunity to use a library too, so it's important to understand how to do things like interact with the DOM and make cross-browser compatible AJAX requests without a library.
It's a double edged sword. If you have the luxury to just learn then you could avoid the frameworks and do everything by hand. Frameworks tend to make you more productive since it takes care of all the fine details of browser compatibility etc. This is actually an argument that goes on about all levels of abstraction.
I would suggest learning the framework and taking the time to learn the underlying concepts that the framework abstracts away.
Joel has a very nice article about this.
No, as you need to know JavaScript to use a framework and using JavaScript more and more helps you master it. They will prevent you from mastering the DOM though.
Personally, I think that something like jQuery can raise your game as a JavaScript programmer if you look at it as an opportunity to study how John Resig thought about design and implementation.
His unobtrusive JavaScript style is worth emulating.
By all means, use jQuery. But also read it, study it, emulate it.