I don't have any exes but enough of my friends have had them for me to have an idea on how not to treat them. Basically, how not to be an asshole to somebody you once liked enough to be in a relationship with.
1) Don't share or post any sort of pictures or videos of them. Especially the naked kind. Those should be deleted in front of that ex so they know they will never need to worry about it.
2) Don't start rumors. Whether or not they're secrets or made up or even common knowledge, you shouldn't be talking about them behind their back.
3) Once it's over, don't keep begging them to get back together. Either prove that you want to be with them or back the fuck off.
4) Don't get with their friends or family members. Like, seriously, that's just wrong.
5) Even so, if you aren't with them anymore then you have no right to be jealous over who they are with. You're allowed to be pissed if it's a friend or family member, but not jealous.
There are plenty more things, but this about sums it up. I can't imagine not being in a relationship with my boyfriend, but if it ever came to that, I feel like staying his friend would be the only thing that would keep me sane.
When you're in a relationship with somebody, I feel like they are such a big part of your lives- how could you ever betray them or go out of your way to hurt them? That includes cheating and abuse.
So, don't be an asshole.