September 10, 2015 Log No. 401


That totally doesn’t scream “cheap Xanga ripoff” right? I mean, “x” is so 2000. So I just so happen to be talking about my old Xanga this morning (coughwheremytumblrnameisfromcough) and then what do you know, we’re doing a journal app today!

And so it was. It was the first time we were taking a rails project from “rails new” through to the static page, to the js router/views/templates, and it was pretty glorious. All the pieces are coming together, even more so than last Friday with just naked AJAX calls. Now the entire site is one big edit-able asynchronous-able view. I mean, we got to do fancy edit! With input boxes popping up ON THE FLY! Whizzing onto the page practically! I almost got whiplash!

Well, there were some minor hiccups, in which my partner and I got educated in some of the finer points of Backbone async calls. Apparently “reset: true” doesn’t just trigger the “reset” event, it actually (ok so now it seems more obvious) empties and then repopulates the collection with copies of the old objects. So like ship of Theseus, on which Backbone’s stance seems to be very much “NOT THE SAME OBJECT.” (Computers, so literal.) Took us and the TA around 20 min to debug the loss of our collection attribute in that scenario, when the collection was CLEARLY set up in the initialize method. But hey, now it’s a lesson learned I won’t forget!

Leave a Reply

Your email address will not be published. Required fields are marked *