The book was in some ways inspired by the life of a schoolfriend of the author who became a doctor. Flaubert's friend and mentor, Louis Bouilhet, had suggested to him that this might be a suitably 'down-to earth' subject for a novel and that Flaubert should attempt to write in a 'natural way', without digressions. Indeed, the style of the writing was of supreme importance to Flaubert. While writing the novel, he wrote that it would be 'a book about nothing, a book dependent on nothing external, which would be held together by the external strength of its style'.: an aim which, for the critic Jean Rousset, made Flaubert 'the first in date of the non-figurative novelists' such as James Joyce and Virginia Woolf. Although Flaubert avowed no liking for the style of Balzac, the novel he produced became arguably a prime example and an enhancement of Realism in the vein of Balzac. The 'realism' in the novel was to prove an important element in the trial for obscenity: the lead prosecutor believing that not only was the novel immoral, but that realism in literature was, in itself, an offence against art and decency 
The realist movement was, in part, a reaction against romanticism. Emma may be said to be the embodiment of a romantic: in her mental and emotional process, she has no relation to the realities of her world. Although in some ways he may seem to identify with Emma, Flaubert frequently mocks her romantic daydreaming and her taste in literature. It is often asserted that Flaubert said 'Madame Bovary, c'est moi' ('Madame Bovary is me') but the accuracy of this assertion has been questioned. He never wrote such a thing and in his letters often distanced himself from the sentiments expressed in the novel. For example 'Tout ce que j’aime n’y est pas':'all that I love is not there'(letter to Edma Roger des Genettes) and 'je n’y ai rien mis ni de mes sentiments ni de mon existence.':'I have used nothing of my feelings or of my life'(letter to Marie-Sophie Leroyer de Chantepie)  For Mario Vargas Llosa, Emma's choice of reading may have contributed to her inability to come to terms with the situation in which she found herself. 'If Emma Bovary had not read all those novels, it is possible that her fate might have been different.' 
Madame Bovary has been seen as a commentary on the folly of aspirations which can never be realised, or a belief in the validity of a self-satisfied, deluded personal culture, termed 'bourgeois' and associated with Flaubert's period. For Vargas Llosa, 'Emma's drama is the gap between illusion and reality, the distance between desire and its fulfillment' and as such shows 'the first signs of alienation that a century later will take hold of men and women in industrial societies'. However, the novel is not simply about a woman's dreamy romanticism. While it is true that Emma is lost in delusions, Charles is also unable to grasp reality or to understand Emma's needs and desires.