David Gore
David Gore

Reputation: 185

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?

Upvotes: 9

Views: 1722

Answers (13)

julian soro
julian soro

Reputation: 5228

This is merely my opinion, but I would suggest using both! Here's a guide and why:


For personal projects (e.g. class work, tinkering, or something to add to your JS portfolio), program in pure JavaScript.

Great developers (opinion) learn by doing--and not just at work. They improve their language-specific skills by continuing to program while away from work or class. This is the best time to test things out in pure, or "vanilla" JavaScript. You can break things and it's okay. Your code may not be 100% cross-browser, but at least your lead engineer won't be hammering on you to patch your code for IE8 and older :)


For production code at your job, however, if you're still a budding JavaScript engineer, then I recommend using jQuery.

Why? Ok, so let's back up real quick. jQuery may not be the best tool for every application use case. Your user base might be mostly on mobile devices or in areas of the world with slower connection speeds, so maybe a single-page application framework might be a better choice. It really depends. But chances are, if you're new to JavaScript then you're probably not coding with a JS application framework quite yet.

So, with that said, I recommend using jQuery because it has a long history with JavaScript for the web, is widely cross-browser, uses a very simple select-and-do which reuses your CSS selector knowledge, and you will use it over and over in your career. The big one is the cross-browser support. Programming is simple, and children can pick it up. However developing a JavaScript product which is interpreted in several different JavaScript implementations (the browsers), and on varying screen types, is challenging--bugs will come up. Leveraging jQuery will keep your boss from sending you many bug fixes. Here's a great read on this topic: Things You Should Never Do, Part I by Joel Spolsky


Answers to your questions:

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

No...? Maybe...?! I don't remember honestly. Do a lot of your own projects and you might not need to remember either.

Did you use frameworks like jQuery all the way?

All the way? No. Much of the way? Embarrassingly yes, but you're still building skills while using them.

Could you now consider yourself to be a master of JS?

Even with 3 years of JS development, I still say no. Always. Keep. Learning! With JavaScript being used today on mobile web, servers, databases, and even for native mobile app development (see React Native), there's increasingly more to learn. The JS of 2009 when this question was asked is very different from the JS of 2015 (me typing this), and it's continuing to evolve. But if you keep tinkering, you will be great someday.


So in summary: do both! Most importantly, spend your free time programming with pure JavaScript until you're a JavaScript jedi. Good luck.

Other fun(ny) reads: The Cool Front-End Developer by Matt Zabriskie and The boring front-end developer by Adam Silver

Upvotes: 0

MillsJROSS
MillsJROSS

Reputation: 1239

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

If you did nothing but use a framework, then I don't think you could become a "master" JavaScript coder. If, on the other hand, you look into how the framework implements certain functionality and ask why/how it was implemented, than you can begin to peel back the onion that is JavaScript.

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.

With browser compatibility issues to consider, in general, it's probably wiser to use a framework/library for complicated pieces. Why re-create the wheel? However, if your intent is to actually learn how to do something without the framework, than it's best to say that in your future questions.

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

It's probably the first thing I did. JavaScript, when I first came upon it, was far more different than what I was accustomed to, that I wanted to create a framework that made the code appear more like Java/C#. In the process of doing that, though, I realized that I was being rather silly, and I found I preferred the way JavaScript was handling a lot of things. That doesn't mean I didn't create my own tool set of commonly used functions.

  1. Did you use frameworks like jQuery all the way?

Not at first, but I have used them since. When you have such and such time to finish a project and the deadline is coming down, it's far easier/smarter to use a library/framework. I have had a few problems with them before, and if I hadn't known how/why JavaScript worked, I might have never been able to solve said problems.

  1. Could you now consider yourself to a master of JS?

Of the language, yes. Of the language inside a browser, not necessarily.

Upvotes: 1

Dmytrii Nagirniak
Dmytrii Nagirniak

Reputation: 24078

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.

Upvotes: 3

kennebec
kennebec

Reputation: 104760

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

Well, maybe you could be a master of the framework- you are bound to learn something about javascript in the process.

Upvotes: 0

Rob
Rob

Reputation: 8187

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?".

Upvotes: 3

Abel
Abel

Reputation: 57149

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 ;-)

Upvotes: 14

user187291
user187291

Reputation: 53940

i think there's a confusion between Javascript language, which is simply amazing and worth learning for every programmer, and browser "object models" and css, which are messy, buggy and ugly. A good library in the functional style (guess which one i mean) encourages you to use pure Javascript in all its nicety and protects you from all that dirty and boring browser stuff.

Upvotes: 1

duffymo
duffymo

Reputation: 308743

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.

Upvotes: 0

dylanfm
dylanfm

Reputation: 6345

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.

Upvotes: 0

Breton
Breton

Reputation: 15582

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.

Upvotes: 0

Vincent Ramdhanie
Vincent Ramdhanie

Reputation: 103135

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.

Upvotes: 5

Bob
Bob

Reputation: 99684

Yes, Just look at all the jQuery questions people ask that have nothing to do with jQuery.

There are plenty more, but they are difficult to search for.

Upvotes: 1

Eli Grey
Eli Grey

Reputation: 35830

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.

Upvotes: 0

Related Questions