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:
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.
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.
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:
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: