Vinayaka Karjigi
Vinayaka Karjigi

Reputation: 1090

relation between foundation and cocoa frameworks

I want to know how foundation framework and cocoa framework are related.

who is super set of who?

what properties each framework provides?,

how these two frameworks are wrapped together?

Upvotes: 4

Views: 1786

Answers (1)

Cyrille
Cyrille

Reputation: 25144

Foundation is, as its name suggests, the base foundation of everything. It provides common objects and storage classes such as NSString, NSArray, and all :

The Foundation framework defines a base layer of Objective-C classes. In addition to providing a set of useful primitive object classes, it introduces several paradigms that define functionality not covered by the Objective-C language. The Foundation framework is designed with these goals in mind:

  • Provide a small set of basic utility classes. Make software development easier by introducing consistent conventions for things such as deallocation.
  • Support Unicode strings, object persistence, and object distribution.
  • Provide a level of OS independence, to enhance portability.

The Foundation framework includes the root object class, classes representing basic data types such as strings and byte arrays, collection classes for storing other objects, classes representing system information such as dates, and classes representing communication ports.

[from Foundation doc at Apple]

Cocoa (and Cocoa Touch, closely related to UIKit) are build atop of Foundation and provide much higher-level objects (views, touches, ...). See the documentation on Cocoa Touch and the one on Cocoa.

Upvotes: 6

Related Questions