2 Replies Latest reply on May 17, 2011 2:37 AM by Bootstrapper234

    Bootstrap loader on web Flex application

    Bootstrapper234

      Dear all,



      I am working on a new portal using FlashBuilder 4.1. As this portal will have to load many sub applications, developped in several flex versions, and as some of these sub applications will have to communicate, i think that the best design pattern for this portal is to use a bootstrap loader. This bootstrap may contain the devices that would be required for internal communication.

      The whole portal would run in the same Security Domain. Bootstrap loads a main application in a child application domain of it, and then the application will load all other applications using bootstrap's application domain:

      loaderContext.applicationDomain = new ApplicationDomain(bootstrapAppDomain);


      I am currently not able to load several classes in my bootstrap (as ErrorMessage, ConfigMap, ... as described in online documentation on bootstraps): i encounter error 1065:

      #1065: Variable mx.messaging.messages::ErrorMessage is not defined.


      I know that this kind of question has allready been asked in this message, and i did add the option -static-rsls to my bootstrap project; however, i encounter a set of compile time errors that i cannot explain:


      1172: Definition mx.core:ClassFactory could not be found.

      1172: Definition mx.core:DeferredInstanceFromClass could not be found.
      ...
      As i am using FlashBuilder, and as i cannot load an application directly from an action script file, i did create a flex "application" that inherits from my bootstrap (replacing application tag by myBootstrap tags).
      What can i do to build my project properly?
      Did overriding my bootstrap in an mxml the right thing to do?
      I saw on forums that bootstrap should not be used anymore... What about that? Is that in all cases? Is there a reference documentation anywhere about that?

      Many thanks in advance for your help.
      Regards,
      Greg
        • 1. Re: Bootstrap loader on web Flex application
          Flex harUI Adobe Employee

          Bootstrap configurations are fragile.  It must be maintained on the most

          recent SDK you are using, and you never know when some change in the SDK

          will break your bootstrap.

           

          The most recent FlashPlayer releases have bug fixes that make bootstraps

          unnecessary in many situations.  Each subapp can now have its own data class

          definitions for RemoteObject and other AMF translations.

           

          Depending on the kinds of communication, it might be better to Marshall data

          across applicationDomains instead of using a bootstrap.

           

          Missing classes are probably due to certain swcs not being in the

          library-path.

           

          I don't know how folks set up FlashBuilder for bootstrap projects.  I just

          use ANT.

          1 person found this helpful
          • 2. Re: Bootstrap loader on web Flex application
            Bootstrapper234 Level 1

            Hi Alex,

             

            Many thanks for your quick answer. I have a look on what i can do using marshalling.

             

            Regards,

             

            Greg