Many (Or perhaps all) of those strategies are discussed here.
The information listed for Mario Kart 7 says it can be avoided using a mushroom (To boost you out of the blast area after it flys above you just prior to attacking), an invincible star, or a bullet bill.
Or drop out of 1st place before it attacks you (Which is how I handle it in Mario Kart games). I'll drop back to 2nd or 3rd at a safe distance and wait for the leader to be attacked.
Spiny Shells can usually be avoided by a star,or simply looking at the map and letting the 2nd place guy take the lead and get hit (usually what I do). Or a damn crafty turbo boost at just the right time.
A shame it's not like the original grounded version that you could avoid by driving into a wall and quickly turning (okay okay that only works in Super Circuit where you can also not hit crabs by doing the break button),really could've improved that part.
Best Mario Kart game? Certainly not,but I'll be darned if it isn't the best in ten years.