Announcement Announcement Module
Collapse
No announcement yet.
hm. I'm checking the examples. so, what's the point? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • hm. I'm checking the examples. so, what's the point?

    so, I found this line in one of examples
    private var _includeClasses:Array = [StaticMovieSource, CSVMovieSource];
    so, what's the point? if I need to recompile it anyway if I change classes.

    why not load these classes dynamically from external swfs during runtime?
    otherwise there's no point in doing this.

    am I wrong?

  • #2
    Hi Valentin,

    you are absolutely correct. We have already been talking with the developers about adding class loading support by loading swf's that contain extra classes. The main issue is that class loading will happen asynchronously and that this will have a big impact on the internals of the IoC container.

    Here's a snippet from our previous discussion. Please let me know your thoughts on this.

    My take on this is that to keep things simple, we should probably by default preload the swf's that contain extra classes, add them to the application domain and then dispatch the complete event of the application context. That means that the loading will take longer, but we won't have to deal with async issues in the object factory.

    The swf's could be defined in the context:

    Code:
    <objects>
      <swf id="swf_a" file="path/to/my/swf_a.swf"/>
    </objects>
    regards,
    Christophe

    Comment


    • #3
      I need to develop an ioc container with classes loading from external libraries, there may be many classes in one library or just single ones, not all classes might be needed at some particular section of the site.

      That's why I started researching what is already available for AS3 and was surprised to see that people don't load classes dynamically during runtime.

      My task is a bit different from a general ioc container, but in a simple case of course preload all classes from swfs, fire an event and start application. That's the easiest way.

      Comment


      • #4
        simple solution for class including

        I've been using a simple XSLT ANT Task to include the class names in my configuration file. I've written a short PDF tutorial that sort of outlines what I do.
        This solution might not be for everybody, but maybe it'll help somebody out, I've attached a zip file with the PDF to this message. Have a look and see if it is of use to you...

        Cheers,

        Roland

        Comment

        Working...
        X