The Mayor of Casterbridge can be considered a modernist text because it deals with the transformation of British agrarian society and the rise of agricultural technology and sophisticated farming techniques. This social transformation, which forms the background for Henchard's descent from mayor to laborer, is modernist in the sense that it describes the evolution of a British town from the rigid morality and rusticity of the past into a more uncertain, mechanistic future.
The theme of change, and of the fate of the individual in the face of such change, can be seen as a modernist element. Henchard and Farfrae are the two characters that exemplify this. Henchard, as a representative of the old ways, loses his position to Farfrae, who is educated and is able to become rich due to his superior technical knowledge.
While Farfrae may represent the "new" approach to farming, the book nevertheless focuses on Henchard's moral evolution, or lack thereof. Ultimately, the book turns on Henchard's "original sin" of selling his wife and daughter; this has a kind of folkloric quality that stands in contrast to the harsher "modernist" social commentary of the text. Hardy's interest in how Henchard, as representative of the "old" way of being, is unable to cope with Farfrae's innovations, ultimately separates it from more conventionally modernist texts.