It depends on the person, the circumstances of the breakup, the length of time I was with them, and whether or not I really wanted to be friends.
I have an ex who I was with for over 7 years who I am still very good friends with (as you know), and I will always be friends with him simply because of the history that we had together. And that's actually saying something about our ability to be friends because I left him for another man, and he hated me for a long time, but once all that died down, we became friends again.
I am not friends with other ex's, not because there are ill feelings, but simply because I have no desire to be friends with them. And there is always the fact that the new girlfriends don't allow them to be friends with ex's because they're too jealous to let them be friends with an ex.
When a breakup first happens, then it's difficult to remain friends with that person. But, in time, once the feelings are gone, then you can be friends with someone if you want to be. It can be done, but as long as there are any lingering feelings, it is not a good idea because it will lead back to wanting to get back together, etc.