Results 1 to 6 of 6

Thread: Does IOC in Flash make sense?

  1. #1
    Join Date
    Dec 2009
    Location
    Montreal
    Posts
    8

    Default 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.

  2. #2
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    406

    Default 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

  3. #3
    Join Date
    Dec 2009
    Location
    Montreal
    Posts
    8

    Default Graphically heavy routines?

    By this do you mean a ton of UI creation?

  4. #4
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    406

    Default 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.

  5. #5
    Join Date
    Dec 2009
    Location
    Montreal
    Posts
    8

    Default Thanks

    I appreciate your diligence on this board. Looking forward to getting some applications out with the framework.

  6. #6
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    406

    Default 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
  •