Scott Kurz wrote: > Jeremy, > > I was wondering if you were going to any detail on Autowire in your > answer.... >
Rather than repeat, I hope you won't mind me pointing to an earlier mail: http://www.mail-archive.com/[email protected]/msg01519.html > In looking at usages in the code, it seems to simply provide a way to > inject > a instance of a system component (one defined in system.module or > system.fragment) via a setter. > That's really the implemention of this in the "system" programming model. It should be available in other implementations as well. It doesn't have to be a setter btw, fields should also work (anything that can be a reference). I actually think the most useful variant will be with constructor injection. > If there are restrictions or any further detail that would be > interesting at > a higher, design level I'd be interested in hearing them as well. > The biggest restrictions (in M1 anyway) are that it only works on system components and only with annotations. Adding it to other implementation types or support for XML sidefiles would not be too hard if someone was interested. We only support matching by service interface. This is fine for how we are using it with system components but the real potential comes when you can add non-functional business constraints as well. That would allow assemblers to provide rules for how their systems should be wired rather than doing it all explicitly. Think of it like laying out a circuit board. You can wire power to every chip on the board (figuring out track width, routing, decoupling etc. by hand), or you can have each component provide metadata (like "this chip need 3.3V power at 18mA on pins 18 and 24") and let the layout tool do all the wiring as you add them to your circuit. Hope that helps -- Jeremy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
