I did this and had a very good experience. I think there are several keys to making this work:
1) Have a good long talk about exactly what you both want and timelines you will stick to.
2) Be open and honest about everything the whole way through. Don't let feelings simmer and turn into aggressive behavior.
3) Make sure you have an agreed upon way to each use the boat alone. DO NOT get into a situation where it is assumed that if one of you wants to sail, the other one is always free to tag along.
4) Agree upon the annual budget for the boat in advance. Discuss exactly what you are going to spend it on. Stick to that budget. Make sure it includes a reserve for an emergency.
5) Unless you reserve is quite large, discuss in advance what would happen if you hit a very large, unexpected expense (such as a re-power).
6) Have an agreement in advance about the buyout cost. Also have a "what if" agreement covering a situation where one of you wants out of the agreement early.
I would highly recommend that you split all costs, including the purchase price, 50/50, and then at the end of the time period have him buy out your half of the boat for half the original cost.
This is pretty much what I did. I think this works well if you are only talking about core boat systems and the boat starts out in reasonable shape. I would probably not be willing to pay 50% of expensive electronics or other expensive luxuries, especially in the last years. As long as you carefully discuss the details of the budget in advance, and your budget is realistic, you should not have too many disagreements about $$.