|
|
|
|
|
by hawkharris
4534 days ago
|
|
If learning JavaScript feels like jumping into the ocean and trying to swim for the first time, jQuery is, in some ways, like a motor boat driving beside you. The driver says, "Hey, hop on in. Why learn the basics of swimming when you can start covering ground?" Speaking from experience, failing to learn the foundational aspects of the language in the beginning leads to a lot of poorly organized "spaghetti" code. It took me a lot longer to appreciate concepts such as closures and the nuances of DOM events because I relied on jQuery to do the heavy lifting for me. Having said that, I have a lot of respect for John Resig and his essays / books (i.e. Secrets of the JS Ninja). After taking the time to learn about Resig's functional programming style and the design decisions underlying jQuery, I gained a much deeper appreciation for both the library and plain JavaScript. |
|
I was writing single-page applications just before jQuery was introduced, and I can tell you, my code was spaghetti because I didn't understand OO or functional design patterns. I didn't find jQuery to be a massive improvement in that, because I just linked data to DOM elements and everything was still all over the place.
Backbone forced me to write javascript in a cleaner way, even when I still didn't know what I was doing. I was breaking up my code into better methods and providing a better overall structure to my apps.
Now with Angular, I've taken that a step further to modularizing code, but I don't know how well I would have gotten on with Angular if I hadn't first learned so much from Backbone.