How did Kazakhs live and fight with Dzungars?

Over the centuries, the Dzungarian Khanate terrified a large part of the Eurasian continent. A powerful army, ambitious plans for conquest and a bloodthirsty temper painted the image of a powerful and merciless enemy. A cruel hammer of the Dzungarian military campaign passed through the Kazakh lands. 

In the epic, it remained as "Years of the Great Disaster". A real cry of the wounded Kazakh people, who survived the fiercest battles with the Dzungars in the period from 1723 to 1727.

But the history of the relations between the Kazakhs and the Dzungars has a much longer term and is written not only in blood. 

How Jungars threatened the Eurasian continent? What happened on the expanses of the Kazakh steppes in the 17-18 centuries? How did the Kazakhs live and fight with the Dzungars? Were those two nations so unequivocal enemies?