0

Looking at ArrayController at the moment I came across two ways of implementing them:

  1. http://awardwinningfjords.com/2011/12/27/emberjs-collections.html
  2. http://trek.github.com

From what I see are the differences mainly in

  • ArrayController.create vs ArrayController.extend
  • In the demo from trek, the data is loaded in the model whereas in the Twitter example it is loaded in the controller.
  • For the option of Twitter, I wonder how to do the routing.

Which one of the twos should one use as a common pattern for that?

1 Answer 1

2

Trek's post reflects the most current best practices as of September 2012. It would be better to follow Trek's examples than the one in the blog post about Twitter.

Sign up to request clarification or add additional context in comments.

3 Comments

and this best practice is still valid or is the twitter one the newer approach?
Trek's is better to follow. I'll clarify my answer
Thanks! Now I need to figure out how to resolve the bug when clicking on a contributer and then go back to 'all contributors' so that the data is not duplicated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.