Re: Exporting and Importing CoreData
Re: Exporting and Importing CoreData
- Subject: Re: Exporting and Importing CoreData
- From: Siegfried <email@hidden>
- Date: Wed, 23 Mar 2011 21:43:55 -0300
On 23/03/2011, at 20:55, WT wrote:
> On Mar 23, 2011, at 8:46 PM, Siegfried wrote:
>> On 23/03/2011, at 20:38, WT wrote:
>>> On Mar 23, 2011, at 8:13 PM, Siegfried wrote:
>>>> Hello,
>>>>
>>>> I need to create an export / import system for my app, and just thought that asking the list for some advices could help a lot.
>>>>
>>>> …
>>>
>>> How about using a property list file instead? Easier to import and export, and can be edited with tools such as Property List Editor, though your users might not know how to use it, or even have it.
>>>
>>> WT
>>
>> I was considering using it initially, but as you've stated that would make things a bit more complicated when it comes to editing. XML would be ideal. Also, the final file would be less verbose (not filled with nested dicts and key value pairs).
>
> If you save your property list as XML and not as a binary file, then it's still XML and can be edited equally with PLE or any text editor (though maintaining its property list format may be a challenge for your users). As for how verbose it would be, a simple structure such as what you mentioned shouldn't produce anything overly verbose, I think. I suggest you try some simple tests to see how you like the results.
I agree. Editing a XML plist is not difficult, and can be done with no problems in a standard text editor — users may not have problems. I'll be working on some tests as you suggested.
>
>> I really don't know when it comes to building the system. Do you think it would integrate with CoreData better? Or just mean less code to write? The latter case is not a problem though :-)
>
> I'm not entirely sure because I'm relatively inexperienced with Core Data but I suspect that it would involve much less code than having to parse the input file yourself.
Yes, parsing is the "laborious" part. I see calling a method on NSDictionary to read the plist is a lot easier :-) but now just tests may reveal the next path to take. At least, I'd get the validation stuff for free.
Thanks again WT,
Best regards,
Sirgfried_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden