This is a web application based on actionscript 3.
I have all of my modules enumerated in a class, but I never know which modules actually come from database.
Let's say I have 20 modules in my application, but the user only has access to 10 of them. All I get are 10 strings from database (the module names) whenever the user clicks a module this string goes through the twenty else if statements until it matches the enumerated value and then it is displayed on screen.
Is there a way to optimize this?
The modules are not flex modules per say, they are just lazy instantiated components.