What is a single entry point system?
mainA system is considered a "single entry point" system if there is exactly one place to invoke all of its logic and behavior. This design pattern makes it easy to alter the execution context (the environment) in which the system runs.
Common examples include:
- SwiftUI Views: Logic is triggered by the single
bodyproperty. - The Composable Architecture (TCA): Logic is triggered by the single
reducemethod. - Server Frameworks: Logic is triggered by a single request-to-response lifecycle.
In contrast, systems like ObservableObject or UIKit are generally considered non-single entry point systems because they lack a single, unified invocation point for all behavior.