2 Replies Latest reply on Jan 4, 2011 1:36 PM by SpaghettiCoder

    External Function Files

    SpaghettiCoder Level 3

      Right now I have every function except for public functions as a external .as file.  Is this plain crazy?

       

      Are there any advantages / disadvantages in doing it like this?

        • 1. Re: External Function Files
          Gregory Lafrance Level 6

          What is your rationale for doing so? I think the MVC (model-view-controller) paradigm is most popular in terms of architecture, and I've heard Mate and PureMVC are simpler than others.

           

          In general, I would think methods would be with the components that own them. The only other reason I would externalize them is because they are similar in some way, utility functions, etc.

           

          If this post answers your question or helps, please mark it as such. Thanks!

          http://www.stardustsystems.com
          Adobe Flex Development and Support Services

          1 person found this helpful
          • 2. Re: External Function Files
            SpaghettiCoder Level 3

            It's become a habit now, was just wondering...

             

            Basically

             

            When I get error/problem with the files separated I can easily tell where it's coming from with a quick glance.

             

            resource : what functionName

            path : what component is giving off the error

             

            When the functions are all in one, then error/problem is very generic and hard to tell what function is giving off the error and what component is triggering it...

             

            resource : fileName.mxml

            path : /folderName/src