3 Replies Latest reply on Nov 21, 2009 5:54 AM by nikos101

    Flex Worst Practices: How not to code Flex


      Being completely new to Flex, I found this video quite informative.


      Posting this hoping that others also find this informative. But, I'm also curious if anyone has any comments on the presenter's guidance. One that I was curious about was his preference for when to use states vs. the ViewStack.


      From MAX 2009:


      How Not To Code Flex





        • 1. Re: Flex Worst Practices: How not to code Flex
          CMcM00 Level 1

          Also, perhaps there are other worst practices those of you with more Flex experience could share that you wished the presenter could have mentioned...?  Those of us just learning Flex would love to learn what kinds of things to avoid!!




          • 2. Re: Flex Worst Practices: How not to code Flex
            David_F57 Level 5



            Well the first one has to be not to produce a learning video which after 3 minutes is still background noise and an image of what the background noise is supposed to be about. Stop button pressed, interest lost.....


            Ok not knowing what the content was beyond the coughing and feedback noises that the first 3 minutes was based on here are a few of my thoughts


            Don't re-invent The wheel-

            Many developers(including myself) fall into the habit of coming up with some really 'smart' coding to resolve a problem when the answer was right there in an api call. Moral of the story is to spend time getting to learn the capabilities of  classes and components. Going through each of the components and just looking at all the properties they possess and understanding what they can do for you is a huge step in the right direction(also looking through the code of these classes should help with learning about coding structure, we at least have to trust Adobe as this is their product ).


            Overly Complex Code-

            Never try to get to clever with code, especially in a team environment the KISS principle always makes it easier for someone else to come along and work with your code without it causing cluster migraines.


            Don't ignore available resources

            When you are not sure ask, there is no such thing as a stupid question, and the chances are anything you are trying to do has already been done by somebody else.


            Don't forget your friends

            Google, Adobe Developer Connection, Blogs from respected members of the Flex community.


            And the biggy - learn to separate the BS from the reality. Obscuring code through to many layers of abstraction(read mvc frameworks) does nothing to assist good coding practise. Structured approach to programming is a skill that should be acquired, not handed over to little black-boxes.




            • 3. Re: Flex Worst Practices: How not to code Flex
              nikos101 Level 2

              Good reply David