dependency injection - Are these values dependencies? -


i've got object encapsulates remote calls. needs credentials make calls. think credentials should passed constructor that, once object created, user doesn't have keep passing them in every time make call object. seems sensible factoring.

if though i've got added complexity of clients use object needing passed factory instead of object because credentials won't known until run time. given work, wondering if credentials (being string values , no code) count dependency or not?

does question make sense? see i've gotten head after using ioc being passed constructor counts dependency , should instance of implementation of interface.

i wouldn't see strings dependencies. instead, create iusercontext or iusercredentials abstraction can inject.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -