• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Design Question: Pro & Cons of KVC/KVO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Design Question: Pro & Cons of KVC/KVO


  • Subject: Re: Design Question: Pro & Cons of KVC/KVO
  • From: Ben Trumbull <email@hidden>
  • Date: Thu, 21 Aug 2008 20:06:23 -0700

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 (email@hidden)

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:
This email sent to email@hidden


  • Prev by Date: Re: Preventing windows from being dragged
  • Next by Date: Re: !foo vs foo == nil
  • Previous by thread: Design Question: Pro & Cons of KVC/KVO
  • Next by thread: IB displays a non-outlet (Bug or feature?)
  • Index(es):
    • Date
    • Thread