I need to learn Prototype.js for work, could use your advice

Hi,

The engineering team at my new job uses Prototype.js and I will eventually need to pick that up. I currently have minimal javascript experience. Can I dive into a Prototype tutorial, or should I learn vanilla javascript first? The Backbone resources here in Learn seem great- Perhaps I should work through those tutorials? Are Backbone and Prototype similar or equivalent?

Any advice on how to best educate myself on this is appreciated. Thank you.

Backbone is different from Prototype, it’s meant to do a different thing. Prototype is closer to jQuery or Mootools in that its primary functions are DOM manipulation and abstracting AJAX behavior. I would avoid Backbone for the time being, as it’s a lot to digest, in favor of focusing on plain JS and Prototype.

(edit: this is assuming that your project at work is not also using Backbone)

1 Like

I would say focus on learning prototype. Its a layer of abstraction built with javascript. While it is a good idea to learn vanilla JS it is not required to be a master or be even decent in vanilla to learn prototype or any other javascript library. Just like you can learn jquery before you know what magic power something like below.

    $( "#target" ).click(function() {
  alert( "Handler for .click() called." );
});

In any case just dive into the framework you need. You will be able to pick up the vanilla javascript portions you need as you go. Much like you learn some Ruby while learning Rails but it is not required that you know Ruby very well to learn and use basic functionality in Rails. However I will say this, knowing vanilla javascript, much like knowing Ruby in depth in Rails, will be very useful later on and while building more advanced application. It will just make those pieces of black magic seem less like magic and more like a really cool solution that you understand.

So learn prototype so you can get up and running at your job and then go back and learn more about what powers the magic.

1 Like