pwdi

master

A Swift Dependency Injection Package. Still in active development.
pedantix/pwdi

pwdi - Property Wrapper Dependency Injection

Swift SwiftLint

This package is to supply a quick and easy to use dependency injection framework with many common features. This system was inspired by server side containers however it was written with the needs of clients in mind. It is not tailored for injection scopes that are common in multisession applications like servers. It is highly opinionated and probably not a fit for every project. However it was built on and for SPM as a drop in quick and easy DI container to facilitate organization and writing testable code.

Road Map

  • Global Container

  • Scopes - forgoing most traditional server side scopes

    • Prototype - Use an expiring caching strategy that responds to memory warnings

    • Singleton - Long lived dependencies

    • Session - For multi user applications

  • Qualifiers - Traditional Tags, with a swift static Name

  • Property Wrappers

  • Usage Guide with examples from tests

Acknowledgement

This project is heavily inspired by Vapor. Further the Spring framework inspired the projects granular features.

Motivation

Testing Cocoa frameworks can be hard, its almost as if they are setup without testing in mind. There are many strategies to get around this however using a DI(dependency injection) strategy provides a common way of helping with this effort. This project was written to enable TDD accross active projects as they upgrade to swift 5, with a common set of tools. After the initial milestoes are met please add issues to expand functionality.

Description

  • Swift Tools 5.2.0
View More Packages from this Author

Dependencies

Last updated: Wed Oct 23 2024 11:47:56 GMT-0900 (Hawaii-Aleutian Daylight Time)