Another alternative is to separate your interface code from the rest of your application by trying to stick to a "model view controller" model as closely as possible. Then redo the interface for a new platform, if you use graphical interface tools.