Knowledgebase

Foundation and Core Data Types Print

  • appletechnology, apple, guide, howto, solution, zillionkinghost, hosting, support
  • 0

The base layer.

WHAT FOUNDATION PROVIDES

Strings, collections, dates and numbers File handling Networking Data encoding and decoding Notifications between components Formatting and localisation

WHAT DATE HANDLING REQUIRES CARE WITH

Time zones Calendars, which are not all the same Formatting, which must be locale-aware

WHAT TO NEVER DO

Format dates by joining strings.

WHAT TO USE

The formatting facilities, which handle locale correctly.

WHAT ENCODING AND DECODING PROVIDE

Converting between your types and structured formats, driven by the type itself.

WHY THAT MATTERS

It removes most manual parsing, and errors are typed.

WHAT TO HANDLE

Decoding failure, which happens when a server changes.

WHAT TO DEFINE

Custom key mappings where names differ.

WHAT MEASUREMENT AND UNIT TYPES PROVIDE

Values carrying their units, converted safely.

WHAT FILE HANDLING REQUIRES

Using the provided directory locations rather than hard-coded paths.

WHY

Paths differ between platforms and installations.

WHAT TO MARK

Files that should not be backed up.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot