So, I was thinking about this, and a while back did have a discussion with pinback where he told me that indeed the idea of modular combatants is explored in various stories and conceptual settings. Basically, instead of a warship, weapons would just be weapons, and if you could make one work by strapping it, mounting it, or otherwise having it pointed, then that's the idea behind the weapons in those settings.
So, I don't know these stories and don't know how they approach it, but I was just thinking that to answer the problem of stabilization (because for every action is an equal and opposite reaction) as it would relate to a gun in orbit, perhaps the cartridge would have both the propellant for the round, AND the stabilization propellant. The gun would then be able to be really just like a howitzer, which is basically how I am picturing a "fighter" craft. So,, there would be two basic uses for bullets in space, one of them would be surface bombardment, and the other one would be to clutter orbits rendering them overly hazardous. A big gunship is undesirable even today, consider russia's capital ship, which sank to one missile. There was a bunch of ordinance onboard, and in one hit it was gone. With space missiles, being able to hit a ship that is full of all kinds of weapons and ammo will be the easy thing to do, while hitting dispersed equipment will be hard, particularly at ranges where any incoming ordinance will be able to be detected and avoided. The guns will need resupply, but this can be done just as it is today, with a bunch of "trucks" or shuttles, and the crew can man a gun, but there wouldn't need to be things like quarters, food, command and control, etc,, this could all be addressed with the shuttles. Really, the guns could be fully automated and crews could occupy resupply shuttles exclusively, with maintenance and ammunition reload being done as a spacewalk. In this case, the guns would need only small amounts of fuel for attitude control, but would need significant amounts of fuel to counter the force of firing a projectile. Instead of fuel, however, the gun could have both the propellant for the round itself in one part of the cartridge, and the propellent that counters this firing charge in another part of the cartridge, and when fired, it would simply fire both at once, perhaps the cartridge could even have a small amount of cold gas that then re-orients the weapon a few moments after each round before the cartridge is discharged.
Of course missiles will work just like missiles and rocket artillery does,, so why wouldn't cannons work just like cannons have always done? With ships on the water, it's true that cannons need to be on a big ship, because cannons really can't float on the water, but water is different, because the cannon can't float and if it could it wouldn't sit still. In space, however, the only problem is that the repercussion of each shot would need to be countered. All of the rest of the time the gun would just stay where you left it. (well,,,,,,,,,,,,, that's a bit misleading, because orbit is complicated, but much more so than on the water). There can't REALLY be satellites floating on the water,, there are anchored bouys,, and there ARE floating robots,,, but they have a lot of limitations that satellites don't have. A space shuttle could easily just payload a box of rockets, although a missile could just be deployed to an orbit where it would eventually launch from, which parallels rocket trucks and missile boxes, but I feel that the ordinary projectile cannon would also parallel our guns,, and just be a gun, with each round carrying the propellant to counter the reaction of firing the projectile.
The more that I think about it,, this was how it worked in that other discussion, but that's how memory works,.
As you guessed, it's the recoil that is your primary concern. While ammo needs oxygen, it's self contained, meaning a gun would fire in space...but the recoil has to be addressed.
So while you can technically do it, would it be worth the investment of a designing a platform that synchronized firing counter thrusters every time you took a shot?
Magnetic accelerators might be a easier to design and field.
US Navy has been looking at railguns for decades now, this sort of technology may be used in space, although the projectile would still need to be some sort of AI/drone to be able to hit anything.
Those railguns would be even more effective in space. And you are correct, your targeting computers need to be up to snuff. (Basically it's a calculation of the trajectory of the target and the projectile' s speed. You then determine where to fire your railgun at. Depending on the rail-guns rate of fire, you get some leeway).
But, (and it's a big but), you have to keep in mind that the maneuvers we see from space craft in movies, (like X-wings and Tie Fighters banking and rolling), are largely fiction. That then makes a railgun with some solid targeting algorithms behind it, even more attractive.
I would guess that the space battleship will never be a real thing, although having said that their maybe still a place for some sort of big gun platform in planetary bombardment, better targeting than just chucking asteroids at a planet.