4 Replies Latest reply on Aug 15, 2011 4:18 PM by drkstr_1

    What are your tips?

    Adrien. Level 1

      When you create applications in Flash Catalyst, lets say they are 5 states. You have lots of animation and interaction. things sliding in and out and it looks awesome. So then you need to apply your business logic to it. Problem is when you bring your flash catalyst project into flash builder 4.5 and open up main.mxml your looking at roughly 800-2k lines of code.

       

      How do you as a developer work with such a file? How do you apply the business logic to this type of project? I am use to small, very small files that are easy to apply business logic two, how ever where would you as a developer start?

        • 1. Re: What are your tips?
          Amy Blankenship Level 4

          I'd start by realizing that generated code is not normally going to be appropriate for production, and plan on rewriting it. Failing that, here are a few strategies that may work for you:

           

          You could use a Presentation Model to encapsulate the business logic, and then operate that PM from the View that Catalyst built for you http://blogs.adobe.com/paulw/archives/2007/10/presentation_pa_3.html

           

          If you use Robotlegs (or you'd like to), you can approach it from the other side, creating a Mediator that can operate your View based on events it receives from the rest of your app.

           

          HTH;

           

          Amy

          1 person found this helpful
          • 2. Re: What are your tips?
            Adrien. Level 1

            In such an example it would be difficult to go and re-write the whole code base, I assume this is what Flash builder is for. To build the presentation layer. I see how they built the buisness logic which is what I thought it would be like.

             

            Do you have any other tips for a project that uses flash cat to build the presentation layer and fb 4.5 to build the business logic?

            • 3. Re: What are your tips?
              Amy Blankenship Level 4

              It's actually much easier to deconstruct and rewrite even bad code than to start from a blank slate.  But, if you actually read what I said, I gave you two other options.  Pick one

              • 4. Re: What are your tips?
                drkstr_1 Level 4

                I find the workflow easier to start with the component logic in Flex, than use catalyst to build the skin and supply the graphic assets as a "theme", rather than use it to build a fully working application. I will usually mockup the app in catalyst first, build the components in Flex, and finally polish up the final graphics in catalyst.