Depends. Beam lasers help with the mosquitos (I turret them because they're only for the small garbage). Cannons (from what I hear) punch a class above their weight. So, small cannons are "effective" against medium hulls. If you go cannons, you may want to long range them; that gives you the option of turrets that actually hit targets or projectile speeds more comparable with your other gimbaled weapons so they're not constantly out of the fire arch during maneuvers.
Rails are fine... but, I just find they're more of a distraction from a coordinated assault which costs DPS performance.