Closed
Bug 1111018
Opened 10 years ago
Closed 10 years ago
Import MagicalRecord to make CoreData usage a little prettier
Categories
(Firefox for iOS :: Data Storage, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: wesj, Unassigned)
References
Details
Attachments
(1 file)
I'd like to use CoreData for History/Bookmarks/etc storage. AFAICT right the biggest downside here may have to deal with sorting (i.e. we can sort on lastVisited or mostVisited, but doing a complex frecency-calculation may be hard). Frecency on Android has turned out to not work great anyway though, so I'm hoping we can come up with something better to use here.
MagicalRecord seems like a pretty standard iOS library to make using CoreData a little easier. i.e. you can do things like
Favicon.MR_fetchAll() as [Favicon]
to get a list of stored Favicons as opposed to:
let ctx = managedObjectContext // passed from Application creation
let entityDescription = NSEntityDescription("Favicon", inManagedObjectContext:ctx)
var request = NSFetchRequest()
request.setEntity(entityDescription)
var error: NSError
var favicons = ctx.executeFetchRequest(request, error: &error) as [Favicon]
Comment 1•10 years ago
|
||
Note from IRC:
14:13:54 <@rnewman> st3fan: I'm not opposed to Core Data, so long as it gives me all of the fine-grained internal interfaces I need to translate those reorder etc. operations into a transaction log that I can replay either remotely or as a layer on top of a mirror store.
The key point I want to emphasize here: we need to be able to track semantic operations (e.g., "visited this URL at this time for this reason"), and process them independently of the upstream data mirror so that Sync can do its work.
We also need some interface for exposing some meta-state about that mirror, while still allowing certain kinds of reads and writes to the local endpoint.
A wrapper around a database won't _on its own_ give us what we need. That doesn't mean it can't be layered on top to make building UI code easier, but I'm very skeptical about magic bullets.
Component: General → Data Storage
OS: Mac OS X → iOS 7
Hardware: x86 → All
Reporter | ||
Comment 2•10 years ago
|
||
Attachment #8535993 -
Flags: review?(sarentz)
Comment 3•10 years ago
|
||
+1 on MagicalRecord if we go the Core Data route. Looks like a nice abstraction while still able to access the standard Core Data APIs needed.
Updated•10 years ago
|
Attachment #8535993 -
Flags: review?(sarentz) → review+
Reporter | ||
Comment 4•10 years ago
|
||
merged
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•