Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zoul/factory
Experimental dependency injection container for Objective-C.
https://github.com/zoul/factory
Last synced: 10 days ago
JSON representation
Experimental dependency injection container for Objective-C.
- Host: GitHub
- URL: https://github.com/zoul/factory
- Owner: zoul
- Created: 2010-10-06T11:56:00.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2011-02-10T08:45:26.000Z (almost 14 years ago)
- Last Synced: 2023-04-19T04:16:33.429Z (over 1 year ago)
- Language: Objective-C
- Homepage: http://github.com/zoul/Factory
- Size: 161 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
About
-----Factory is a very simple dependency injection container for Objective-C.
It can assemble objects graphs for you so that you don’t have to mess with
the dependency management yourself:[factory addComponent:[Engine class]];
[factory addComponent:[Car class]];
Car *car = [factory assemble:[Car class]];
STAssertNotNil(car.engine, @"Engine automatically built in.");For more examples see the [Tests].
[Tests]: http://github.com/zoul/Factory/tree/master/Demo/Tests/
Notes
-----* Lazy-wired properties would be interesting
* Instance sealing to prevent changing deps after assembling?
* Detect dependency loopsLinks
-----* [Inversion of Control Containers][fowler] by Martin Fowler
* [Dependency Injection][hevery] by Miško Hevery
* [Singletons are Pathological Liars][liars] by Miško Hevery[fowler]: http://martinfowler.com/articles/injection.html
[hevery]: http://misko.hevery.com/2008/11/11/clean-code-talks-dependency-injection/
[liars]: http://misko.hevery.com/2008/08/17/singletons-are-pathological-liars/