New Comic: 217: Squint Harder
Which reminds me, I need to see an ophthalmologist – I have terrible taste in women.
New Comic: 216: Meet The Boffins
Camel’s back, meet the straw.
New Comic: 215: Puffery
Can puffins be blonde?
New Comic: 214: Love At First Query
A good lesson to learn: Never judge a drink by its
New Comic: 213: Naptime
Science has discovered that you can measure the amount of fun you had based on how long your hangover lasts.
Inkwellian posted a photo:
Lion-O from Thundercats! Warmup sketch using MangaStudio.
Here's a quick example I threw together of a simple Todo app using Backbone.js. It overrides the
Backbone.sync function to persist the tasks to
localStorage. I tried to keep it simple.
I'd really like any Backbone gurus to have a look and make suggestions (or make their own fork) for better collection/view handling. Or to just rework it to show "best practices."
Some questions I have are:
It seems most of my questions are related to Views, huh?
Well, I'll continue to experiment and if I come to any conclusions I'll be sure and post them. But if you are, or know, anyone well versed in Backbone (can't be too many people, at this point) I'd really like some feedback.
You can see it below, or here.
Here's some coffee I created so I could use Backbone classes as native CoffeeScript classes:
There are those who say that attaching the data directly to the DOM is fine... But I'm leery of that. Some browsers (notably IE, of course) tend to leak memory when attaching extraneous data to the DOM. Plus, it just feels wrong. There's a reason "Separation of Concerns" (SoC) is a bit of a mantra.
Ideally you'd want to use something like Cocoa's KVC bindings for your UI. But the two main projects that have that as a goal, SproutCore and Cappuccino, are actually trying to implement the entire Cocoa stack on the web. Cappuccino even goes so far as to create a new language (sort of) to do so. Which is great, I guess, if you want to invest the time to learn their huge frameworks. (Don't get me started on their lack of decent docs.)
I should mention that it's not actually an MVC framework in the truest sense. It provides Models, Views, and Collections... MVC actually stands for Models, Views, and Controllers. For Controllers, I think Sammy.js is probably the best Controller framework you'll use.
Why is Backbone interesting? Because it's basically a small framework (~2Kb) that provides the core pieces of KVO bindings.
I'm definitely gonna be digging into Backbone and I'll write up my findings and some examples as I go along.
What's this? Has hell frozen over?
Not exactly. But I am resurrecting my blog. I've included all the old content here to keep some kind of continuity.
I'll be posting my more technical oriented material here. For illustrations, sketchs and other fun stuff, I'll be posting that to zoodotcom.com.