Category Archives: Backbone

Managing A Modal Dialog With Backbone And Marionette

My current client project is using Twitter Bootstrap, and I have to say I’m loving it. It provides a simple way to get started with common layout and design elements, and includes a handful of UI widgets and features that … Continue reading 

Also posted in DOM, Javascript, JQuery, Marionette, Twitter Bootstrap | 29 Comments

ClassyObjects: A JavaScript Class-y Inheritance Example

I recently released a screencast that covers JavaScript Objects & Prototypes on my WatchMeCode site. In this screencast, I go through all of the basics of working with objects in JavaScript, including prototypal inheritance. Toward the end of the video, … Continue reading 

Also posted in Classy Inheritance, Ember, Javascript, Prototypal Inheritance | 3 Comments

JavaScript Performance: Pre-Compiling And Caching HTML Templates

If you’re using HTML templates with a JavaScript application, you need to be caching the template’s raw text and/or pre-compiled version of the template. All of this spawned from a fun thread of discussion on a StackOverflow question. DOM Selection … Continue reading 

Also posted in DOM, Javascript, JQuery, Marionette, Performance | 7 Comments

Composite Views: Tree Structures, Tables, And More

One of the more recent features that I added to my Backbone.Marionette framework is the CompositeView. It’s actually been in the code for a while now, but in a recent version I extracted it out of the CollectionView and in … Continue reading 

Also posted in Composite Apps, Design Patterns, Javascript, JQuery, JSFiddle, Marionette | 23 Comments

Revisiting The Backbone Event Aggregator: Lessons Learned

It’s been a while since I originally talked about using an event aggregator in my Backbone applications. Since then, I’ve encapsulated the “vent” object in my Backbone.Marionette application and I’ve also realized that a lot of what I wrote originally … Continue reading 

Also posted in Composite Apps, Javascript, Marionette, Messaging | 17 Comments

Providing Synchronous / Asynchronous Flexibility With jQuery.when

I’ve quickly become a fan of jQuery’s Deferred / Promise features. They’ve been around for a little bit now, but I only recent started using them and they’ve helped me solve a number of problems with my asynchronous JavaScript code. … Continue reading 

Also posted in Async, Javascript, JQuery, Marionette | 8 Comments

Managing Layouts And Nested Views With Backbone.Marionette

I’ve received numerous questions about managing layouts and nested views in Backbone over the last few months. Until recently, though, I never had a great answer. Many of the applications that I’ve built had a lot of custom code to … Continue reading 

Also posted in Composite Apps, Javascript, Marionette | 18 Comments

Backbone.js And JavaScript Garbage Collection

A question was asked on Stack Overflow recently, and I provided an answer that I think is worth re-blogging here (while cleaning up the text / grammar). My answer goes in to a little bit of the idea behind a garbage … Continue reading 

Also posted in DOM, Javascript, Marionette | 9 Comments

EmberJS: Initial Impressions (Compared To Backbone)

Hey! This article references a pre-release version of Ember.js. Now that Ember.js has reached a 1.0 API the code samples below are no longer correct and the expressed opinions may no longer be accurate. Just keep that in mind when … Continue reading 

Also posted in Ember, Handlebars, Javascript, Model-View-Controller, Model-View-Presenter, Rails, Ruby, Sinatra | 27 Comments

Using jQuery, Plugins and UI Controls With Backbone

Most Backbone applications either use jQuery or Zepto as their DOM manipulation of choice. I tend to use jQuery as it’s supported across more browsers and has more features – though it is a little heavier in terms of download … Continue reading 

Also posted in DOM, HTML5, Javascript, JQuery, KendoUI, Marionette, Telerik, Tools and Vendors | 8 Comments