Author Archives: David Sulc

Rendering a view after multiple async functions return (using promises)

In the last post, we saw how to use jQuery’s promises to render a view once data had been returned from an asynchronous function. Let’s take the concept a little further and see how we could render the view only … Continue reading

Posted in AJAX, Backbone.js, Backbone.Marionette, jQuery | 2 Comments

Using jQuery promises to render Backbone views after fetching data

So I’ve been working through Brian Mann’s Marionette screencasts at Backbonerails.com. They’re absolutely top notch material, and I can’t recommend them enough. So if you want to learn how to go about building large Backbone applications (even if the back … Continue reading

Posted in AJAX, Backbone.js, Backbone.Marionette, jQuery | 2 Comments

Tutorial: Nested views using Backbone Marionette’s CompositeView

A reader recently asked me how I would go about using Marionette to create an accordion like Twitter’s Bootstrap collapse component. In this post, I’ll not only give you my take on the answer, but also guide you through my … Continue reading

Posted in Backbone.js, Backbone.Marionette | 5 Comments

Tutorial: a full Backbone.Marionette application (part 2)

In the previous post, we started writing our application (see it live!) and now have a functional app, even if it still is somewhat basic.

Posted in Backbone.js, Backbone.Marionette | 5 Comments

Tutorial: a full Backbone.Marionette application (part 1)

In previous posts, I introduced you to Backbone.Marionette which provides many niceties to help you build complex Backbone.js apps. We’ll cover more advanced topics here, such as Backbone.History, modal windows, organizing code into sub applications, and more. The resulting app … Continue reading

Posted in Backbone.js, Backbone.Marionette | 12 Comments

A simple Backbone.Marionette tutorial (part 2)

In the previous post, we started building a simple cat leader board (see it live!) and got all the way to displaying the list of cat names. Let’s finish and get to the result!

Posted in Backbone.js, Backbone.Marionette | 6 Comments

A simple Backbone.Marionette tutorial

In this series of posts, we’ll cover writing a simple Backbone.js application as a primer. You can see the live result here. The original application is at https://github.com/ddellacosta/backbone.js-examples/tree/master/collections3 and all design assets (CSS, images, etc.) are from there. This tutorial … Continue reading

Posted in Backbone.js, Backbone.Marionette | 12 Comments

Leveraging the Ruby language for code readability

Recently, I created a rake task to load dummy data into a Rails app. I wanted the data to be somewhat random to make it easier to spot design issues depending on data being filled in or left blank. But … Continue reading

Posted in Ruby | Comments Off

Rake tasks, arguments, and external scripts

I’ve previously covered how to use an external script from within a Rake task. This time, we want to be able to pass an optional argument to our task, that will be used within our external script, too.

Posted in Automation, Rails | Comments Off

First steps with Popcorn.js

Mozilla’s Popcorn.js enables developers to manipulate content in relation to a video: display/hide elements, manipulate a timeline, or simply execute arbitrary code. The advantage this technique has over simply timing the triggered events, is that it is fully synchornized with … Continue reading

Posted in Uncategorized | Comments Off