Ibsen's play stands as an example of modern realism because portrays truthfully the characters and the conflicts. The play lacks sentimentality and romance of any kind. Nothing is glorified. There is no "happy ending." The ending instead is rather shocking, given the society in which Nora lives, but it is consistent with the way in which her character has been developed throughout the drama.
The marriage between Nora and Torvald is presented realistically for what it is: a sham. Nora points this out to her husband in the play's conclusion, explaining that they have been "playing" at marriage rather than living in an authentic partnership of mutual caring and sharing. Their home has been only "a doll's house." Ibsen shines a strong light on the Torvalds' relationship, softening none of its aspects.
Torvald's character is treated realistically, as well, revealing his arrogance, authoritarianism, and selfishness. His "concern" for his wife is not romanticized. Torvald does not "take care" of Nora because he loves her; he "takes care" of her only because he treats her as his inferior. In truth, he does not take care of her at all. He only controls her, exercising his power over every detail of her daily life.
The play's conclusion is also realistic. As a genre, realism does not specifically demand an "unhappy" conclusion, but it does demand a concusion that is consistent and reasonable, given the circumstances. Nora's leaving Torvald is consistent with her character as she has grown in self-awareness. The play does not offer a sudden "happy ending" with Nora and Torvald falling into each other's arms. Even when Torvald swears he will change and begs Nora to stay, she looks truth in the face and rejects his promises, placing no faith in his integrity.
Ibsen does not glorify or romanticize Nora's leaving. She will be separated from the children she loves, and she will have to make her way in the world alone. Nothing in her life has prepared her for what lies ahead. Her future will not be an easy one. There is no glory or sentimentality in A Doll's House," only painful choices.