12. What is an IoC Container ? Creates and assembles components/objects and manages their lifecycle. Prana uses an XML dialect to define the “application context” (what objects are available and how they are related)
14. Working with the IoC container <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="onCreationComplete()“> ... private function onCreationComplete():void { _objectsLoader = new XmlObjectDefinitionsLoader(); _objectsLoader.addEventListener(ObjectDefinitionsLoaderEvent.COMPLETE, onObjectDefinitionsLoaderComplete); _objectsLoader.load("application-context.xml"); } private function onObjectDefinitionsLoaderComplete(event:ObjectDefinitionsLoaderEvent):void { var container:ObjectContainer = _objectsLoader.container; var a:A = container.getObject(“a”); } ... </mx:Application>