- Is this possible at all? Has this been tried before? Are there any other ways to implement DI in Titanium?
- What is the application seem in a Titanium Application which is the most appropriate place to bootstrap IOC and how? (I'm thinking the composition root should be in app.js)
- What are the implications of having DI implemented in a Ti App considering dependency lifetime management? i.e. possible performance/memory concerns, etc.
What I'd really like to do is to register platform specific implementations of a dependency in the composition root rather than having "if platform == android / ios" checks everywhere in code. This would ideally limit the platform checks to the composition root. Rather than DI, is there any other way to do it?