Does using a framework prevent me from mastering JavaScript?

前端 未结 13 2129
梦谈多话
梦谈多话 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:42

    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.

    0 讨论(0)
  • 2021-02-06 04:42

    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.

    0 讨论(0)
  • 2021-02-06 04:42

    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.

    0 讨论(0)
  • 2021-02-06 04:46

    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.

    0 讨论(0)
  • 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

    0 讨论(0)
  • 2021-02-06 04:47

    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.

    0 讨论(0)
提交回复
热议问题