Grammar instruction must begin with what students already know about grammar (quite a lot it turns out) and build from there based on the student's own writing. Like most learning, context is everything, and the best context for learning grammar is the student's own writing. Instead of thinking of grammar as a set of rules to be followed, we need to think of grammar as a set of tools to be used by the writer in the process of meaning making.
One of the great things about teaching writing is that evidence of what students know and don't know is constantly available on the page right in front of us. When we see second grade students beginning every sentence with "and", we know we can teach a lesson on sentence variety and have students practice in their own writing. This is so much more effective than decontextualized lessons about the "rule" of not starting a sentence with a conjunction, which by the way is not a rule. There is no rule in English that says we should not start a sentence with a conjunction. It is just that stylistically it is not a good idea to over use that structure.
If our third grade students are using a lot of short choppy sentences in their writing, we know to teach a lesson on sentence combining and coordination. If students are using dialogue in their writing, it is a good idea to teach them how to punctuate it (and also how to use dialogue effectively to move the plot forward or reveal character).
One of my favorite ways to teach grammar in context is to show students examples of professional writers breaking the rules. Here is a passage from the short story My Grandmother's Hair, by Cynthia Rylant.
We talked of many things as I combed her fine hair. Our talk was quiet, and it had to do with those things we both knew about: cats, baking-powder biscuits, Sunday school class. Mrs. Epperly's big bull. Cherry picking. The striped red dress Aunt Violet sent me.
Some students will immediately spot that Rylant has three sentence fragments in this passage. I would ask them how they know? How could you make these fragments into sentences? How does changing them into sentences change the feeling of the paragraph? Why do you think Rylant chose to use fragments? When might it be ok to use sentence fragments in our writing? Is there a place in your own writing where you could use this technique of listing to good effect?
I believe that looking at the use of fragments in professional writing is an effective way to help students learn what fragments are, to spot them in their own writing, and if they choose, use them for effect.
Here is another passage from the same story.
But we didn't always talk. Sometimes we were quiet. We would just think, and my small hands would move in my grandmother's hair, twirling, curling, rolling that soft grayness around. We thought about good things, the big clock in the living room ticking, and sometimes my grandmother would shiver and we laughed.
And "Whoop! There it is!" Rylant using a conjunction to open a paragraph. Another point for discussion. I would also want my students to notice that Rylant varies her sentence length here, starting with two very short sentences and moving to two longer sentences. And then there is the alliteration of "twirling, curling, rolling." So much to talk about.
And then there is this compound-complex sentence:
I was a thin, blond headed little girl, and I would climb up on the back of the couch where my grandmother was sitting, straddle her shoulders with my skinny six-year-old legs, and I would gently, most carefully, lift a lock of her soft gray hair and make my little pink comb slide through it.
I would have the students work together to break the sentence down into component clauses and then put them back together again in a variety of multi-sentence and single sentence combinations. These lessons would always be followed by having the students go back to their own writing to see if they could apply what they learned.
One area where a focus on grammar as meaningful work is highly effective is in sentence clarity. Some of my students, whether in elementary, high school or college, have a great deal of trouble consistently writing clear sentences. I think lack of clarity is partly a lack of experience as a writer, but mostly due to a lack of a real audience in the mind of the writer. When students write without a clear sense of audience they often, in Flower and Hayes term, "write for the writer." That is they write something that makes sense to them, but not to a potential reader.
In order to focus on clarity, students need to "write for the reader", recognizing that it is their audience who must make sense of what is written. When I see this problem in a student's writing, I try to provide the writer with a real audience, me, by asking questions of clarification. I am not clear what you are saying to me here, can you help me to understand? Can you tell me orally what you mean to say here? Can you rewrite this so that I can understand what you mean?
Even better, of course, would be to provide the writer with an audience of peers, who could listen to the piece and ask questions that show the writer where s/he was misunderstood.
As a seasoned writer, I don't so much apply rules when I write, as I do manipulate them. Grammar is my tool. Would using a parallel structure here make the point more dramatic? Would figurative language clarify my point here? I only really think overtly about rules in the editing stage and even then what drives the editing effort is an attempt to make the writing as clear and communicative as possible for my audience. Will a comma here help my reader make sense of this sentence? Would a couple of shorter sentences here make more sense?
Ultimately, that is how I judge my own writing and the writing of others: Not by how "correct" it might be, but by its overall communicative effect.