The .357 magnum is a standard-setting self-defense cartridge and is capable in the right loads of being a capable hunting cartridge. The revolver platform allows an unparalleled (by any autoloader) flexibility in bullet design, shape and construction as well as a range of load levels that will function perfectly--from powderpuff gallery loads to firebreathing dragon slaying loads. However, the .357 mag (in a revolver) holds only 5-8 rounds, and a double action revolver is not the easiest gun in the world to shoot quickly and accurately and with control. It also transmits a fairly full measure of recoil to the shooter.
The 9mm's projectile is only .002 smaller than .357. In modern loadings, it is generally accepted as an effective (not standard-setting) defense load. It does not have near the flexibility of the .357 in power level (because of the need to cycle a semi-auto platform) and is basically stuck at the level of a very modest mid-range .357 self-defense load. It also has less flexibility in bullet design, because they have to feed in an autoloader. Modern bullet design has made this less problematic than it used to be. You can fit a lot of 9mm into a semi-auto handgun, and they are generally easier to shoot accurately and with control than a revolver. The 9mm is among the most gentle-recoiling rounds among standard self-defense rounds.
When 9mm semi-auto handguns came on the scene in American shooting, it was .38 special--not .357 mag--revolvers they generally replaced (and the power level of the 9mm is closer to a .38 +p than a real .357 magnum). I wouldn't have said the comparison of 9mm and .357 is a common one, but that's how I'd basically draw it up.