The white paper ALM for Microsoft Dynamics CRM 2011: CRM Solution Lifecycle Management was released last Friday. This white paper is 76 pages of very detailed information on best practices and direction for the whole solution lifecycle. It is an invaluable read and highly recommended as it touches on an array of topics from requirements gathering, development techniques, version control, daily builds, testing and deployment.
A variety of hotfix types are discussed, including the deletion of solution components. If you are a solution customizer or developer then you understand the pain in having to delete a component from a solution that has been already deployed. The white paper solves this problem with a complex solution called the “Shared Publisher Technique” on page 13 that is worth checking out.
Guidance is provided on three types of solution architecture:
- One CRM Solution for One Production Deployment
- One CRM Solution for Multiple Regional Deployments
- Multi-Solution Environment
A scenario is provided for each type of architecture to help understand which type should be used. The white paper also goes into detail on versioning, deployment and patching for each type of solution architecture. All of this is good information for CRM implementation teams who haven’t ran into these specific scenarios before.
In this section, different techniques are discussed on how to control, track, and manage changes to the source code files which are shown in the diagram below. Using TFS, specific individual changes can be tied to work items or bugs which proves to be extremely helpful for the development process.
Solutions can be stored as a single file or multiple unpacked files. The advantages and disadvantages of each approach are carefully detailed as well as scenarios for managed vs. unmanaged solutions.
Personally, I recommend using a Visual Studio solution to develop and keep track of all your CRM solution’s web resources as well as TFS, Subversion or a similar tool to version your solution components. Also recommended is the CRM Solution Manager for Visual Studio which allows you to easily create, edit, and publish your files to CRM as web resources. This helps maintain the same structure that you have created within Visual Studio.
The whole build process is detailed out including check-in policies and gated builds to help ensure code quality. It talks about how continuous integration builds can be used to deny check-ins until the build completes successfully which is a big part in ensuring each check-in doesn’t have any breaking changes.
Probably my favorite section in the whole white paper is about developer environments. Recommendations are given on different options of setting up the environments, from isolated CRM instances per developer to sharing an instance for all developers.
The following is a well laid out diagram on an enterprise development scenario with a centrally prepared development environment show on page 38. This approach is highly recommended for enterprise scenarios with several developers. More in depth information can be found on pages 38 and 39 as well as Appendix F.
I highly recommend isolated dev environments for each developer if you will have multiple developers working on the same CRM organization. It is much easier for developers to debug plug-ins in an isolated environment so they are not stepping on each other’s toes. Web resource changes made by developers can then be merged into source control and the latest can be pushed to the master development org.
In this section, best practices are recommended for the best ways to find defects as early as possible. Tests should be created for each user story. Ideally the tests are automated and ran each night. The paper also recommends a test plan to define testing scenarios as well as to help measure testing progress.
The authors go very in-depth on setting up testing automation, testing tools, how to manage the testing lifecycle and a big variety of testing scenarios. In my opinion, all of these testing techniques should be used to ensure code quality and a successful deployment.
Diagram from page 41 - Running tests by using environments from Microsoft Test Manager
Two types of deployment are described, manual development deployment and automatic deployment. Microsoft makes it easy for automatic deployment with the concept of solutions but sometimes there are external components that need to be deployed as well, such as a nightly task. These components should be deployed automatically where possible to save time and money. The white paper lists out different tools that can be used for automatic deployment.
The white paper then finishes with a multitude of detailed concepts and methodologies in the appendices. In my opinion, this is a must read for all teams implementing a CRM solution. It’ll help plan out your design and architecture for all aspects of the lifecycle to ensure a time and cost friendly implementation that is scalable and easy to maintain for the future.