Elephant
|
|
« on: May 03, 2013, 11:41:40 » |
|
I could use some advice on managing my class structure. My project is quite complex -- it has five projects (all using Flex):
Desktop Mobile Web CommonLib AIRLib
About 90% of the current application functionality is in the CommonLib, with AIR API calls happening in AIRLib. The three "display" projects kick off the STARTUP notification by doing:
CommonFacade.getInstance().startup(this); Some of our Proxy classes use flash.filesystem.File functionality if available:
private var localData:LocalDelegate = ReflectionManager.createLocalDelegate(); private var appVO:AppVO; public function loadAppData():void { if (localData) { appVO = localData.loadData(); } else { appVO = remoteData.loadData(); }
etc...
Currently, the Desktop and Mobile projects call something like ReflectionManager.setLocalDelegateClass(LocalFileDelegate); This pattern has worked reasonably well so far, but I'm wondering if there isn't a better way. I notice that we don't have *any* PureMVC-aware code in our AIRLib project, and my current task might go more smoothly if we did.
I'm getting some data from a native extension for iOS and Android that needs to be shown on a view in CommonLib. It would be nice and simple to have that data come in on a Notification, but it doesn't cleanly fit into any existing classes in the application.
|