Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does using a framework prevent me from mastering JavaScript?

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.

  1. Did you code your own so-called frameworks when discovering JS for yourself?
  2. Did you use frameworks like jQuery all the way?
  3. Could you now consider yourself to be a master of JS?
like image 824
David Gore Avatar asked Nov 27 '09 01:11

David Gore


4 Answers

Yes: frameworks tend to hide many complex parts of JavaScript. But the question is, do you become a worse JavaScript coder when you know how to use it efficiently with the framework? Of course not. Using a subset of any programming language efficiently is often better then using every asset of a language poorly.

No: frameworks tend to hide many complex parts of JavaScript. Using a framework, looking through its code while debugging, understanding the framework makes you a real master at JavaScript. Frameworks often show methods you'd have never thought of yourself. Look at the code. It's often well commented or even documented, and become a master.

So: use JavaScript frameworks to make coding easier and learn in the process.

**PS:**To answer your last question. I've done JavaScript programming since its appearance in the early days of Netscape. Yes, most certainly we made our own home grown frameworks and libraries. Sarissa is one such "framework" (or a library) for JavaScript that I actively helped develop. But don't we normally put together often-used functions when writing in any language, which might eventually evolve into a framework?

Updates: just fixed some terrible typing mistakes, don't bother a reread ;-)

like image 194
Abel Avatar answered Sep 17 '22 12:09

Abel


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.

like image 43
Vincent Ramdhanie Avatar answered Sep 21 '22 12:09

Vincent Ramdhanie


I'm torn, I started coding javascript back in the days of Netscape Navigator 4 and Internet Explorer 5, back in the dark ages of browser standards compliance and long before jQuery or MooTools were even conceived of. It was common practice to have to either wrap nearly every line of code in (document.all) ? /* ie code */ : /* nn code */; or maintain separate scripts for each browser. While extremely frustrating, I definitely think it made me a better programmer.

But new programmers have much better tools available, and they should use them. You'll still need to learn javascript, jQuery doesn't write code for you, but it's going to let you write code rather than spend hours developing browser workarounds.

More knowledge never hurts, if you have time to learn about the javascript dom methods and experiment. It's not nearly as painful as it used to be, most scripts, even large, complex ones, will work in all modern browsers with just some minor trickery. I also think it's important to understand what exactly jQuery is adding, so that you realize that this is a jQuery method and not part of javascript. Solely relying on a library to always be there isn't a good thing, because some day you'll find yourself in a position where you can't use it and you don't want to stare at your boss blankly like a deer in headlights saying "huh what do you mean i can't use jquery?".

like image 21
Rob Avatar answered Sep 19 '22 12:09

Rob


Did you code your own so-called frameworks when discovering JS for yourself?

Yes. This is hard road but very useful for personal education.

Did you use frameworks like jQuery all the way?

Yes. But when it is really necessary.

Could you now consider yourself to a master of JS?

No. There are so many things to learn, especially in the context of evolving web standards and browser.


The reasons to use JavaScript frameworks are simplifying tasks such as:

  • Cross-browser support
  • Work with browser's Document Object Model
  • Implementing rich User interfaces
  • etc

So in terms of learning JavaScript Frameworks are not preventing you from beeing a JS gury.

But in terms of a real world JS is always used with things like DOM, CSS etc and without understanding it you cannot be real-world JS guru-dev.

So you can learn plain JavaScript and use framework, yes, yes, you can. But this will be out of a context and almost useless.

As a result, you need to learn not only the JS as a language but JS for the web.
And the Frameworks prevent from doing it.

So to summarise: avoid using Frameworks unless you cannot do the job without it or the effort of doing the job without a Framework is TOOOO high.

In regards to effort. It includes cross-browser support. So, for example, if I need to implement a page that will use AJAX or should allow user to drag&drop items on the page, there is no way for me doing it manually (the effort is way to high). I'll pick jQuery or something else for that.
Just pick the right too for the job. No tool is also a tool.


ADDED: The main question was:

How would I become a master of JavaScript if I always used frameworks and did nothing by myself?

You can take the hard way - develop your own framework and keep it up-to date. You will face all the possible issues and will be enforced to understand all the hidden pieces. You probably will not want to reimplement jQuery, but instead create a busines related Framework. Example of such could be a "ProductJS": providing architecture for developers to manage products on your web-site, comment them, compare and so on.

like image 36
Dmytrii Nagirniak Avatar answered Sep 21 '22 12:09

Dmytrii Nagirniak