Working with Sitecore, Part Nine: TDS

Tuesday, March 26, 2013 @ 02:30

By: Josh Jenkins, Lead Consultant

I use Team Development for Sitecore from HedgeHog Development. (Hi Mike!) TDS is primarily a productivity tool for working with Sitecore.

HedgeHog put out a lot of good videos covering how to do things with TDS and you can find those on their site: Team Development for Sitecore - Videos. I'll be hitting a few of those topics here just as a refresher and to show how I've integrated it into my process.

I went ahead and recorded a video, Working With HedgeHog TDS. It follows along with this blog and the sample application we've been using so far. It's a long one so bear with me!

A few key features we'll be going over:

File Replacement
In the File Replacement tab of the TDS projects properties you can specify files or folders for TDS to copy into your build package. I should note here that when you build a TDS project it uses your active VS  Configuration (so mine might be JJenkins) and creates a temp folder in the projects directory. It pulls all the assets from the Website project you selected on the General tab but will also pull in any files or folders you specify in the File Replacement tab. When using Components the way I do as separate projects, the Components folder of the Website would be hidden in VS. When it's hidden TDS won't pull it over, so in that sense it works just like a publish, it will only grab things VS knows about. I use the File Replacement feature to copy my components.

Code Generation
Code generation takes a little work to setup. I am going to admit I have only done it using the Glass model. The basic steps are:

  1. Enable Code Generation in the TDS properties.
  2. Download the HedgeHog tds-codegen for Glass Mapper.
  3. Build the Extensions project and confirm the assemblies have been placed in your Visual Studio PublicAssemblies directory.
  4. Copy all of the T4 templates from the Sitecore.Master/Code Generation Templates into your TDS project.
  5. Generate your code.

Don't worry, I'll go over the specifics in the video.

Auto Deployment
TDS lets you connect to an instance of Sitecore by setting it up when you run a deploy on your TDS project. It will push the Sitecore items it maintains in the solution to the Sitecore instance. It allows you to select what items will be deployed in the Deployment Property Manager. I use it to automatically keep my build server up to date so at any point someone can hit my build instance and see how things are coming along.

TDS also lets you generate packages in the Update Package tab. Instead of deploying live to an instance you may want to generate a package to install. It lets you break the package into two parts, one for code and one for Sitecore items. This is how I manage my Stable branch; I have my CI run a TDS QA job which builds an update package that I then deploy to my QA servers. This package is one unit and I move it through the process, eventually to Prod if all goes well.

Config Transforms
TDS Supports XML Config Transforms. One way to do it is Slow Cheetah. You'll create a config whose name matches your VS Configuration and you can set items in that version of the config to overwrite the main config at build or deploy.

Those are the basics and I hit each of those in the video above!