
Dictionary
Dictionary
In mobile app development, a Dictionary (also known as a Map, HashMap, or Key-Value Store) is a data structure used to store data in key-value pairs. It allows fast lookup, insertion, and deletion of data using a unique key.
Common Uses:
Storing configuration settings
Caching data (e.g., user session or API responses)
Passing parameters between components (like activities or views)
Managing translations (localization with language key-value pairs)
Platform-Specific Examples:
Swift (iOS): Dictionary<Key, Value>
Kotlin/Java (Android): Map<Key, Value> or HashMap<Key, Value>
Key Features:
Fast access with O(1) average complexity
Keys must be unique
Values can be duplicated
Often used with JSON parsing (APIs return key-value structured data)
kotlin