The question posed is can you be friends with your ex and not let it affect your marriage? It takes boundaries and maturity and clear communication from all parties involved. Now if children are involved then you definitely have to put the kids’ needs first before your personal feelings. You all should be able to get along cordially for the sake of the children so they don’t feel like they have to choose sides.