IIRC, hull bonuses are applied first, then armor.
For beam attacks, I would guess that hull bonus and armor is applied and the resulting amount subtracted from the beam's total (for the punch-through beams, the spire beams function differently and it is irrelevant).