To answer your question, we have been given very little combat info.
Here is what we do know:
1) Each weapon type has a range, damage, a rate of fire, and accuracy. So a damage 10 missile may do different DPS than a damage 10 kinetic weapon for example.
2) Defenses only affect 1 type of attack (armor vs kinetic, PD vs missle, shields vs lasers). However, a big change is that defenses decrease during the course of a battle, though we still don't know exactly what triggers that.
Here is how damage is applied:
When an attacker ship hits a defender ship, if the defender has no defense of the appropriate type, the weapon does max damage (displayed in red on battle log) to the hit points.
If the defender has even 1 point of defense left of the appropriate type, the damage done (displayed in orange) is applied instead to the defense, thus lowering the defender's defense against future attacks. As long as even a single defense point is available, no damage will affect the defender's hit points.
The amount of damage done to a ship's defenses is unclear. It is not a simple (attack-defense) calculation, and since there are rounding issues, I assume that there is some calculation based on the ratio of attack:defense. I have never seen my basekiller ship with 20 attack do more than 9 damage to a starbase with defense 10, so that might be a clue.
Note that due to rounding issues, the orange damage amounts displayed on the battle log sometimes do not match exactly with the damage done to a ship's defenses.
Also note that when a weapon fires, the defense reduction on its target is done immediately, but the ship will not display its lowered defense number until the next weapon (from any ship in the battle on either side) fires their next weapon. So if you are watching the battle and the ship icons on the bottom of the battle viewer, you will notice this delay.