Re: Why is it wrong to have relationships without an inverse in Core Data?
Re: Why is it wrong to have relationships without an inverse in Core Data?
- Subject: Re: Why is it wrong to have relationships without an inverse in Core Data?
- From: Michael Crawford <email@hidden>
- Date: Sat, 22 Jun 2013 08:43:09 -0700
I don't use Core Data because it's not cross-platform. In my honest
opinion no one in their right mind would bet their livelihood on
platform-specific document formats, no matter what the platform.
I used to be a Senior Engineer at Apple. Many of my best friends
still work for Apple. But I remember Bedrock. I remember MacApp. I
actually led the effort to specify an Apple Events Suite, along with a
bunch of my employer's competitors. The Word Services Suite still
works completely unmodified in Mac OS X, despite my having written the
spec in 1992. Now try to find any mention of Apple Events in any of
Apple's documentation.
While one can use SQLite or XML for the storage, if the SQLite or XML
documents are to be opened on some other platform, one would have to
write all that code from scratch, without the use of Core Data.
Instead for SQLite, I just write the SQL directly, and for XML, I use
Xerces-C (actually C++) to create a DOM tree (Document Object Model)
in memory, then serialize it to an XML file. The inverse process
reads XML then creates an in-memory DOM tree.
For large files, Xerces-C also implements SAX (Simple Architecture for
XML), which uses callbacks for each item in the file; say for XHTML,
one would have a <title> handler, a </title> handler, a <body>
handler, a </body> handler and so on. It's more difficult to write
Sax code, but it's far faster and uses far less memory than DOM.
Mike
On Sat, Jun 22, 2013 at 7:37 AM, Kyle Sluder <email@hidden> wrote:
> On Jun 22, 2013, at 12:55 AM, Rick Mann <email@hidden> wrote:
>
>>
>> On Jun 22, 2013, at 00:50 , Keith J. Schultz <email@hidden> wrote:
>>
>>> Core data helps in setting up the database, but deleting is another matter.
>>> You should do that manually for consistency. Core Data has no knowledge of the
>>> semantics of your database. so use prepareToDelete.
>
> I'm sorry, but what?
>
> 1. Core Data is NOT a database. It is NOT an ORM. Core Data is a model object persistence and management framework. It just so happens that it can use a SQLite database as a storage backend. It can also use XML.
>
> 2. Core Data very well does understand the semantics of your data model. That's what the data model _is_. Core Data is not somehow crippled in understanding deletions. It even has deletion propagation and validation.
>
> Seriously, if you're gonna knock on Core Data (for which there is PLENTY to knock on), at least come up with valid criticisms.
>
> --Kyle Sluder
>
> _______________________________________________
>
> 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
--
Michael David Crawford
mdcrawford at gmail dot com
Custom Software Development for the iPhone and Mac OS X
http://www.dulcineatech.com/custom-software-development/
_______________________________________________
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