SP2016 Fast Site Creation, a developers perspective
Yesterday evening I took some time to look at the new Fast Site Creation feature in the SharePoint 2016 Preview. As I have been looking into
the new features of SP2016, I found that a lot of the new things are related to infrastructure, some really cool features, but from a developers
perspective, not that shocking. The one thing I glanced at was something called Fast Site Creation. Reading a small description of this functionality,
I imagined that this might have a bad-ass side effect of being able to configure your own template that could be used for Fast Site Creation, a mayor gain
when thinking about site provisioning logic. As it turns out, it is again more an infrastructure/performance feature, or maybe not...
I had already configured an hyper-v environment containing the SP2016 Preview. For this I used SharePoint 2016 installation first look from Corey Roth.
So I downloaded Windows Server 2016 Preview 3, SQL Server 2014 SP1 and the SharePoint 2016 Preview, and
installed this on hyper-v. I only had an issue with a SQL Server 2014 certificate, but I managed to fix that.
As I wanted to learn more about this new Fast Site Creation feature, searching for information I found Fast Site Creation in SharePoint 2016 – A Deep Dive.
Reading this, and trying this out, I found out that this feature seems to me more an infrastructure/performance feature than a feature that helps
you with provisioning your customized sites. So here is what I did:
Enable-SPWebTemplateForSiteMaster -Template "STS#0" -CompatibilityLevel 15
$db = Get-SPContentDatabase -Site http://someserverurl
New-SPSiteMaster -ContentDatabase $db -Template "STS#0"
New-SPSite http://someserverurl/sites/testone -ContentDatabase $db -CompatibilityLevel 15 -CreateFromSiteMaster -Template "STS#0" -OwnerAlias "SP2016\Ronald"
This is almost the same as in the Deep Dive article, the only change I had to make was adding -Template "STS#0" to the New-SPSite statement.
As I noticed that the CreateFromSiteMaster did not really happen. Also it makes sense, as in theory you could have multiple Site Masters in one content database,
each having a different base template.
By the way, the new SharePoint 2016 Management Shell is really greatly improved with right click copy/paste and syntax highlighting.
This really is not much more then already shown in the deep dive. The things I found out is, that there can only be one Site Master of a
base template in a content database, trying to create one more will do nothing else then show the data of the Site Master created earlier. Also one thing to note, is that if you do a Fast Site Create,
you will always do this in the same content database as the Site Master was created in. So you will need to create a Site Master in each content
database where you want to Fast Create Sites. One other thing, the percentage in 100.00% : WSS_Content.dbo --> WSS_Content.dbo goes quite fast, but after the 100% is reached
it still takes quite some time to complete.
Unfortunately, everything I found out about Fast Site Creation, didn't point to an ability to use this to provision your own customized sites.
I had envisioned the functionality more as a site that would be maintainable by functional SharePoint consultants, which could be used as the
base for this Fast Site Creation, where you could then add some simple custom provisioning code, to have a self service site request functionality,
and you have a choice of preconfigured custom templates needed for your organization. And of course, that the site creation here would be done at database level for increasing
provisioning performance.
Being a creative developer, I looked at how this Site Master was created, and if there still was the ability to change this master
and get those changes provisioned directly by using Fast Site Creation. Looking at the url of the site collection, in my case https://sitemaster-8af43e47-771c-4a87-b353-fae892d1426a, you can see that this is a url that
isn't available from the browser, so having your functional SharePoint consultants further configure the site using the browser is no option.
Still, thinking about how things work in SharePoint, I quickly noticed that if you do a Get-SPSiteMaster you will get back a SiteId.
I then used this SiteId to try and get the site object, and what do you think, yes it worked. Now I could change the Site Master using
PowerShell, and in theory you could do a full customization, with everything you can add with code. For now I only changed the title of the web, and then created a new site from
this Site Master, to see if this change would be provisioned, and it did.
Now you know that there is an option to use customization with Fast Site creation. Should you use this? Currently I would hesitate to use this.
Although this is all possible using the API, I have no idea how this fits with what Microsoft has in mind for Fast Site Creation. Also, you will need
to do this configuration for all content databases where the Site Master is located, and you only can use one Site Master for each base template you
want to customize. Customizing two or more templates based on the STS#0 will require multiple content databases, each content database can then only
contain one type of customized site. One other thing, you can't use any customization that has the site collection url in it, other than using an Url Token.
Also, it does not look like this would be a cloud ready strategy.
Looking at it a bit more today, also trying out Set-SPSiteUrl what didn't make the Site Master accessible from the browser, I have also found that Microsoft does prevent additions to this site: "Additions to this Web site have been blocked.", you can
change this using 'Configure quotas and locks' settings in central administration, so you can still add customization's at will.
But it seems clear from this, that Microsoft does not like the idea of you changing this Site Master. So should you use this? Probably not.
To conclude, the Fast Site Creation is a cool infrastructure/performance feature, but it lacks the support, that I envisioned, for using this
to provision customized sites. There is a work-a-round to get this feature to provision your customization, but that has some flaws, and is
probably not something that Microsoft had in mind with this feature. So it would be ill advised to do so. Still it was fun looking into the possibilities, and
looking beyond the expected, I like a bit of creative mocking about. I think it would be great if Microsoft looks at this the same way I looked at it,
and would add functionality to provision a site based on a template that can be configured and maintained by functional consultants. The biggest challenge I see in this
is fixing non tokenized urls.