views:

385

answers:

13

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?
A: 

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.

Eli Grey
unless you use a framework that actually helps you explore the DOM more easily, like Sarissa ;-)
Abel
Yeah... Framework use and DOM knowledge are orthogonal, unless you're relying on a framework that abstracts away the DOM entirely.
Shog9
+1  A: 

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.

Bob
That's nomenclature confusion. I see no reason to believe that in those cases jQuery itself is preventing the learning processes, so much as the marketing and common perception of jQuery.
Breton
**jQuery isn't a framework**. It's a library, a rather popular library, and some folks *wish* it was a framework... I, for one, am glad it is not: I enjoy being able to add and use jQuery in any JS project, without worrying about restructuring the whole thing to fit the mental model of some framework designer.
Shog9
Indeed it is not a framework, but many people consider it one. Perhaps it's a framework by reception? Chances are that the asker is not aware of the distinction. Any which way, if you look at the silly questions newbies ask about JS *without* any library or framework, you might think that learning JS will make you a worse JS programmer...
Abel
isn't jQuery a language?
Ciwee
@Abel: actually, I doubt most of those newbies even bothered to learn the language. There's a long tradition of using JavaScript by hacking on terrible example code *first*, asking questions *second*, and reading documentation only as a last resort... But I do agree with Bob's point regarding the cluelessness surrounding jQuery - in fact, I attribute this to the proliferation of **actual frameworks** leading newbies to view them as the only proper form of library. Which is a shame.
Shog9
+4  A: 

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.

Vincent Ramdhanie
+1 ... I just had to tip you over (9,999) (and a good answer)
alex
1UP alex. Vincent, rep-wise, you're in the top 400 as of today.
micahwittman
Thanks Alex and micahwittman. I was anxiously watching the 10K getting closer.
Vincent Ramdhanie
A: 

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.

Breton
+11  A: 
Abel
+1 good answer sir
alex
+2  A: 

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.

Dmytrii Nagirniak
I'm not so sure about the advice in your summary.
Breton
I don't know about it. I took a JavaScript class in college and was tired of browser issues by the midterm. If I ever have to do something harder than FizzBuzz in JavaScript, I'll use a framework.
MiseryIndex
I *am* sure about the advice in the summary: *don't follow it up.* In general I believe people better use the tools available to ease their job, instead of making it harder by avoiding them, introducing more bugs, blocking advances and frustrating the whole process by having to invent the wheel again.
Abel
This is wrong. My advice is to use a framework if a good one exists. What is you goal: to produce something or to learn. I am sure you know what your employer wants.
joerage
Guys, I probably was not too clear. I updated the answer a bit. My point is that you should NOT overuse Frameworks. We **do not need** Framework to get element by id, we don't need a framework to parse string with RegEx.
Dmytrii Nagirniak
**@Dmitriy:** I agree wholeheartedly with that comment. If your answer had consisted of nothing but that last sentence, I would be up-voting it as well!
Shog9
@joerag, I do not discourage using Framework/library. I encourage to use the **right too for the job**. Also the question is not about using or not a framework. The question is about using framework to learn JavaScript.
Dmytrii Nagirniak
**@Shog9**, well, I just wanted to put all that into context. Been downvoted for that :(
Dmytrii Nagirniak
I like this answer now. Still too damn long, but oh well. It's the only one here I really agree with. Good work actually reading the question... (but see where that got you ;-P )
Shog9
What for do you need these votes? Are you trying to win some presidential campaign? Heh! =) Well, yes, I like this having been said: <b>avoid using Frameworks unless you cannot do the job without it or the effort of doing the job without a Framework is TOOOO high</b>. But how come people who were newbies once (thus weren't in business yet, so had a lot of the luxury to just learn) haven't invented their own frameworks? Were they born already enough masters to not be such kind of newbies ever and to not get their hands dirty with hand-coding in order to truly undrestand JS? Huh? Fantastic! =)
David Gore
@David Gore, you can trully understand JS when doing some real project, you don't need to write a framework, you need to start doing something using plain JS, then you will start facing issues. To solve them you will use frameworks or apply you own workarounds. This is how you develop experience and knowledge. Reading a book about JS is just not enough. Using a Framework will affect 2 things: 1. How much you will learn; 2. How productive you are. Choose what you need more.... As for the voting: it shows me how good my answers is, so is important for me.
Dmytrii Nagirniak
No need to describe when it's time to call for frameworks... I am talking about applying *your own (i.e. self-developed) workarounds*. jQuery, for example, isn't that self-developed workaround, and many people use it. The question is how come they haven't had their own ones?
David Gore
BTW, as for votes, kinda prep school way with stars? Who won more stars? =) Just kidding. Never mind! =)
David Gore
@David Gore, "*how come they haven't had their own ones*". No need to reinvent the wheel, especially so complicated. My suggestion was to learn JS by building a real product. Be it a framework or any kind of JS application. And saying build your own Framework I don't mean to reimplement jQuery, Prototype etc. I mean building a Framework for your application so you can reuse it again and again. Lots of devs have such Frameworks developed for themselves. I'll add explanation of what I mean in a second.
Dmytrii Nagirniak
Well, Moscow was not build in a day. Piece by piece such a thing like a framework, IMHO, must be developed by everyone while crawling one's way through the maze of the JS language. It is not about reinventing the wheel (what a buzz phrase!), it is about researching every novice should devote to the language. That's it, and nothing more. =)
David Gore
A: 

I think it depends what your end goal is.

Either you learn a technology in dept, and you will master it, and produce better code than if you only know it just enough. The problem is it takes time, which you don't often have in business. That is why frameworks come in handy. You don't know as much, but you can do a lot.

The other option is to learn just enough to do your task. That is often good enough. With all the technologies we need to know and learn, it is more important for a developer to be more versatile than knowing a technology as javascrip in depth.

joerage
A: 

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.

dylanfm
A: 

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.

duffymo
A: 

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.

stereofrog
+3  A: 

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

Rob
A: 

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.

kennebec
+1  A: 

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.

MillsJROSS