First do a trial run with one directory or subdomain first, and use 301 redirects to notify Google of the change. Once you're satisfied with the results (all pages are showing up in the index, no 404 not found errors, etc.) then start shifting the bulk of the pages. And while it may take more work, MacNamara suggests doing page-by-page redirects instead of a blanket redirect--as it gives your users a "consistent and transparent experience."
Make sure all internal links are pointing to the new domain, and try to get your inbound link partners to make the change as well. And if you're also redesigning the site, she suggests making the move first, letting the rankings settle for a bit--and then changing the branding and design details.