The key component is the use of literacy and education. Remember that the key element to success in a dictatorship is control of the minds of the people. Two ways this takes place: (1)educate selectively, educate early, and only educate with knowledge those in power want the masses to have and (2) keep the majority of the masses illiterate and easily controlled. To question the power in control, a person must be able to think for himself/herself. The pigs do both of these things exceptionally well, thus ensuring their power and control.
The pigs are the only ones that are literate, and in this way they can control the rest of the animals. Although their rules are written down, whenever the pigs want to break them, they just either add on to the rules, or pretend the rules say something different. Since they are the only ones who are literate, none of the animals can go against them. In fact, once snowball realizes that most of the animals can't remember the commandment, he boils it down to "four legs good, two legs bad" esentially giving him and the pigs free range to do whatever they want.