Using Source Control with SLX 7.2
Posted By: nicocrm on January 15th, 2008 in Experiments, Saleslogix
No Gravatar

One of the new possibilities I was pretty excited about with the 7.2 web client is that we can finally start using our standard source control tools (we use Subversion – very simple yet powerful) to manage revisions. It is still not perfect because there are a few tidbits that are hard to get out of the database but in practice I have not found that to be much of a problem (UPDATE – see below). What source control gives us is a nice, easy to use way of:

  • tracking changes between revisions (i.e. what the heck did I break between last Wednesday and today). Also makes it a bit easier to apply the Sage bundle since I can apply the bundle and then use the source control to tell me what changed.
  • archiving your source code (other than backing up the whole database, which can be a bit of a hassle to restore).
  • collaborating on changes between users (i.e. if I am messing with something and Joe is messing with an unrelated feature, we don’t have to worry about temporarily breaking the website, since we are working on separate copies – though obviously we have to watch out when merging the changes back together).
  • it also lets you have several projects against the same database (eg for experimenting with a new feature without having to set up a new database). And when you are done experimenting, you can toss it out, or automatically merge into the production copy. Anyone who has ever used the Bundler will recognize how wonderful that is!

Here is what I had to do to make it happen, like I said it was pretty easy once I found where everything was:

  • In your “Project Workspace Manager” right click and select “Add”:
    Project Workspace Manager
  • Enter a meaningful name: the project workspace manager does not filter the list so you will have to be able to recognize it among all the other projects you might be working on!
  • Enter the path to export, make sure it is on the local drive and not too long: some of the files in AA are pretty long and combined with something like C:\Documents And Settings\domain.user\Documents\Visual Studio 2008 Projects… well it gets past the limit pretty quickly as I found out first-hand.
  • And finally, make sure you check the box to “Export Files Upon Creation”, and click “Create”:
  • Now double click on that shiny new project to open it. Any change you make to the entity model or the quick forms will now be saved to the specified folder instead of into the database. There are still a few things pointed to the database, for example, the Sage.Entity.Interfaces.dll that is generated when you build the project, and the support files (which includes all the assemblies used by the web site). It is possible to get the support files out but not really worth the hassle – first of all it is a pretty big directory, a lot of it is binary files that will just end up cluttering your repository for no practical purpose, and secondly I prefer doing my changes by copying the files to a separate directory and modifying them there, this way I can see exactly what I am working on (I have a build script that automatically deploys them from there to the web site, but that is another story).
  • You can now browse to the folder and import it into your repository using whatever is appropriate… for example with TortoiseSVN I just right click and import.

That’s it! One more thing I have to say if you are not familiar with source control is that it is even more fantastic when it is used with actual source code (as opposed to the XML form used by AA which is pretty verbose and automatically generated thus a bit harder to use in comparisons). This is where it really shines enabling you to see who did what and when and decide how you want to combine it.

UPDATE (2008-01-19): In light of a recent misadventure where I accidentally overwrote the database-stored VFS I would indeed recommend storing the support files into the source control as well. There is about 26 megs of them, and most of it is binary file, and they are not going to change often, but you know what, I’d rather know where they are. To do that, expand the portal (“Sage Saleslogix” or “Sage Saleslogix Customer Portal”), right click on the “Support Files” item and select Copy File. Select an empty target directory. Next, right click, select “Set Source Path”, and point it to your new directory. Check it into source control. There is STILL going to be some stuff saved into the VFS (eg the Sage.Entity.Interfaces file), but we’ll have to let it be for now. And the good side is, the base is going to be the same on all databases, so what I do is store the “Vanilla” 7.2.1 files in a specific path and have all databases reference to that same path. Then, I store the “delta” in a separate folder. I am considering doing that with the model too now (by storing it as a branch in subversion) but not quite there yet.

UPDATE (2008-03-17): On Saleslogix 7.2.2 you may get an error when compiling the platform, something that looks like “Unable to read snippet file, ‘\Entity Model\SalesLogix Application Entities\LeadAddress\.svn\text-base\Sage.SnippetLibrary.CSharp.@.07ffd774-6142-4b8a-a48a-09616effccea.codesnippet.cs.svn-base’. Unknown extension. Supported extensions are: .cs, .vb“. Sage tries to compile every file that contains “codesnippet” in its name. A small update to the Sage.Platform.dll is necessary to get past this – I may write more fully on the subject of how to patch the Sage libraries later but you can download the patched dll here (copy the dll to your C:\Program Files\Saleslogix\Architect\Platform folder) or the patched source code here (compile it with ilasm.exe).

2 Responses to “Using Source Control with SLX 7.2”

  1. [...] a follow up from Using Source Control with SLX 72, here is how Subversion allowed the upgrade from 7.2.1 to 7.2.2 without having to use the AA bundle [...]

  2. Nicolas GallerNo Gravatar says:

    As an update – 7.5 is much friendlier with source control. It does not have the snippet compilation problem, and it checks out the portal content (“Support Files”) as part of the Model so you don’t have to remember to do it separately. I think the main drawback is how big it is – about 300 mb. Because of this Subversion is sometimes a tad slow – I am considering setting up my SLX75 projects in Git instead as it performed a lot faster when I tested it.

Leave a Reply