So, does everybody really always use KVC/KVO for implementing MVC, in
all projects? Is this the recommended best practice?

From code written after 10.2, yeah, pretty much. Coupled with the tools support in Interface Builder and the AppKit support with Cocoa Bindings, it's really not worth the effort of reimplementing KVC or KVO in general.

BTW does anyone use Core Data? I've watched the video tutorial and it
looks like too much magic. I would never guess how to make Core Data
work for a drawing application like the Sketch

Core Data is an ORM framework for Cocoa whose purpose is to fill the M part of MVC patterns. AppKit and Cocoa Bindings fill V and C respectively. Although it does not support client server databases, there are similar products in that enterprise space such as EOF, Hibernate, Cayenne, JDO, .NET Entity Framework, and the ActiveRecord pieces of Ruby on Rails. Just as all those products provide many more features than ODBC/JDBC (e.g. a database), so too does Core Data provide a lot more than raw data persistence.

While I like to imagine that there is a pinch of magic in Core Data for specific technical problems, the concepts and features are not magical. The theory behind these systems dates back to the mid 70s, and they became commercially popularized in the 90s.

You can ask wikipedia for more details about ORM and ERM.

Core Data does not force you to use it with KVC or KVO, but since it leverages many of the same ideas, understanding KVC & KVO first would be wise.

Is Core Data rather for database+forms apps?

No, Core Data is for Model objects within Cocoa applications. You can use it just as easily with a Foundation command line tool if you don't need Views or Controllers.

- Ben

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to