Yoann on flex

July 6, 2007

Code behind, or not code behind ?

Filed under: Code behind, Flex — yoyoann @ 8:16 am

I was just reading a bunch of blogposts and I saw one about code behind which hooked me.

Code behind is a pattern consisting in separating the view and the logic. There is an official way to implement it in Flex, as advocated by Adobe : Using Code Behind.

A bunch of time ago, I created my own component using this pattern and really couldn’t see any use to this, but I kept the thing in mind thinking it could become useful sometimes. When I saw this article today, I thought “oh maybe I will be able to get the point in using this”, and I started reading… I learnt really few things in the post, but one comment had a link to aTink BlogPost where he advocated that Flex’ way of doing code behind is bad. I must admit I agree with some of his statements, most in fact, but I don’t love his method any much than the classic one using inheritance : it looks like the very classical include everybody has been using with javascript, and which clearly wasn’t very really easy to maintain.

So I think I will go on using nothing like partial classes and code behind, and the script tag along with data binding should be fine for me.

Blog at WordPress.com.