Skip to main content
11 events
when toggle format what by license comment
Sep 5, 2015 at 3:04 review First posts
Sep 5, 2015 at 8:45
Aug 14, 2015 at 20:38 vote accept Rômulo.Edu
Aug 14, 2015 at 9:29 answer added JDT timeline score: 0
Aug 13, 2015 at 22:28 comment added Francis Toth Providing an example (code) of what you want to setup could help. In any case, the first solution seems a little bit too automagic. In order to inject your component, you will probably need a setter or a constructor. What happens if the user messes with it ? The second one seems clearer for the client.
Aug 13, 2015 at 22:21 comment added Frank Hileman Yes, but a design can also provide this flexibility without dependency injection. Personally, I have gotten a bit tired of unnecessary dependency injection (i.e., it is always the same class used, and the flexibility is wasted).
Aug 13, 2015 at 20:45 comment added Rômulo.Edu Yes, because in that case it would be given a default component with basic functionality. But that would only happen if the developer wanted to use the standard components and not the modified / created by him . In this case it would be possible to provide this flexibility to the developer ?
Aug 13, 2015 at 20:38 comment added Frank Hileman based on your explanation of solution 1, it does not sound like the external developer has a chance to change the data type, or class, which is instantiated.
Aug 13, 2015 at 20:36 comment added Rômulo.Edu @FrankHileman, all the components communication are done using interfaces, so I think that would be possible to dynamically change components as long as the new component respects the contract.
Aug 13, 2015 at 20:25 comment added Frank Hileman I don't think solution 1 qualifies as dependency injection. You are doing it, but at the same time removing the advantages of dependency injection, which is to dynamically substitute a type into the system at run-time. Unless I misunderstood.
Aug 13, 2015 at 20:12 history edited Tulains Córdova CC BY-SA 3.0
edited body; edited title
Aug 13, 2015 at 19:48 history asked Rômulo.Edu CC BY-SA 3.0