What is the best way to learn backbone.js? Any other alternatives?

I'm just starting to get into backbone.js. It seems like this is pretty attractive and it won’t be something that you can just look at one example and say, “Well, that’s easy!” and start working with him. It really looks good.

The documentation is fine, but I don't really understand the big picture and how all these components work together. The way events are connected and visualized in different representations actually seems like a lot of confusion. I understand the need for separation of problems, but I really wonder if it is too designed.

Essentially ... I will not immediately work with backbone.js. I think that there will be a day or two of training.

What is the best way to get into backbone.js? Just keep on kissing or are there any larger sample download apps looking somewhere?

Are there any better alternatives that might be easier to learn and offer the same benefits? Performance and intuition are important to me. It seems to me that backbone.js works a little alien. It can only be me.

In other words, it might be better to develop my application without a library, such as the spine, and create an organic structure such as backbone.js, but more like something that is intuitive to me and something more that is related to the resulting code base

I am trying to get simple examples to work with my own code, and I have no Javascript errors ... but this does not work. There is a good chance that the “one minor thing” is wrong ... but I'm starting to feel that debugging my basic applications can be a problem ... so maybe organically growing my own ability may be the best option for my own sanity, Debugging in the dark, it’s a real productivity killer ... and, to be honest, I would prefer to create my own framework and write my own code if it saves me from endless debugging.

I do not know what to do - therefore I ask.

+59
javascript ajax
May 17 '11 at
source share
4 answers

As with learning many programming-related things, my advice is:

  • Choose a task that you think is suitable for working with
  • Attempt to complete this task.
  • If you find yourself stuck, show the code you have and explain what you think is going to happen. Make sure you check the documentation to see if your functions are working as you expect.
  • As you progress, people will also show you more standard and effective ways of doing things.
  • Keep doing this until you find out how it works.
  • Now carefully review the documentation to help you fully understand how it works as a whole while continuing to ask questions.
  • Pretty soon you will answer more questions than asking them.
+27
May 17 '11 at
source share

I came across an amazing book, Backbone.js Application Development by Addie Osmani. Addy clearly explained MVC by writing modular code, testing JS code using jasmine, and more.

EDIT:

There is an open source version of the same book .

+11
Jun 17 '12 at 7:15
source share

Partly answer your question. I had the same problem and was also about to give up. None of the examples worked, I later suggested that you should place all your base javascript at the end of your document so that your page loads and the spine can work with it.

Underline, then trunk
I think the best way to do this is to first view the underscore.js documentation once. You will get an idea of ​​what is at stake, the backbone.js documentation does not explain the underline material. So you are sure to be confused about what it is. But as soon as you know what is underlined, then backbone.js will start to make more sense.

Also, after training the founder of a pair of my colleagues at work, I realized this.
There are 3 parts to learning Backbone.js - His subjective opinion:


1) You need to know JavaScript (and not just the use of jquery, but, for example, what an object is, how functions work, what context, how it works in javascript - if you do not know javascript well, you will be somewhat lost.

2) There are things that you should just guess and memorize - this is how structures work, this is how the base application is configured. Consciousness at first does not make sense, just study them by heart.

3) Other things that you will need to understand what is really happening.

It takes time to figure out which of them is 2, and the third is 3, and it is when someone who worked on the frame teaches you that you will get a pick-up very easily. Again my subjective opinion.

If you are looking for something and working in a very short time with a lower learning curve, try Knockout JS , you will pick it up as soon as possible.

+8
Mar 07 '12 at 23:52
source share

I always find that I learn new things much easier with the help of screencasts. It may be a visual recognition, not sure. Anyway, I found the appropriate Peepcode screencaps to be very helpful in understanding the basics and ideology of Backbone.js. I hope they help you too.

+5
Nov 18 '11 at 11:19
source share



All Articles