The best vaccine would mimic the real infection exactly, but not cause any signs of disease at all. It would be able to stimulate the immune system exactly like the wild virus or bacteria in order to cause the maximum protection with both humoral and cell-mediated immunity, but be perfectly safe. In the real world we often have a compromise between these two ideals.
Until recently, killed vaccines have been the safest available. They are completely inactivated, so there is no chance they can revert and become infective. If they are shed in the animal's urine or stool there is no danger to other animals because the virus is incapable of infecting anything. However, they are also poorly immunogenic. They do not stimulate a big immune response because they do not replicate. They are quite quickly eliminated from the system. In order for the body to be able to "see" the antigen in the vaccine for a longer period of time and stimulate a better immune response there are adjuvants added to the vaccine. Adjuvants cause a local inflammatory response that brings more immune cells in contact with the antigen for a longer time and improve the immune response. Adjuvants can cause their own problems; they have been implicated in some cases of tumor formation and in allergic responses.
Modified live vaccines are more like the wild pathogen. They produce stronger and longer-lasting immunity, but they are not completely inactivated. During the production of these vaccines the organisms are attenuated the organism is unable to produce the disease in the normal host. There are extremely rare occasions when these attenuated organisms are able to revert to a virulent state and cause disease in the animal receiving the vaccine. Some modified live vaccines also contain adjuvants.
The latest breakthrough had been the development of recombinant vaccines. Recombinant DNA technology has led to a number of vaccines that will give strong, long-lasting immunity without adjuvants and without the risk of reversion.
An example is the vectored canine distemper vaccine by Merial. To make this vaccine canary pox virus, which is completely non-pathogenic to dogs and cats, was modified so that its DNA carried small strands of the DNA from the distemper virus. As the canary virus replicates itself in the dog's body, it also produces distemper virus surface proteins. These proteins are recognized by the dog's immune system. The immune system produces antibodies to these proteins, and voila, without being exposed to the actual distemper virus the dog has antibodies to distemper and is actually resistant to distemper infection.