Live data from Hacker News

Preventing memory leaks in Backbone.js

paydirtapp.com

21–30 of 36 posts

Re: Preventing memory leaks in Backbone.js

#22
post #17
post #5

Ugh. Examples use Coffeescript instead of universally accessible Javascript. Looks very useful though; I've just started learning about Backbone, and the lack of a "right way of doing things" is disconcerting, coming from a lot of Rails usage lately. It takes me back to the days of doing a lot of stuff by hand. Even without that uncertainty, it's definitely a bit tricky to move to thinking about everything being in t…

@davidw, Just use emberjs and focus on your app instead of boilerplate code. If you are coming from rails, emberjs is opinionated and should fit your style of thinking. Emberjs makes building non-trivial easy while backbone makes building non-trivial apps hard but makes building small simple app easy. People like talking about the size of emberjs but after you finishing stitching together numerous boilerplate code, y…

> use the right tool for the right job

"Backbone is the wrong tool for anything non-trivial" is just hyperbole.

Re: Preventing memory leaks in Backbone.js

#23
Great pointing out that Backbone is deceptively simple. No best practices to be found on backbonejs.org.

Always worth considering using a framework layer like Marionette to help you with architecture. Otherwise you will end up writing something similar to it yourself. Which sometimes is necessary, but not always.

Re: Preventing memory leaks in Backbone.js

#24
post #5

Ugh. Examples use Coffeescript instead of universally accessible Javascript. Looks very useful though; I've just started learning about Backbone, and the lack of a "right way of doing things" is disconcerting, coming from a lot of Rails usage lately. It takes me back to the days of doing a lot of stuff by hand. Even without that uncertainty, it's definitely a bit tricky to move to thinking about everything being in t…

Genuine question : not knowing coffeescript (if that's indeed the problem), do you find it hard to understand what it represents in pure js ?

I find it's a bit of a distraction. I think I know what's going on, but I'm not 100% sure.

Re: Preventing memory leaks in Backbone.js

#25
post #5

Ugh. Examples use Coffeescript instead of universally accessible Javascript. Looks very useful though; I've just started learning about Backbone, and the lack of a "right way of doing things" is disconcerting, coming from a lot of Rails usage lately. It takes me back to the days of doing a lot of stuff by hand. Even without that uncertainty, it's definitely a bit tricky to move to thinking about everything being in t…

Genuine question : not knowing coffeescript (if that's indeed the problem), do you find it hard to understand what it represents in pure js ?

It's hard to make the cognitive leap from coffeescript to javascript, while also trying to grok the actual subject at hand.

It doesn't make much sense for tutorials to be written in coffeescript unless they are specifically coffeescript tutorials

Re: Preventing memory leaks in Backbone.js

#26
post #17
post #5

Ugh. Examples use Coffeescript instead of universally accessible Javascript. Looks very useful though; I've just started learning about Backbone, and the lack of a "right way of doing things" is disconcerting, coming from a lot of Rails usage lately. It takes me back to the days of doing a lot of stuff by hand. Even without that uncertainty, it's definitely a bit tricky to move to thinking about everything being in t…

@davidw, Just use emberjs and focus on your app instead of boilerplate code. If you are coming from rails, emberjs is opinionated and should fit your style of thinking. Emberjs makes building non-trivial easy while backbone makes building non-trivial apps hard but makes building small simple app easy. People like talking about the size of emberjs but after you finishing stitching together numerous boilerplate code, y…

Getting started with Ember is a lot harder than your comment admits. I tried Ember recently and there was still a lot of stuff that was broken including the data model. That would make building a non-trivial app hard.

Re: Preventing memory leaks in Backbone.js

#27
post #17

Earlier quoted context omitted.

@davidw, Just use emberjs and focus on your app instead of boilerplate code. If you are coming from rails, emberjs is opinionated and should fit your style of thinking. Emberjs makes building non-trivial easy while backbone makes building non-trivial apps hard but makes building small simple app easy. People like talking about the size of emberjs but after you finishing stitching together numerous boilerplate code, y…

Getting started with Ember is a lot harder than your comment admits. I tried Ember recently and there was still a lot of stuff that was broken including the data model. That would make building a non-trivial app hard.

What I'm investigating Backbone/Ember/whatever for is a semi-embedded device that will ship with a web interface, so some semblance of stability is a major plus.

Re: Preventing memory leaks in Backbone.js

#30
post #5

Ugh. Examples use Coffeescript instead of universally accessible Javascript. Looks very useful though; I've just started learning about Backbone, and the lack of a "right way of doing things" is disconcerting, coming from a lot of Rails usage lately. It takes me back to the days of doing a lot of stuff by hand. Even without that uncertainty, it's definitely a bit tricky to move to thinking about everything being in t…

Genuine question : not knowing coffeescript (if that's indeed the problem), do you find it hard to understand what it represents in pure js ?

It's not that hard but instead of thinking what code does, i have to think first what that code mean in javascript.

Writing a tutorial / informative blog post in coffeescript is like : Giving an English lesson in Chinese while teacher and students are native speakers of English.

Post reply on HN