You had an aggressive fermentation, probably caused in part by the warm fermentation temperature, but they are not uncommon. You did exactly the right thing to correct it. The other option would be to set up a blow-off tube, a piece of tubing that replaces the airlock and runs from the top of the fermentor to be submerged in a container of water.

I would suggest that you also lower the fermentation temperature (not "brewing", which is the boiling step) to less than 70F. Different strains of yeast have different preferred temperature ranges, and different flavor profiles that are expressed within that range. For most Ale yeast, 70F is about as warm as you want to ferment and 62-68F is usually better.