In my opinion, it's best to assemble the structural components, and then seal them. It's best if you seal whatever adhesive you're using behind the seal, as most have acids that will harm your finish work, ie decor, carpeting, etc. But, I prefer to leave the trims off and paint them separately, since the will be other colors from the structure.
By sealing, I do mean "prime" as you've referred to it. I use a sealer/primer, like Zinzer, again, to keep the acids in the adhesives sealed away from the decor.
Whether you need to paint the door or window trim separately is really a matter of preference, and you won't really know your preference until you've done it a few times. Try looking through the owner's galleries. There are pictures of ongoing projects, and these will help you decide how you want yours to end up.