D
Danno
Just that simple question....out of curiosity.
Danno said:Just that simple question....out of curiosity.
Danno said:Just that simple question....out of curiosity.
Just that simple question....out of curiosity.
Which is?
Two things:
1) It's common netiquette to write the contents of the post in the
body of the post, not in its subject. The subject line is just a quick
intro to the post itself, it's not the post. The post should be
completely understandable even if the subject line was completely removed.
2) You are clearly trying to be a smart-ass by using complicated
terminology that only few people are acquainted with, clearly on
purpose. If you don't want people to think you are a smart-ass, explain
your terminology before using it.
[Subject] : Is it in the C++ culture to use Dependency Injection/
Inversion of Control?
Just that simple question....out of curiosity.
If you are hinting towards AOP, you could refer this:http://www.aspectc.org/
Ah, I wasn't sure what the question was. It's been a while since I readDanno said:Well, the seminal articles are by Martin Fowler.
http://martinfowler.com/bliki/InversionOfControl.html
http://martinfowler.com/articles/injection.html
It is a way of designing classes, therefore objects, to be injected
with what they need instead of tight coupling relationships to other
classes & objects by instantiation or non-abstract assignements. This
is also usually done with abstractions (interface oriented design).
In Java and Ruby, objects are injected with the objects they require
by text, xml, or dsl file.
Calm down, my god, this group is too egotistical, pious and angry.
I am trying to educate myself with different languages and I asked one
simple question here on c.l.c++ a couple of weeks ago about pointers and
I get jumped on by one of your members. Now I ask another question about
DI/IoC and you think it's an affront to your intelligence? Are you guys
that sensitive and insecure about yourselves to go bashing posters?
Don't worry, this will be last participation in this group for me, you
guys can proceed with your "don't hit your ass on the way out" party.
There are plenty open academic discussion groups out there.
Isn't plain old LSP an instance of DI? The client code only knows the
interface, not the implementing classes. If you link dynamically, you
can plug and play different modules.
The kind of DI used in dynamic languages like Ruby and Python (which
I've used) can lead to debugging and maintenance nightmares when your
behavior is specified in code as well as config files.
Ah, I wasn't sure what the question was. It's been a while since I read
those papers (it's well worth spending time on Martin's site, there are
some real gems there), but I think I remember the gist.
C++ classes don't support dynamic binding, but it can be approximated
with callback functions and/or functors.
Just that simple question....out of curiosity.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.