Announcement Announcement Module
Collapse
No announcement yet.
Does IOC in Flash make sense? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Comment


    • #3
      Graphically heavy routines?

      By this do you mean a ton of UI creation?

      Comment


      • #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.

        Comment


        • #5
          Thanks

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

          Comment


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

            Comment

            Working...
            X