开发者

Difference between Foundation Framework and Core Foundation Framework?

I try to get the hang of it, but for now both seem the same thing to me. However, Xcode allows to create an Consol开发者_开发技巧e App with choice of using "Core Foundation" or just "Foundation". Maybe someone can point out the differences.


Core Foundation is the C-level API, which provides CFString, CFDictionary and the like.

Foundation is Objective-C, which provides NSString, NSDictionary, etc.


CoreFoundation is written in C while Foundation is written in Objective-C;

Foundation has a lot more classes;

CoreFoundation is the common base of Foundation and Carbon.


A little history

Ref: http://ridiculousfish.com/blog/posts/bridge.html

Mac OS 9 and NEXTSTEP merged to create Mac OS X. And Core Foundation was created as a common ground for classic Mac toolbox and OPENSTEP(Which I believe is the toolbox for NEXTSTEP).

Classic Mac toolbox evolved and became Carbon.

OPENSTEP evolved and became Cocoa which includes Foundation.

So I conclude that, Core Foundation has much longer history and it is the foundation of Foundation. Since Foundation is kind of high-level and modern, I will stick to it unless I need to handle some historic issues which requires Core Foundation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜