I'm amazed that it is only literally just now that the first major consideration of writing through the lens of sociolinguistics is being done -- Theresa Lillis' book The Sociolinguistics of Writing having just been published this month. The written/spoken divide is wider than I thought, I guess!
Let me try to trace this.
Old-school structural linguistics is all about language as a system, a mental abstraction in your head. Not actually that interested in 'usage' per se. Interested in the 'ideal speaker/hearer' (after Chomsky) -- the abstracted native speaker whose brain has in it the standard native language he/she acquired from birth.
Standard, idealized language, of course, is something that people rarely produce. (Hence the distinction between competence and performance in theoretical linguistics.) But it is something we can codify -- NB, write down -- and it's here that a weird paradox emerges, which Per Linell calls "the written bias in linguistics." Even though writing is a technology, a cultural innovation that allows us to represent language (that is, speech) in an abstract way, there is somehow a deep connection assumed between standard language, written language, and (crucially) that idealized NS speaker/hearer language deep in our brains. Linell's book points out that "language" is essentially conceptualized as a "structured set of forms, used to represent things in the world" in linguistics, and that this has led to an equation of written language with language, period.
Sociolinguistics, on the other hand, is not interested in 'pure language,' and though this might muddy the waters a bit, many social approaches that could be vaguely subsumed under sociolinguistics are not. Sociolinguistics is the natural result of years of thinking toward a conceptualization of language as a social practice rather than (or in addition to, to be more charitable) a set of forms.
Sociolinguistics concerns itself with language usage -- data from real people using language, usually in the form of speech. So I'm wondering if it's because of the huge gulf in focus between language as a social practice people and language as forms people that sociolinguists don't ever seem to have considered written texts worth examining when it comes to to the central concern(s) of sociolinguisitics: language variation and language change.
Is it really only in 2013 that this is seen as a reasonable thing to study, or is this something that disciplinary boundaries hath wrought? In other words, is it that texts are seen as the property of rhetoricians, philologists, literary theory people, or even structural linguists (stylistics?)? Is it that applied linguistics has come up with its own ways of analyzing written texts that doesn't really care about why certain groups of people use language differently in writing than others, or why writing practices change?
Is this a brand new field that is wide open, or has it just been taken for granted that the work is already being done by different people under different names?