thoughts of complexity

After the weekly FlashBrighton geekmeet about OOP and the reduction of complexity (taken by Flexible Factory) I’m undergoing a garbage collection phase with my thoughts. I’ve decided that the automatic assignment of the correct loader client from the fileType is adding too much complexity, and I promised my self I wasn’t going to do this.

Also, I was implementing a test for my Flex Module loader client, when I realised that it was a specialised swf. The automatic assignment just wouldn’t work in this case, so I had to create a property on the IAssetContainer that explicity set the clientLoaderType.

If its annoying once and results in code fiddling, it’ll be even more annoying the next time etc… Any logic that assigns the correct clientLoaderType from the fileType can be implemented for a specific project.

Also for the Notifications, I’m sending the AssetLoaderProxy itself, which is resulting in lots of getters and setters that don’t need to be there. Create a custom event object and send that as the body. This will work well with some good advice from Pedr Browne, and that is to remove my AssetLoader from the Proxy, and have a Proxy wrap it. This means that it can work in isolation from the pureMVC framework, and dispatch errors that the Proxy can handle and pass on as Notifications.

Leave a Reply

Your email address will not be published. Required fields are marked *