-
Dec 17th, 2009, 04:58 PM
#1
Does IOC in Flash make sense?
So I guess there is more than one way to answer this, but my main question is does it even make sense to graph your objects with IOC?
Maybe this is more of a run-time vs compile time issue, but wouldn't it be really expensive to use reflection at run-time? I think this would cause a noticeable lag at start-up for Flash/Flex projects that have a significant amount of object creation.
This is more of a question of interest, as the concepts in IOC are really strong and represent Best Practices in construction, but I am concerned that this might be a solution looking for a problem scenario.
Just an honest question.
-
Dec 18th, 2009, 02:34 AM
#2
nope
While its true that application start-up will be slightly slower because of the reflection calls, IMHO this is not a breaking issue. as3commons-reflect caches all reflection data so that's already quite a big optimization speed-wise.
In most cases app start-up slowdown is only a matter of a fraction of a second, so in my experience its never been a huge problem.
Of course, if you're using IoC at run-time in some really graphically heavy routines it might be a cause for slow-down, but that's a really specific scenario so in that case you might wanna change your strategy.
Overall, I've never gotten into trouble. 
cheers,
Roland
-
Dec 18th, 2009, 05:16 AM
#3
Graphically heavy routines?
By this do you mean a ton of UI creation?
-
Dec 18th, 2009, 05:44 AM
#4
yea
Anything that involves large amount of objects being created rapidly and added to the stage. But then it'll only be a problem if the objects that are being created ALL need to be injected, this will not always be the case I think.
But even then, with a smart way of object caching/pooling this could still be optimized quite a lot.
-
Dec 18th, 2009, 08:30 AM
#5
Thanks
I appreciate your diligence on this board. Looking forward to getting some applications out with the framework.
-
Dec 18th, 2009, 08:51 AM
#6
no problem
Nice to see a new user coming on board
Please let us know how you fare, feel free to ask for help when needed, we're here to help.
cheers,
Roland
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules