Hard woods like oak need to be predrilled when nailing, or use 15 or 16 ga. nail guns. If you are painting, I would prime all sides first, then paint once installed. You will have nail holes to fill, which should be done before painting. If staining, stain first, poly after installed. And don't forget caulk before finishing. Use a matching caulk for stained wood.