Maybe this is obvious, but....
Obviously it depends on what your trying to save. What works for me is using your launcher (I rock Apex) to save your your desktop data. So when you flash something new, you can just hit restore and all the icons (placement and actual icon itself) go back to the way you left them. If you want to save multiple layouts, after you back up 1 theme, go to the internal storage->android->apex launcher and there you will see your backup labeled apex_data.bak. cut and paste elsewhere and now you can backup another theme. If you want to go back to an earlier theme that you backed up before, copy the .bak file back to the apex folder and your good to go.
As far as framework mods go, if you use TW roms, this page is an absolute MUST. All credit to WasabiWa83:
http://xdaforums.com/showthread.php?t=1929403