Louis-Nicolas Flobert

Frenchman Louis-Nicolas Flobert (1819–1894) invented the first rimfire metallic cartridge in 1845. It was a major innovation in firearms ammunition, previously delivered as separate bullets and powder. The rimfire cartridge combined both elements in a single metallic (usually brass) cartridge containing a percussion cap, powder and a bullet, in one weatherproof package. Before that, a "cartridge" was simply a pre-measured quantity of gunpowder together with a ball (bullet), in a small cloth bag (or rolled paper cylinder) which also acted as wadding for the charge and ball.
6mm Flobert.
The 6mm Flobert cartridge consisted of a percussion cap with a bullet attached to the top. The cartridges do not contain any powder, the only propellant substance contained in the cartridge being the percussion cap. In Europe, the .22 BB Cap, introduced in 1845, and the slightly more powerful .22 CB Cap, introduced in 1888, are both called 6mm Flobert and are considered the same cartridge. The cartridges have a relatively low muzzle velocity of around to . 
Flobert also made what he called "parlor guns" for that cartridge, because those rifles and pistols were designed for target shooting in homes with a dedicated shooting parlor or shooting gallery. 6mm Flobert Parlor pistols came into fashion in the mid-19th century; they were typically single-shot pistols with a rather large, heavy barrel. 
The previous form of cartridge had to be rammed into the muzzle or barrel of the gun, and either a small charge of gunpowder in the touch hole, or an external percussion cap mounted on the touch hole, ignited the gunpowder in the cartridge. The brass cartridge opened the way for modern repeating arms, by uniting the bullet, gunpowder and primer into one assembly that could be fed reliably into the breech by a mechanical action in the firearm. The firing pin is then struck by the hammer, which in turn strikes the cartridge primer, which then ignites the gunpowder within.
The main technical advantage of the brass cartridge case was the effective and reliable sealing of high-pressure gasses at the breech, because the gas pressure forced the cartridge case to expand outward, pressing it firmly against the inside of the gun barrel. That prevented the leakage of hot gas which could injure the shooter. It also greatly simplified the loading process, and allowed a ten-fold increase in the rate of fire over muzzle loaded weapons. 
Metallic cartridges with built-in percussion caps (called "primers") are now the standard in firearms. The primer charge is at the base of the cartridge, either within the rim or in a small percussion cap embedded in the center of the base – a "centerfire" cartridge. As a rule, centerfire cartridges, which operate at considerably higher pressures, are more powerful than rimfire cartridges. Centerfire cartridges are also safer, because a dropped rimfire cartridge has the potential to discharge if its rim strikes the ground with sufficient force to ignite the primer. That is practically impossible with most centerfire cartridges.
9mm Flobert.
In Europe, 9mm Flobert smooth-bore shotguns are commonly used by gardeners and farmers for pest control, and face very little to no restriction, even in countries with strict gun laws. These garden guns are short range weapons that can do little harm at distances greater than , and are relatively quiet when fired with shotshells, compared to standard ammunition. The guns are especially effective inside barns and sheds, because the snake shot they use will not injure livestock with a ricochet, or put holes in the roof or walls. They are also used for pest control at airports, warehouses and stockyards.
The 9mm Flobert cartridge can also fire a small ball, but is primarily loaded with a small amount of shot. Its power and range are very limited, making it suitable only for pest control. Fiocchi-made 9 mm Flobert rimfire ammunition uses a brass shotshell, firing #8 shot, with a velocity of .