Managing SharePoint 2007 Solutions programmatically isn’t a daily-matter: some of you might even participate on quite a few projects without even coming close to it. As I have worked with it recently a bit I would like to share my findings with you.
Provisioning Content Type’s fields is quite straight forward when using Solutions: using Element Manifests you can define your own Content Types and their properties among which fields. Unfortunately there is one serious con to the solution Microsoft has offered: you simply cannot provision any Lookup Field using the Element Manifest.
Using CSS files is the recommended way for incorporating the chrome in a SharePoint WCM solution. Among the various definitions of the layout pieces there are also images' references. Each such reference can be defined using an absolute of relative URL. As long as you use images in the same directory as the CSS file there is no problem at all: you can manage all the paths easily by simply using one of the URL kinds. Unfortunately a problem occurs when you would like to use images from other directories for example the PublishingImages folder. They should be referenced via relative URLs. Using absolute URLs results in problems when a Site Collection doesn't reside in the root or /sites directory. Also sharing a CSS file among different Site Collections isn't possible while using PublishingImages folder: there is no simple way to make the images' paths be defined dynamically based on the Site Collection calling the CSS file.
In his recent post Robert J Wheeler has presented his way of dealing with building CAML queries dynamically. Here at Imtech ICT Business Solutions we use a slightly different approach.