6 ms·
Pretty neat. Is the Music app written somewhere ? Also question to the room, is DI really worth it ? All that complexity to switch out sub-classes . A clean
by qorrect 5y ago
Pretty neat. Is the Music app written somewhere ?
Also question to the room, is DI really worth it ? All that complexity to switch out sub-classes . A clean design but in practice it just feels like too much work for the benefit.
- tekdude 5y agoThanks. The music app code is closed. There's a public demo still online, but I got terrible feedback, so I'm slowly rebuilding it from scratch with a completely different design. As for DI: in my case, it was definitely worth adding. The original music app didn't have it, so I had to come up with convoluted mechanisms to share cross-cutting services with different ViewModels, and it got messy. Some had to keep references to services that they didn't actually need themselves, but their child ViewModels did... With DI, I just register the services with the library, and let it inject whatever a ViewModel needs.