There are benefits and drawbacks to either way.
I have done parks before, after, and bookended. I like parks after personally. Parks before seems to be a waste for me. Usually we are so excited about the upcoming cruise that it sort of overshadows the parks. Also, if you take Disney transport from the parks, you end up boarding the ship later. I prefer to arrive the day before and either stay at the airport (if using Disney transport) or rent a car and stay near the port. They way you can get on board early.
Parks after is nice because, unless you get a good flight time, you end up spending hours at the airport. It's also nice because a few days at the parks are a nice transition to the end of vacation. We usually take a later flight so we can do some things, even if it is only Disney Springs on the day we leave. The last day on the ship is hurry up and get off.
-dave