generally if students know that they are important to you personally, they will [mostly] perform for you accordingly. hormones and drama will pop up to make life harder, but if you let them know that you understand its hard for them too, that goes a long way.
that said, last week I was subbing an 8th grade math class where a young man who didn't know me walked in and told me "this will be your loudest class all day!" I responded, "no, probably not". Oh yes it will, he replied, we are rowdy!!. I calmly replied; " I raised a Green Beret, and adopted a 13 yr old street kid from the hood, I managed both of them at the same time.... I can handle you...son..."
some girls he was trying to impress giggled and he sat down, he didn't utter a peep all period...