YES, all these points you bring up in your post, are the things flying through my mind. It's like having to maintain twice as many files, just for the purpose of creating a clean separation of the two. This is why I am torn, and wanted to ask everybody else. I was fortunate enough to be introduced to Cairngorm from the very beginning, and as painful as it was, wrapping my head around it while learning Flex too, I am SO happy that I did it. So, I want to make sure I do the same thing with CodeBehind - because it really would mean a huge task of recoding applications. I just need to know for what? Peace of mind? Well, maybe.... :) Thanks everybody for contributing to this thread - and I know this was just discussed not too long ago, but the end result really didn't lean one way or another. Mike
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ralf Bokelberg Sent: Thursday, February 08, 2007 3:20 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] What's the "official" consensus of using CodeBehind?? What is your reasoning to use code behind? Why would you want to double every class and add an additional inheritance layer just to separate Mxml from ActionScript? Why would you want to declare every component you are using twice, once in AS and the second time in Mxml? Is it to separate presentation from functionality? Generally this is a good idea, but i think it is important where to draw the line between the two. When you think of traditional systems with a template engine as the presentation layer, the templates also contain some code to build the presentation, while the functionality is implemented by plain classes. Now if we translate this thinking to Mxml and ActionScript, we should leave all the code we need to build the presentation inside the Mxml files and factor out the real functionality into classes. So i'd say, there is nothing wrong with ActionScript in Mxml files as long as it is strictly presenation related. Cheers Ralf. On 2/8/07, Mike Anderson <[EMAIL PROTECTED]> wrote: Hello All, Could some of you more savvy coders, please take a moment of your valuable time and throw some words of wisdom out there regarding CodeBehind? Since I love using Packages and Classes, it feels very natural for me to use this method. BUT, based on where things are going with Flex, is this considered to be a "good programming practice"? I would love to know sooner versus later, so that I don't have to back and redo a bunch of coding. I am a REAL stickler when it comes to good coding practices. Thanks in advance for your time on this, Mike -- Ralf Bokelberg <[EMAIL PROTECTED]> Flex & Flash Consultant based in Cologne/Germany Phone +49 (0) 221 530 15 35