Separation of concerns -- as long as the layers of your app are not dependent on each other, just rewrite one layer when its tech is dying. In your example, rewrite the Flex layer, keep everything else. Tech lasts when you can rip out a single piece and make a better version without requiring a full re-write of the entire stack.