I guess the question is not on what OS you are writing your exploit, as it makes no difference. The question is what OS you are targeting, with DEP and ASLR and all that. So either you write your exploit on the target platform or on something else, does it matter? You still have to deal with DEP, ASLR and whatnot if you want to make a usable exploit anyway.