Dynamic DCI in C++ with DI

44 views
Skip to first unread message

Casey Basichis

unread,
Apr 23, 2013, 7:43:53 PM4/23/13
to object-co...@googlegroups.com
Hi,

I'm using a C++ dependency injection library modeled after Guice.  https://github.com/phs/sauce

Given this would it be possible to implement dynamic graphs in DCI in C++, or something resembling it?

I have just recently discovered DCI, but from all I have read it echo's my own thought about design.  I am very excited to get my head around it, but my application is very modular and requires dynamic object graphs.

Is this workable?  Any thoughts as to how I might approach it will be received with stupendous joy.

Thanks,
Casey

Matthew Browne

unread,
Apr 28, 2013, 7:45:35 PM4/28/13
to object-co...@googlegroups.com
I'm not very conversant with C++ but since no one else has responded so far, I would just comment that I don't see any inherent incompatibility between DCI and dependency injection.

When creating DCI contexts, you're usually initializing the context with individual domain objects. It might be better to do that part manually, but I imagine that DI could be used to inject service objects into a context, if the context or role methods depended on those services to do their work.

I'm still new to DCI myself though so keep that in mind.
Reply all
Reply to author
Forward
0 new messages