Appendix: Advanced Deployment Scenarios

I want to leave you with some SharePoint deployment goodies. There are deployable aspects of a SharePoint site that don't exactly fall under "structure" assets. In fact, they aren't even part of a site collection; they live in their own service applications. But that doesn't mean we can't automate their deployment! These are search, taxonomy, and user profiles. (I'm also including a section on navigation because, well, it was really annoying to figure out.)

Even though these indeed interact with the site by way of managed properties and taxonomy fields and presence information respectively, since we'll be coding against service apps (directly or indirectly) and not on an SPSite object explicitly, I didn't feel like they belonged among the "standard" All Code bits. Also, unlike, say, content types and site columns, they aren't always part of a basic publishing site.

One of the goals of DDD is to provide a one-step deployment. Too many times I've seen (or been given) deployment instructions that start with a nice tidy PowerShell script that pushes WSPs. But if the deployment document is eight pages long, the last seven-and-a-half outline manual search configurations and manual imports of Excel files into the Managed Metadata Service and manual creation of user profile properties. Fail.

And, furthermore, this code is really fun!