PDA

View Full Version : Disadvantages of using Core Data




MacDonaldsd
Jul 9, 2007, 03:21 PM
Is there any disadvantages of using Core Data for developing the main part of an application as opposed to doing it in obj-c?

Do you loose anything from doing this, as it looks a really nice way to do the bulk of an application I want to do :D



kainjow
Jul 9, 2007, 04:57 PM
The main disadvantage is it's different thinking. I am still figuring it all out, so I haven't done a lot of work with it. But if you have custom classes or you want to have custom classes, it makes you implement more code. Kind of like how Cocoa Bindings is easy for basic things and doesn't require extra code, but if you want to get fancy, it's more work working around bindings than just doing the glue code yourself. That is how I see Core Data. But since the system is doing the work for you, I'd say go for it. If you really think it's bad months down the road after developing in it for a while, you can switch out of it, but I doubt that will happen.

Alloye
Jul 9, 2007, 05:34 PM
I've used CoreData for a couple of projects and have found it to be quite nice. A couple of things to consider:

1. You have to change your thinking a bit. Just like Cocoa Bindings, a lot happens behind the scenes. It can become difficult to keep track of "what is happening where" and tricky to do things outside the boundaries of the framework. This is particularly true if you don't have a solid grasp of Cocoa in the first place.

2. Versioning in the Tiger implementation is somewhat difficult and pretty much left to the developer. That might not matter at this point because Leopard will address this shortcoming.

Beyond those two caveats, it's a great framework that can save you tons of time and many lines of code.

MongoTheGeek
Jul 9, 2007, 06:08 PM
2. Versioning in the Tiger implementation is somewhat difficult and pretty much left to the developer. That might not matter at this point because Leopard will address this shortcoming.


It makes easy things REALLY easy but can get in the way if you want to do something fancy.

It also tends to tie down the running of the app to the computer.

Eraserhead
Jul 9, 2007, 06:47 PM
The main disadvantage is it's different thinking. I am still figuring it all out, so I haven't done a lot of work with it. But if you have custom classes or you want to have custom classes, it makes you implement more code.

I haven't run into any limitations yet for D&D Manager (www.erasersoft.com).

2. Versioning in the Tiger implementation is somewhat difficult and pretty much left to the developer. That might not matter at this point because Leopard will address this shortcoming.

Totally agree, changing the model seems to be a pain as well, so so far I haven't taken anything away.

If you use the XML store you can add properties without causing problems to old documents.

MacDonaldsd
Jul 10, 2007, 06:40 AM
I haven't run into any limitations yet for D&D Manager (www.erasersoft.com).


I don't play D&D myself but thats a nice little application you got there, did it take long to do ?

Is it easy to modify the data model once you have started ? e.g. forgetting an attribute.

also how about trivial things like adding color coding to a instance of an entity ?

Eraserhead
Jul 10, 2007, 08:56 AM
I don't play D&D myself but thats a nice little application you got there, did it take long to do ?

Thanks, it's difficult to quantify the time, really since November 2006, with other commitments (i.e. my Uni course) taking priority. Though I've never made anything like it before.


Is it easy to modify the data model once you have started ? e.g. forgetting an attribute.


Yes, certainly if you use the XML store, I do it all the time, not so much with the binary store.

also how about trivial things like adding color coding to a instance of an entity ?

I haven't tried, but I wouldn't have thought it would affect anything.