Take time apart. Every relationship needs a cool-down period after a breakup for each individual to reflect on the time together and to re-frame her sense of identity, purpose and direction. Use this time apart to take up a new hobby, learn a new skill, or really immerse yourself in your career. Reflect on the relationship, taking account of lessons learned and things you would like to avoid or replicate in future relationships.
Do not have sex with your ex. This is the original sin of dating relationships, and it is a recipe for disaster. Because sex usually occurs within the confines of an intimate partner relationship, sleeping with your ex blurs the lines between friendship and partnership. Also, it can drastically diminish your opportunities to explore another prospective relationship.
Talk to your ex about your dating escapades. This is the test of true friendship. If your ex refuses to hear about your new love interests, or if you feel yourself squirm when he talks to you about his budding romance, you are probably not at the stage to be "just friends."
Be realistic. It is not always possible to remain friends with an ex. If you were friends prior to your relationship, it is highly unlikely that things will go back to the way they were before you began dating. If you were not friends before your relationship, you may find that there is not enough commonality between you to sustain an enduring friendship.
Be aware of your motivations. Are you secretly hoping she will fall back in love with you? Are you really just interested in the sex? If you are trying to keep your ex around for other reasons besides her friendship, your motivations are probably not honorable or honest.
Know when to walk away. If for all your efforts the friendship refuses to get off the ground, accept it as a lesson learned. Don't beat yourself up if a post-relationship relationship doesn't bear fruit. Know that you did the best you could, and focus your attention on the other close friendships in your life.