The animals' main aim in Animal Farm is to rid the environment of humans and to be independent. As the foundations of Animalism are slowly eroded, the animals once again become more dependent on human interaction. Having been smart enough to defeat the humans, the animals are ultimately, although without realizing it, 'defeated' by the humans. The ultimate insult is to return to the name "Manor Farm."
The Battle of the Cowshed and The Battle of the Windmill can be compared as they are both instances when the humans try to retake the farm.
By contrast, the first occurs when the humans are outwitted by the animals -mainly Snowball - luring them in when they think the animals are in retreat. The latter occurs when the humans have duped Napoleon and laid dynamite by the windmill.
The Battle of the Cowshed is declared a victory with Snowball and Boxer even receiving medals: “Animal Hero, First Class.” The Battle of the Windmill is also declared a victory
and the gun is fired to celebrate
although their is nothing victorious about it as everything is destroyed. Snowball features in both instances although in the second, he is only mentioned as being instrumental in apparently conspiring with the humans.
By contrast, after the Battle of the Cowshed, awards are handed out even to the lowly Boxer but after the Battle of the Windmill, the celebrations take on a sinister air and Napoleon gets drunk. Another Commandment then has to be changed.
The pigs are able to manipulate the truth after the Battle of the Windmill and Squealer explains any discrepancied away. Even before the Battle of the Cowshed, and certainly afterwards due to his elevated status, Snowball, having accepted the 'milk and apples' charade was part of - not intentionally it would seem - the descent into a society governed by a class system. After the Battle of the Windmill, more propaganda allows the pigs to continue rewriting history.
Both Battles allow the pigs to further their aims and establish themselves as the "leaders" and the very thought of returning to life under Jones - although the animals don't really remember it - is enough to maintain an air of blind faith in the pigs.
Refer to the eNotes study guide and navigate to the pages for further assistance in establishing the connections between these two important events.