Does using a framework prevent me from mastering JavaScript?

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

    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.

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

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

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

    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.

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

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

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

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

    • How to conduct arithmetic operations in JQuery?
    • jquery code produces not defined error

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

    0 讨论(0)
  • 2021-02-06 05:00

    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.

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