Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved Store #10

Open
Glavin001 opened this issue Jul 15, 2014 · 7 comments
Open

Improved Store #10

Glavin001 opened this issue Jul 15, 2014 · 7 comments

Comments

@Glavin001
Copy link
Member

Base off of http://emberjs.com/api/data/classes/DS.Store.html

Currently MagicalRecord's [NSManagedObjectContext MR_defaultContext] is the effective store, backed by CoreData.

@Glavin001 Glavin001 self-assigned this Jul 15, 2014
@Glavin001 Glavin001 added this to the v0.2.0 milestone Jul 15, 2014
@Glavin001
Copy link
Member Author

@Glavin001
Copy link
Member Author

The more I think about it the more I believe that SLAPIManager should really act as the Store and the Adapter, since the Store is really CoreData but that layer is already implemented and it would be redundant to add something to the CoreData NSManagedObjectContext since MagicalRecord makes it pretty easy to use already.

Continue on with #7

@Glavin001
Copy link
Member Author

Okay, so I created a SLStore class..

It should create it's own NSManagedObjectContext and use it internally.

The SLStore (Store) should be associated to a single SLAPIManager (Adapter) which has a default and generalized Serializer that has registered all of the Transforms.

Yes, this will be HEAVILY inspired by Ember. And I like it!

@Glavin001 Glavin001 reopened this Jul 17, 2014
@Glavin001
Copy link
Member Author

Similar to Ember, the Store could be what is created (instead of SLAPIManager) and then it would automatically create it's own API Manager (which could be overridden).

@Glavin001
Copy link
Member Author

Instead of using Strings like Ember it would be great to be able to pass Classes and therefore verify that the model class exists and can be instantiated right on that class argument.

@Glavin001
Copy link
Member Author

Only allow SLModel classes as modelClassarguments. Seehttp://stackoverflow.com/a/5874006/2578205

Glavin001 added a commit that referenced this issue Jul 17, 2014
…Adapter, and Store. Unit Tests passing for Authentication and partial model-mapping, working for SLUser.
Glavin001 added a commit that referenced this issue Jul 23, 2014
@Glavin001
Copy link
Member Author

Glavin001 added a commit that referenced this issue Jul 28, 2014
Glavin001 added a commit that referenced this issue Jul 29, 2014
Glavin001 added a commit that referenced this issue Jul 29, 2014
See #10. Implement Store’s findQuery function.
Glavin001 added a commit that referenced this issue Jul 29, 2014
This was referenced Jul 29, 2014
Glavin001 added a commit that referenced this issue Jul 31, 2014
Glavin001 added a commit that referenced this issue Aug 14, 2014
- Add method for reloadRecord in model class.
- Add unit tests for find:byId and reloadRecord
Glavin001 added a commit that referenced this issue Sep 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant