views:

687

answers:

4

I have recently heard a lot of praise for Apple's Core Data architecture.

Is there something similar in Java land, so that I can play around with Core Data's ideas (in order to evaluate how it stacks up against something like Hibernate) without having to get into Cocoa/Objective-C first?

A: 

Not at the moment - one of the reasons they moved away from the Java conversion of EOF was the complications that arose from the translation (http://en.wikipedia.org/wiki/Core_Data).

Andy Mikula
+1  A: 

While I only know about Core Data what I have just read, it sounds like the Eclipse Modeling Framework and the Graphical Modeling Framework would do something similar, as they also provide automatic generation of a GUI from a schema, and take care of persistence of schema instances. To get relational database persistence, they could maybe be combined with EclipseLink (which is based on Oracle's TopLink), or some other ORM framework.

Fabian Steeg
+3  A: 

Keep in mind that Core Data is not primarily an object persistence framework, as I understand Hibernate et al. to be. Rather, it is an object graph management framework (it maintains relationships and changed state for objects subject to the model constraints), though it is not a dependency injection framework (like Groovy or Springs). It just so happens that it can persist this object graph to disk using one of several back-end formats (including SQLite). Core Data is also not meant for multi-user systems, as was the original Enterprise Object Framework. It is meant specifically for single-user desktop applications and automates much of the work of writing a Model layer for that type of app. For anything else, it's probably not a good fit.

What are you considering Core Data for? Perhaps we can provide a more specific answer if you give us a more specific use case.

Barry Wark
It sounded like he merely wanted to explore Core Data without learning Objective-C so he could decide whether he wanted to learn Objective-C to be able to use Core Data. Or something like that…
Ben Alpert
+3  A: 

If you have a Mac, install WebObjects — which is included with Xcode — and you'll have access to the Java-based Enterprise Objects Framework.

Chris Hanson