I had a great relationship with one of my previous companies, my boss, and team. I gave them about 8 weeks notice. It was certainly appreciated. There was no reason to blindside them, nor were they going to can me early for putting in my notice.
I know plenty of people may do this and it not be appreciated, and that just might happen. I think it's good to at least consider if you have a fairly transparent relationship with your boss.