Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    > Does it have memory management?
JavaScript has memory management; JavaScript has a garbage collector. If you structure an app (with any library) not to leak references, then no manual memory management or bookkeeping is needed. Not having additional memory management is a feature, not a bug.

    > Does it provide a pub/sub pattern?
Yes. That's Backbone.Events, which is the core how models work with changes, and can be mixed in to any object.

    > Does it handle views/nesting subviews and layout management? 
Right -- your UI and your HTML is your business. Not having an explicit view hierarchy or layout paradigm is part of the reason why Backbone Views can be used in the kinds of diverse environments you see in that list of examples ... from "enhanced" static pages like Pitchfork.com, to interactive SVG-based graphics like SeakGeek's stadium maps, to multiplatform hybrid web/native views like LinkedIn Mobile.

That said, if you think you've got an idea for a "layout" feature that would help with UI across the spectrum, it would make for a great pull request.



> > Does it have memory management?

> JavaScript has memory management; JavaScript has a garbage collector.

The problem with javascript apps is not leaking memory, it's forgetting to unbind events and/or binding events multiple times.

Angular.js and Knockout.js relieve you of this problem because they handle all the event binding so you don't have to worry about it.


  If you structure an app (with any library) not to leak references
But that's boilerplate.

  That's Backbone.Events, which is the core how models work with changes, and can be mixed in to any object.
But it's messy out of the box for other parts of your app without boilerplate. You need to structure your events somehow. It doesn't take much code and the libraries that I recommend are very small.

I don't think Backbone necessarily needs more features. It's great for certain sites that uses Backbone in limited ways. I'm talking about making an entire website end to end in Backbone, something that most of your examples do not try to do. But if you're making a whole app in backbone, not just a feature or a widget, something with many many routes and regions that swap nested views constantly, you'll need a bigger library.

So, backbone alone is fine for apps that's mostly traditional / server based, with some client side features. If the entire app is built in backbone then you'll want to build on top of it. There are many many frameworks popping up around Backbone and they should be supported by Backbone. Developers clearly need them or else there wouldn't be so many of them.


I'm not sure if this is something that could be helped with some doc changes, but it took me awhile to figure out that pubsub is exactly what Backbone.Events gives you. And even then, I only figured that out from reading tbranyen's code.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: