I'd always go for a long leg and a short leg. At least you've got a chance to get some sleep, assuming you're in a suitable seat.
I'm about to experience Qatar's 777 out to Doha this evening, and 330 on the way back in J for the first time. Should be enough time to get some kip. Not so sure about the seats on the return flight, but it's a daytime flight so not so vital.
I'm connecting to DXB in the morning and while it's going to be early morning, it's far preferable than changing somewhere half way.