Encapsulate Relationship Logic In Your Ember Data Model

Monday, February 20th, 2017

One technique I often like to do when I am refactoring is move relationship logic outside of an action into the Ember Data model behind a custom method. Here’s an example:

Read More

Managing Concurrency in Angular Components with ES6 Generators

Saturday, February 18th, 2017

One idea I’ve been been experimenting with in an Angular 1.5 application I’ve been working on is using ES6 generators to manage concurrency in components.

Read More

Computer Science in JavaScript - Selection Sort

Tuesday, February 14th, 2017

My academic background wasn’t computer science. If you’re like me, you’ve probably been asked an algorithm question in an interview and had to stumble your way through it. I’ve been there. Nowadays, there are many companies that don’t ask algorithm questions in interviews, which begs the question, should you learn them? For a lot of web developer jobs, you probably won’t use them much, if at all, with the exception of the occasional interview. However, as I’m learning them, I’m finding algorithms to be a fascinating topic and worth learning for the intellectual stimulation.

The goal of this series is to cover traditional computer science topics through the lens of JavaScript.

Read More

Cascade Deleting Relationships in Ember Data

Friday, February 10th, 2017

In Ember Data, if you delete a record from the store, related records are kept in the store. Let’s say you have the following models:

Read More

Updating Relationships Independently in JSON:API with Ember Data

Friday, October 28th, 2016

In JSON:API, relationships can be modified when updating resources. For example, if you wanted to add or remove tags from an article, you could make a PATCH request to /articles/:id with the following request payload:

Read More