This post originated from an RSS feed registered with Java Buzz
by dion.
Original Post: Core Data: Room for a Java port?
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Apple keeps on trying to make it easy for developers to develop top quality applications. In Tiger they are introducing Core Data, which is a managed object model.
Basically it gives Cocoa a nice simple way to develop a model that doesn't just map to some database.
Core Data lets you create an ERD with Interface Builder, which acts as a model.
Data Store Formats
In Tiger, Core Data support three different kinds of data store formats to save managed objects contexts to. These formats are:
XML file format
Binary archive file format
SQLite database file format
Each of these formats has its strengths and weaknesses. The XML format is a good testing format as it is fairly human readable. The binary format is not human readable, but provides better performance than the XML format. Both of these formats are atomic—in other words, the entire data model is read from disk and saved to disk in a single operation.
The last format, the SQLite format, is the most scalable and fastest. SQLite is an open source embedded database that is included in Tiger and has many properties which make it an ideal data storage layer for Core Data. It allows Core Data to efficiently optimize the objects that are loaded into memory and leave unused data on disk. This can drastically reduce the memory footprint of your application when working with large data sets.
An important thing to note about all of these formats: Core Data may change the way that it uses them at any time. While it is easy enough to look under the covers and see what is going on with the XML and SQLite data formats, you should never modify the data in these files yourself.
Functionality such as undo/redo is given to us in a simple to use way.
Wouldn't it be nice if Swing/SWT could use a model like this (rather that a heavier DB persistence mechanism)?