Mechanical movie guns seem to fall under 3 different categories (at least based on the scarce info out there regarding Hollywood armourers.)
1)Real weapons adapted to fire blanks. As I understand it, the barrel is plugged but with a small hole in it to allow the gas to go through. The plug is what allows enough pressure to be generated to cycle the action and eject the brass. The small hole lets you see the flash.
As to why you don't see recoil, it's basic physics. For every action there is an equal and opposite reaction. If you're using a force to push a 230 grain bullet down the barrel of a gun, then logic dictates that there will be a force equal and opposite to that, ie recoil.
If you aren't pushing anything down the barrel of the weapon then there is going to be an equal and opposite force applied to nothing. So a force of nothing in one direction results in a force of nothing that is equal and in the opposite direction.
2)Guns that aren't guns at all, but use some form of flammable gas to do muzzle flash. These are mostly seen as scifi guns. Since they aren't really guns, they don't generally cycle or eject brass.
3)I have no idea what it's called, but several years ago a group of guys at one of the practical effects houses designed a new type of movie gun that uses a non-flammable powder and can be safely discharged as close as 18 inches from another person. IIRC, the first movie that used this type of design was 'Alien: Resurrection'
Of course the above three categories don't include other varieties of prop guns, including plastic/rubber non-firing replicas, or stuff like custom designs or airsoft.
As to the whole 'why did he just fire 27 rounds out of a revolver, or cock the hammer on his Glock' those are generally continuity and/or foley errors. (So even if the director, actor, and everyone else on set know what is proper it is possible for the movie to get messed up in the post-production process by someone who doesn't know- editor, foley artist, etc.)