I just went through this, so yes, I agree that it's never good to burn bridges. Be nice, don't tell them any more than the minimum about your reasons, keep the door open for returning or subbing or freelancing if possible. Don't say anything negative about your job or the workplace or any of the people you work with.
I gave a month's notice when I handed in my resignation. In my case, though, I didn't have much work to hand over to anyone, and I don't think they were planning to replace me -- there seriously wasn't enough work for a full-time person in the position I held, which was part of the problem about the job for me, though of course I didn't emphasize that. They set me up to freelance for them, and that seems to be working out well.
YMMV, of course.