Backbone JS: can one view trigger updates in other views?

You might want to have a read of this discussion of Backbone pub/sub events: http://lostechies.com/derickbailey/2011/07/19/references-routing-and-the-event-aggregator-coordinating-views-in-backbone-js/ I like to add it in as a global event mechanism: Backbone.pubSub = _.extend({}, Backbone.Events); Then in one view you can trigger an event: Backbone.pubSub.trigger(‘my-event’, payload); And in another you can listen: Backbone.pubSub.on(‘my-event’, this.onMyEvent, this);

attaching backbone.js views to existing elements vs. inserting el into the DOM

There’s absolutely nothing wrong with the idea of attaching a view to an existing DOM node. You can even just put the el as a property on your view. window.MyView = Backbone.View.extend( { el: ‘#myView’, initialize: function () { this.template = _.template($(‘#myViewContents’).html()); this.render(); }, render: function () { this.$el.html(this.template()); // this.$el is a jQuery wrapped … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)