J
jmls
Guest
Yeah yeah. Don't get too happy.. I'm still not entirely sure ☺ Answer me this.. If a method in a class is looping through, creating a temp table record and storing an instance of an object, surely the method must create it's own instance of the object, as there are multiple instances. In this case the instance cannot be injected into the class. So, what is? On 16 Oct 2014 20:20, "Peter Judge" bounce-pjudge@community.progress.com wrote: RE: do you inject ? Reply by Peter Judge Stefan's link might also be a little outdated. There's a new version of the Code Share page on here - community.progress.com/.../default.aspx - which links to it. Direct link is github.com/.../InjectABL . The github version has been updated to use some of the libraries in 11.4 (stuff which moved from AutoEdge into OE). IoC containers all have the concept of a Composition Root, which is basically the top-level point at which the injection starts. Mark Seeman - who is a huge fan of DI in the C#/.NET world - has a good intro at http://blog.ploeh.dk/2011/07/28/CompositionRoot/ . The point of the composition root is that it's the only place in the app that actually knows about the DI/IoC container. In AutoEdge it's in 1 file - start_session.p that is called in 2 places: on the client ABL code, from the start_ui.p procedure, and on AppServer startup, in as_startup.p (the startup event procedure). I have proposed talks on the use of interfaces and "Composing complex applications" for a few Exchanges and PUG/Challenges, without luck. There are, after all, only so many timeslots available. I am always happy to talk about this stuff though. And even happier that Julian has finally seen the light on DI
regards, -- peter Stop receiving emails on this subject. Flag this post as spam/abuse.
Continue reading...
Continue reading...