Does using a framework prevent me from mastering JavaScript?

前端 未结 13 2152
梦谈多话
梦谈多话 2021-02-06 04:09

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 frame

13条回答
  •  长发绾君心
    2021-02-06 04:46

    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

提交回复
热议问题