A Swift micro-framework using Property Wrappers to implement the Service Locator pattern.
Locatable is a Swift micro-framework that implements the Service Locator pattern using Property Wrappers. It allows iOS developers to manage and inject dependencies with a clean, type-safe syntax via the `@Locatable` attribute, reducing boilerplate and improving code organization.
iOS developers building Swift applications who need a lightweight, modern solution for dependency management without heavy frameworks.
Developers choose Locatable for its minimalistic approach, seamless integration with Swift's Property Wrappers, and support for both shared and new instance semantics, making it ideal for small to medium-sized projects.
A micro-framework that leverages Swift Property Wrappers to implement the Service Locator pattern
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses Swift's Property Wrappers for a clean, declarative syntax, as shown with the @Locatable attribute, reducing boilerplate code.
Ensures dependencies conform to protocols at compile-time, minimizing runtime errors and improving code reliability through strict type checks.
Supports both shared instances for singletons and new instances per injection, catering to different service lifecycle needs, as demonstrated in the README examples.
Offers shorthand registration syntax with autoclosure and type inference, simplifying service setup and making code more concise.
Implements only the service locator pattern, which can lead to hidden dependencies and make code harder to test compared to full dependency injection containers.
The README does not mention concurrency handling, posing risks for multi-threaded iOS applications where services might be accessed concurrently.
As a micro-framework, it lacks extensive community plugins or integrations, limiting support for advanced features compared to more established DI libraries.