Here’s a gist combining Backbone.js views and routes with API-driven tables from datatables.net. HTML not included, but it should be fairly obvious what’s going on here… a simple app for browsing auction listings. … Enjoy!
In this Backbone.js recipe, we’re going to allow updating a view via events triggered from any sub-view. The view won’t need a refresh(), because it will be bound to model change events using Rivets. tl;dr; live demo and gist
Here’s a quick fiddle that shows how to route a command between sub-views no matter how they’re nested in the DOM. Basically, when a sub-view is rendered it triggers a subscribe event that’s captured by the application view which then sets a delegate on another sub-view. This other sub-view is the source of the events, […]
Here’s a tip for those of you using express as your node.js web framework. If you need a date library for pretty-printing in various date formats, do NOT use the Datejs library. It adds something toxic to the stock Date object that confunds express’s session cookie expiration date. You’ll never be able to keep anything in […]