Dialect is a form of language specific to a region or group. Dialect conveys the specific words and patterns of speech -- as a result, it is a very realistic technique. Dialect allows the reader to experience the way a character would speak in real life.
Heroic characters, tragic themes, and imaginary settings appeared much earlier and therefore are not realist techniques.