Before you start
Managing source code is a big challenge that development teams have to face. When multiple developers are working on the same set of source files, there is always a risk of two or more developers working on the same line of code in the same source file. Then it's anyone's guess as to whose edits get overwritten. Some other major challenges are to maintain change history, and to provide and manage access to only those developers who need to work on a particular set of files.
Fortunately, there are tools -- commonly referred to as version control systems -- that will watch over and manage access for our happy little development teams and make sure that all source edits are monitored and recorded. By checking individual files -- and in some cases portions of files -- in and out, developers can avoid stepping on another's toes. By setting activities (in the case of ClearCase LT), you can look at the evolution of a project and see why someone is making certain changes to a file. Ultimately, this provides a means to safely monitor the progress of an application's development and gives you control over backing out changes intelligently if mistakes happen.
WebSphere Studio Application Developer provides a development environment and provides plug-ins for popular version control systems. This tutorial shows how to manage source code using ClearCase LT as the version control system. The scenarios simulate two developers working on the same application. The first developer, Developer 1, is responsible for setting up the project, importing the code, and getting everything into ClearCase initially. Developer 2 accesses the project, extracts the code from the ClearCase repository, makes a change as would be the case in a real world team environment, and puts the changed file back into the repository. Finally, Developer 1 returns to synchronize the code by analyzing the changes made by Developer 2, and imports those changes.
All that is required to reproduce this scenario is a single machine. The same concepts apply to development environments where each developer has their own machine.
Following is a list of frequently used ClearCase terms.
- VOB versioned object database) - a data repository that holds the files, directories, and any objects that collectively represent a product or a development effort.
- UCM - an out-of-the-box project management process layered on top of base ClearCase. UCM simplifies the management of projects whose sources are put under source control.
- Activity - a set of tasks associated with a given purpose. When you begin working with the project, you'll notice that you'll create a new activity on one task but later associate another task with the same activity. This is best described as a means to intelligently associate related tasks (like "fixing typos on new sales pages") for tracking purposes.
- Component - a group of related files and directories within your project. A project must contain at least one component, and it can contain multiple components. Projects can share components.
- Baseline - records specific versions of every element (i.e. files and directories) that is contained within a component.
- Rebase - the act of retrieving changes made to the current version of the project to work on locally, or to synchronize your workspace with changes that were made by the rest of your team.
- Integration Stream - the version of a project that serves as the team repository - the area to which everyone on the team delivers the changes that they have made to the project.
- Check in and check out - A file that is to be edited must be checked out in order to make it writable. This lets other developers know that the file is being changed by another developer. Once a developer completes edits on a file, the file must be checked back in before others can check it out to make further changes to it.
- Deliver - an operation that developers perform to make their changes to the project available to the rest of the team.
This tutorial is intended to introduce you to the basic functionality of using Rational ClearCase LT with WebSphere Studio to manage a project edited by multiple developers. You'll edit an existing J2EE application but don't concern yourself too much with the actual application. The sample source files are used only for the purpose to illustrate using Studio in a team environment.
To complete the steps in this tutorial,you need the following components:
- The Application Developer configuration of WebSphere Studio. This tutorial uses version 5.1.2.
- Rational ClearCase LT (bundled with Application Developer).
- The sample application goforit.ear. Save this file to C:\TEMP\StudioClearCaseTutorial\goforit.ear.

