Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4870

Please help shape my mental model around Ember Resources

$
0
0

Hi folks,

I’m exploring using Resources in an app to get a better understanding of the idea behind them. I’m using @NullVoxPopuli 's NullVoxPopuli/ember-resources.

I have 2 questions that I’d love some insight on as I’m not sure I’ve quite got my mental model straight around this concept.

  1. What is the fundamental concept of a “Resource” intended to represent? Is it a network request? Is it a particular piece of data? I’ve seen an example of a generic data fetching Resource but likewise seen an example of a checkbox Resource. Help me crystalize my mental model around this please.

  2. Is a Resource intended to be passed around or just interacted with in its invoking component? The Resource is tied to the lifecycle of the component that creates it which makes me wonder whether it’d be a good practice to pass it around to other components. I suppose it’s pretty common practice to pass around ember-concurrency tasks, so maybe the same applies to Resources too. Can someone clarify this for me please?

Thanks in advance for any insight and clarification you can provide me on this :smiley_cat:

4 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 4870

Trending Articles