|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Just that simple question....out of curiosity.
|
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Danno wrote:
> Just that simple question....out of curiosity. Which is? -- Ian Collins. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Danno wrote:
> Just that simple question....out of curiosity. 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. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Apr 9, 6:07am, Danno <dh.evolutionn...@gmail.com> wrote:
[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/ |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Apr 8, 7:13 pm, Ian Collins <ian-n...@hotmail.com> wrote:
> Danno wrote: > > Just that simple question....out of curiosity. > > Which is? > > -- > Ian Collins. 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. |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On Apr 8, 11:16 pm, Juha Nieminen <nos...@thanks.invalid> wrote:
> Danno wrote: > > Just that simple question....out of curiosity. > > 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. 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. |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
On Apr 8, 11:35 pm, Abhishek Padmanabh <abhishek.padman...@gmail.com>
wrote: > On Apr 9, 6:07 am, Danno <dh.evolutionn...@gmail.com> wrote: > [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/ No, but that is some great info, and I appreciate the link. I posted the info on Dependency Injection and Inversion of Control on the response to Ian. |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
Danno wrote:
> On Apr 8, 7:13 pm, Ian Collins <ian-n...@hotmail.com> wrote: >> Danno wrote: >>> Just that simple question....out of curiosity. >> Which is? >> > > 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. > 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. SO yes, a C++ class can be instantiated and then have specific behaviour "injected". I guess the good old C callback functions is the most basic form of IoC. -- Ian Collins. |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
> On Tue, 08 Apr 2008 23:04:02 -0700, Danno wrote:
> Calm down, my god, this group is too egotistical, pious and angry. really ? when I saw your post for 1st time, you seem like you were either trying to be over-smart or you are stupid. I am not saying you are idiot/smart-ass. I am saying the way you communicate your question to comp.lang.c++, then it shew that way. The way youo asked your question with *zero* words in your post reminds of the programmers from 1late 90s "IT Revolution" era. Many persons called themselves HTML Programmers at that time. Now I added your name onto that list. > 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? No one is bashing you here. *They* are trying to educate you. Juha Nieminen did the same and there were no harsh words in his reply. > 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. yes, they are there. comp.lang.c++ is a kind of group where regular-posters are much more matured, intelligent and patient than what you will experience on other groups. try yourself but it will take a lot of personal-time of yours before you find that out. -- http://lispmachine.wordpress.com/ Please remove capital 'V's when you reply to me via e-mail. |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
Ian Collins <ian-news@hotmail.com> wrote in news:663cgoF2hu9ejU9
@mid.individual.net: > Danno wrote: >> On Apr 8, 7:13 pm, Ian Collins <ian-n...@hotmail.com> wrote: >>> Danno wrote: >>>> Just that simple question....out of curiosity. >>> Which is? >>> >> >> 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. > >> C++ classes don't support dynamic binding, 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. |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
On Apr 9, 6:12 am, Lloyd Bonafide <nos...@nicetry.org> wrote:
> Ian Collins <ian-n...@hotmail.com> wrote in news:663cgoF2hu9ejU9 > @mid.individual.net: > > > Danno wrote: > >> On Apr 8, 7:13 pm, Ian Collins <ian-n...@hotmail.com> wrote: > >>> Danno wrote: > >>>> Just that simple question....out of curiosity. > >>> Which is? > > >> 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. > > >> C++ classes don't support dynamic binding, > > 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. That is definitely one of the major complaints about DI. Some developers get blamed for overdoing it by making their code as anorexic as possible. I pulled up the DI page on wikipedia and it offers frameworks in C++: http://code.google.com/p/autumnframework/ http://code.google.com/p/pococapsule/ http://qtioccontainer.sourceforge.net/ |
|
|
|
#12 |
|
Messages: n/a
Hébergeur: |
On Apr 9, 2:19 am, Ian Collins <ian-n...@hotmail.com> wrote:
> Danno wrote: > > On Apr 8, 7:13 pm, Ian Collins <ian-n...@hotmail.com> wrote: > >> Danno wrote: > >>> Just that simple question....out of curiosity. > >> Which is? > > > 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. > > 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. Now I know what callback functions are, but they may have different meaning in a C++ context (or may not). I had no clue what functors were until you posted. I googled it and found out. It looks like that is probably the best way to do injections. > SO yes, a C++ class can be > instantiated and then have specific behaviour "injected". I guess the > good old C callback functions is the most basic form of IoC. > |
|
|
|
#13 |
|
Messages: n/a
Hébergeur: |
Danno wrote:
> > 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. > > Nah dont go anywhere. You had a good question. Just because some people act like bruised little pussies whenever they're made uncomfortable with words they don't know and then whine about it, it's their failure not yours....post away! Thanks for links on DI on C++ BTW. -- Lou 12 skiing injuries to date. |
|
|
|
#14 |
|
Messages: n/a
Hébergeur: |
On Apr 8, 6:07pm, Danno <dh.evolutionn...@gmail.com> wrote:
> Just that simple question....out of curiosity. In C++ applications, it is pretty common that object dependencies are configured (wired up) by passing depender references as input parameters of plain old C++ constructs, static methods (e.g. factories), setters, as well as other virtual/non-virtual member functions of dependee objects. So, from this sense, one could claim that dependency injection (DI) has been a C++ calture for decades. To change the question more specific to "DI framework support in C++", there are several of them already. For instance, the PocoCapsule (<http://code.google.com/p/pococapsule) supports framework agnostic plain-old C++ objects (POCO). Hope this s, Ke |
|
![]() |
| Outils de la discussion | |
|
|