Ending a marriage or committed relationship is usually really tough. But, when children are involved, the already-difficult process can mean a heartbreaking, frustrating balance between healing and providing some stability and normalcy for the kids involved in the split. There’s no shortage of expert advice on how to make it work, but sometimes it helps to hear from a couple who has actually been through it. In an interview on The Ellen DeGeneres Show recently, actor Ben Affleck offered advice on co-parenting, leaning on his own experience raising children with ex-wife, actor Jennifer Garner. And what Affleck had to say would be helpful to any parent going through a breakup.

Affleck and Garner announced plans to divorce last year, after months of scandal and ugly tabloid reports of infidelity between Affleck and the couple’s nanny. And, until recently, the pair had spoken very little in the press about the process of separating while parenting their three children: 10-year-old Violet, 7-year-old Seraphina 7, and 4-year-old son Sam. Garner broke her silence on the couple’s marriage and divorce earlier this month in a Vanity Fair exclusive, revealing that the couple had been separated for several months before announcing their decision to dissolve the marriage, just one day after their 10th wedding anniversary. (Garner also denied that the split had anything to do with an alleged affair.)

For his part, Affleck participated in a New York Times interview this week where he talked about the difficulties of shielding the couple’s children from the rumor mill. “It ends up being in the record somewhere, in the great miasma of junk on the Internet,” Affleck said.

Garner seemed to agree, saying in her VF interview that it would be easy to let the public coverage seep into how the pair manages their new relationship:

I turned on CNN one day and there we were. I just won’t do it anymore. I took a silent oath with myself last summer to really stay offline. I am totally clueless about all of it. Ben says, ‘Oh, you just don’t care,’ and I say, ‘No, it’s the opposite.’ It hurts me so much, and I care so much. I cannot be driven by the optics of this. I cannot let anger or hurt be my engine. I need to move with the big picture always on my mind, and the kids first and foremost.

That seems to be the single biggest bit of advice the former couple would offer to others entering into the realm of co-parenting: keep the children’s needs at the heart of every decision. Though speaking separately, that theme framed how they each spoke about their marriage and the road ahead. And it was a commitment that DeGeneres complimented Affleck on during his Wednesday appearance on her show.

What I love is — and I think what everybody loves — is that you and Jen are putting the kids first, and we see you with the kids all the time, and I think that’s the most important thing and the most important message to send everybody.

It’s certainly something for which the former couple should be applauded. Divorce is tough on kids, period. But when parents grapple with resentments or acrimony, it can put the kids in the middle of a particularly unhealthy situation.

Affleck had a simple response to DeGeneres’s enormous compliment to the relationship he and Garner seem to be forging, but it spoke volumes about the core commitment that it takes to handle a co-parenting situation:

Well of course. We're good friends and we're doing our best and our kids are fabulous and we're working our best for them.

That’s it, really. “We’re doing our best.” It doesn’t get much simpler — or much better — than that.