Creating a lesson is all about understanding what you want students to know or be able to do by the end of the lesson and by the end of the unit.
The human attention span last about 20 minutes. Middle schoolers' attention spans are a bit less, which means that you need to keep the lesson moving.
Every 10 minutes or so, there needs to be a refocusing of the students. This refocusing could come in the form of an activity switch or something much smaller and simpler like asking a question while you read to them or having them write down conclusions while they experiment.