Architecture Patterns

An architecture pattern, also known as a software architecture pattern, is a reusable solution to a commonly occurring problem in software design. It provides a predefined structure, guidelines, and best practices for organizing and building software systems. Architecture patterns help developers create scalable, maintainable, and modular applications by promoting separation …

Variables & Properties

Creating a Variable Declare a new variable with var, followed by a name, type, and value: var num: Int = 10 Variables can have their values changed: num = 20 // num now equals 20 Unless they’re defined with let: let num: Int = 10 // num cannot change Property …

Data Types

There are six basic types of data types in Swift programming. Character The character data type is used to represent a single-character string. We use the Character keyword to create character-type variables. For example String The string data type is used to represent textual data. We use the String keyword to create string-type variables. …

OperationQueue

It’s built on top of Grand Central Dispatch (GCD) and provides a higher-level abstraction for managing concurrent operations. It’s an abstract class and never used directly. We can make use of the system-defined BlockOperation subclass or by creating your own subclass and start an operation by adding it to an OperationQueue or …

Global Dispatch Queues

GCD provides a set of global dispatch queues that are managed by the system. These queues are categorised into different quality-of-service (QoS) classes, indicating their priority. Main Dispatch Queue: The Main Dispatch Queue is a special serial dispatch queue associated with the main thread of your application. It’s the primary …

Grand Central Dispatch (GCD)

Grand Central Dispatch is a low-level API provided by Apple for managing concurrent operations. GCD abstracts away many of the complexities of thread management and provides a simple and efficient way to execute tasks concurrently. It provides a set of APIs for managing tasks and executing them concurrently on multicore …

Concurrency & Multithreading

Thread A thread is the smallest unit of execution within a process. It represents a single sequence of instructions that can be scheduled and executed independently by the operating system’s scheduler. Multithreading The term “multithreading” refers to the use of multiple threads within a single process. Multithreading allows different parts …

Getting Started with Swift Programming

Swift is a powerful and intuitive programming language developed by Apple Inc. It was introduced in 2014 as a replacement for Objective-C to develop applications for iOS, macOS, watchOS, and tvOS platforms. Swift is designed to be modern, safe, fast, and developer-friendly. Key Features of Swift: To start programming in …