

In defense of Core Data (Part II) - LinaLauneBaer
http://thermal-core.com/2014/06/14/in-defense-of-core-data-part-II.html

======
yoda_sl
And to be clear, yes CoreData was launched on Mac OS a while back, and then
added to iOS, but CoreData is in fact way older than that. CoreData is a
descendant of EOF: Enterprise Objects Framework that was created at NeXT,
during the Objective-C days (aka before WebObjects moved to Java).

So Apple has a long history on integrating the ObjC runtime with a back end
database. I will be curious to see if something new for CoreData will be
coming with Swift.

------
cageface
_Don 't put anything in your model code_

This is a SERIOUS code smell in my opinion. You _want_ business logic in your
model layer. That's where it belongs. A good persistence layer does not
dictate model design.

~~~
shadesandcolour
"Model code" in that sentence refers purely to NSManagedObject subclasses.
Create other model objects to work with your entities instead of asking them
to do things for you. How much business logic belongs in the class that models
a tweet?

~~~
sivanmz
> Create other model objects to work with your entities instead of asking them
> to do things for you.

Regardless of persistence, using such "manager" objects to operate on data
records is procedural rather than object oriented programming.

------
prodigal_erik
Since the article assumes you already know, Core Data seems to be an iOS-only
(and I guess MacOS?) ObjC ORM. If you want compile time safety or portability,
look elsewhere.

~~~
threeseed
Actually WebObjects/Project Wonder is still around and kicking. It is a Java
port which has an ORM layer that has the same lineage as Core Data.

[http://wiki.wocommunity.org/display/WEB/Home](http://wiki.wocommunity.org/display/WEB/Home)

