I'm hoping to get more blogs out soon, but our team just finished a big 8.1 -> 10.0.1 Sitecore upgrade into Kubernetes with Coveo...it's fun to see where containers are going, but also how much work needs to be done for efficiencies still. One area is in the default items used by packages like Coveo, or Powershell Extensions, and yesterday Sitecore decided to start helping out.
When Sitecore 10.1 was released, one of the biggest behind-the-scenes changes was the introduction of Protobuf files. A Google XML format, these files (found in App_Data/items) now store the default items you see in the content tree when you first create your instance. That means a lighter SQL database since they no longer have the items in them. It doesn't mean you can't change these either, but now only changes will be saved to the database as a delta.
Sitecore developed this to be extendable from the get-go, too. By default, there's a single DAT file in each of the core/master/web database folders. But any properly-formatted Protobuf file in here will be added to the mix, which is great...but the question was how to make these files? Tooling has been discussed...and today it begins.
When you update TDS to 126.96.36.199 and go to the properties of one of your TDS projects, you'll see a new section:
It's pretty straightforward...check on the Build Item Resources File box, provide a prefix (perhaps based on your project name), and then build the TDS project. Take a look and you'll find a DAT file now created. Then copy that file into a Sitecore 10.1 instance's App_Data/items/[database] folder, fire it up, and go take a look!
So what are the possibilities? For containers, you could easily generate a Protobuf file for your core database items, as well as the master database "structural" items (layouts, renderings, templates, etc). I'd shy away from content unless it's more immutable, like protected items for default paths you're establishing. Beyond development though, this is how we should start seeing Coveo ship their items as they work towards a containers package of their own, and I could see Sitecore Powershell Extensions or other packages with items adopting it. True, it only works for 10.1+, but that's likely to be the norm going forward of course.
Give it a try!