ArticleslgStudy

science

Foundation Kit

Foundation Kit is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Foundation Kit rather than just read about it. In short: The Foundation Kit, or just Foundation for short, is an Objective-C framework in the OpenStep specification described by NeXT Computer, Inc. It provides basic classes such as wrapper classes and data structure classes.

Key takeaways

  • Foundation Kit belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Foundation Kit to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Foundation Kit from memory before moving on to harder problems.

Reference excerpt

The Foundation Kit, or just Foundation for short, is an Objective-C framework in the OpenStep specification described by NeXT Computer, Inc. It provides basic classes such as wrapper classes and data structure classes. This framework uses the prefix NS (for NeXTSTEP). It is also part of Cocoa and of the Swift standard library.

Classes

NSObject This class is the most common base class for Objective-C hierarchies and provides standard methods for working with objects by managing the memory associated with them and querying them.

NSString and NSMutableString A class used for string manipulation, representing a Unicode string (most typically using UTF-16 as its internal format). NSString is immutable, and thus can only be initialized but not modified. NSMutableString is a modifiable version.

NSValue and NSNumber NSValue is a wrapper class for C data types, and NSNumber is a wrapper class for C number data types such as int, double, and float. The data structures in Foundation Kit can only hold objects, not primitive types, so wrappers such as NSValue and NSNumber are used in those data structures.

NSArray and NSMutableArray A dynamic array of objects, supporting constant-time indexing. NSArray is an immutable version that can only be initialized with objects but not modified. NSMutableArray may be modified by adding and removing objects.

NSDictionary and NSMutableDictionary An associative data container of key-value pairs with unique keys. Searching and element addition and removal (in the case of NSMutableDictionary) is faster-than-linear. However, the order of the elements within the container is not guaranteed.

NSSet and NSMutableSet An associative container of unique keys, similar to NSDictionary, with the difference that members do not contain a data object.

NSData and NSMutableData A wrapper for raw byte data. An object of this type can dynamically allocate and manage its data, or it can refer to data owned by and managed by something else (such as a static numeric array).

NSDate, NSTimeZone and NSCalendar Classes that store times and dates and represent calendrical information. They offer methods for calculating date and time differences. Together with NSLocale, they provide methods for displaying dates and times in many formats, and for adjusting times and dates based on location in the world.

Major implementations

macOS and iOS The Foundation Kit is part of the macOS Cocoa API. Beginning as the successor to OPENSTEP/Mach, this framework has deviated from OpenStep compliance, and is in some places incompatible. The Foundation Kit is in the iOS Cocoa Touch API. This framework is based on the macOS Cocoa.

GNUstep The Foundation Kit is implemented in GNUstep's Base Package (libs-base). This implementation is mostly comparable (4 classes are missing) and aims to be comparable with both the OpenStep API and later macOS additions. The missing classes have been dropped by Apple as well.

Cocotron The Foundation Kit is implemented in Cocotron, an open-source implementation of Cocoa. It is also a part of Darling.

PureFoundation PureFoundation is an open-source implementation of Foundation that implements Foundation by wrapping Core Foundation, just like in Cocoa, rather than create a separate Foundation from scratch like GNUstep and Cocotron.

SwiftFoundation SwiftFoundation (swift-corelibs-foundation) is Apple's open-source Swift implementation of the Foundation API for platforms where there is no Objective-C runtime. It also includes an implementation of Core Foundation.

ApportableFoundation ApportableFoundation is an implementation of Foundation Kit (Foundation, CoreFoundation, and CFNetwork) based on Apple's CFLite release. It works on Android and other Linux systems, and makes up part of the Darling macOS translation layer for Linux.

See also OpenStep Application Kit UIKit GNUstep Cocoa (API)

References

External links GNUstep Base Apple Foundation Framework Reference Foundation section in the Cocoa Fundamentals Guide List of Classes in OpenStep specification OPENSTEP SPECIFICATION

Worked examples

Example 1 — a first encounter with Foundation Kit

Start with the simplest possible case. Write down what Foundation Kit claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Foundation Kit before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Foundation Kit ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Foundation Kit

In research
Foundation Kit appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Foundation Kit in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Foundation Kit is common in secondary-school and first-year university syllabi. It links to neighbouring topics MacOS APIs, MacOS programming tools, NeXT, so understanding it makes those chapters shorter.
In everyday life
Look for Foundation Kit outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Foundation Kit” →

How to study Foundation Kit in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Foundation Kit means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Foundation Kit out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Foundation Kit in simple terms?

The Foundation Kit, or just Foundation for short, is an Objective-C framework in the OpenStep specification described by NeXT Computer, Inc. It provides basic classes such as wrapper classes and data structure classes.

Why does Foundation Kit matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Foundation Kit?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Foundation Kit.

Tags

  • MacOS APIs
  • MacOS programming tools
  • NeXT

Keep exploring