Voting: Unterschied zwischen den Versionen
(HcmGCadqzGaLFSRnIr) |
(jEggYVmBrrYHsvB) |
||
Zeile 1: | Zeile 1: | ||
− | + | Hi, Cedric.IoC is a design/coding plihosophy that's seperate from the frameworks that implement them. I don't use the frameworks, so I can't talk about them.Typically, I hand code factories. I start by having the factory simply return a new instance, and over time I find I need to get the factory to configure the instance in some way. That's where IoC comes in. It works pretty well for me, and of course as the factories are hand coded, there's no refactoring problems.One point I would stress is that you really want to use interfaces when using IoC. This way, only the factory needs to know about the IoC hooks.Finally, both Eclipse and IntelliJ offer the option of searching non-Java files when renaming. I'd advise always previewing what it's doing when doing this though. |
Version vom 16. Dezember 2012, 06:46 Uhr
Hi, Cedric.IoC is a design/coding plihosophy that's seperate from the frameworks that implement them. I don't use the frameworks, so I can't talk about them.Typically, I hand code factories. I start by having the factory simply return a new instance, and over time I find I need to get the factory to configure the instance in some way. That's where IoC comes in. It works pretty well for me, and of course as the factories are hand coded, there's no refactoring problems.One point I would stress is that you really want to use interfaces when using IoC. This way, only the factory needs to know about the IoC hooks.Finally, both Eclipse and IntelliJ offer the option of searching non-Java files when renaming. I'd advise always previewing what it's doing when doing this though.