A ! and a ? in dialogue can act either as a full stop or a comma, depending whether you're moving to an action or dialogue tag.
So, eg.
"Hey, leave those kids alone!" he said, getting up.
Compared to
"Hey, leave those kids alone!" He got up.
Question marks are the same. In terms of breaking dialogue, it depends if you run the sentence on or break it.
So, this sentence:
"I enjoy dialogue, it's my favourite bit of writing."
would be:
"I enjoy dialogue," she said, "it's my favourite bit of writing."
If you want an action in the mix, it gets a little messy:
"I enjoy dialogue," she said, reaching for her biscuit, "it's my favourit bit of writing."
But when you are doing two sentences eg:
"My favourite bit of writing is dialogue. What's yours?"
it becomes:
"My favourite bit of writing is dialogue," she said. "What's yours?"
It is the full stop or comma after said that indicates whether the sentence is broken, not the one before she said, if that makes sense. It's also much easier to fit an action into a broken sentence dialogue:
"My favourite bit of writing is dialogue." She took a biscuit, well earned after completing two chapters. "What's yours?"
Don't know if it helps, but that's how I do it, anyhow.