Rational Software Corp.

TOC PREV NEXT INDEX



Best Practices


Contents

This chapter is organized as follows:


Goals of Team Development

Developing complex systems requires that groups of people, such as analysts, architects, developers, and testers, coordinate their efforts to produce the finished product. Consequently, they must ask themselves the following questions:

The purpose of this book is to outline the goals of team development, and recommend some best practices when using Rational Rose to help ensure success.

Team development touches on development, testing, configuration management, project management, and other disciplines such as engineering, analysis, and design.

This overview of team development helps provide your team with an overview of the challenges associated with team development, while specifically outlining the tools and mechanisms Rational Rose supports to aid in implementing a team development strategy.

The Guide to Team Development provides an overview of the basic team development concepts in Rational Rose and specifies how to configure and use Rational Rose in a team environment.

The goals of team development are to:


Sharing Within a Team Environment

After a developer completes an activity (work), they require a mechanism to share that work with others. Integration is the mechanism that permits the integration of changes made by a team member into what is currently being shared.

A version control system can facilitate the work flow of team members. A team member working on a shared artifact acquires some type of implicit or explicit permission to check-in their work by performing a check-out prior to working on the artifact.

The check-out status for the artifact indicates to other team members that work is currently being done to change the artifact. A configuration manager or configuration system can monitor these operations and enforce any policies. The mechanism can involve the use of a version control system, or it may be an unsophisticated implementation whereby the check-in is a simple copy, and the communication is verbal between developers. Regardless of the mechanism used, an awareness of a change at the appropriate levels must be achieved, and you must assess the implications of the change.

A check-in does not necessarily imply that the artifact is immediately available to team members. Typically, it is useful to work with older versions of shared artifacts until such time as the team is ready to access the latest version.

A version control system allows the team to return to previous versions of work, while providing an audit trail of changes. The desire to associate work with specific requirements is a type of policy the Integrator can enforce at integration time.

Work produced by a member of a team can affect other members of the team; therefore, those effects must be intentional. A copy of the work is made available to a team member in an environment isolated from other team members.

The environment is only isolated one-way. The work environment can see shared team artifacts, but other environments are not effected by the isolated environment. The benefits of this type of implementation are:


Protecting Configuration Items From Unintentional Changes

There are several ways revisions can cause unintentional changes:

Table 1 shows the legend that explains some images found in Figure 7 through Figure 11.

Table 1 Image Legend
Image
Description

Represents a unit of work or configuration item


Represents movement



Represents an unintended change

Overwriting a Modification

If a team member shares their work with the team, not realizing that someone else produced or edited some work with the same name, they may overwrite the changes of the other team member.

Figure 7 Overwriting a modification

Most version control tools provide adequate protection from this type of unintentional change through a process of obtaining permission to make modifications, called a check-out. The version control tool grants implicit permission when there are no check-outs currently in place. When one team member has an artifact checked out, other team members are denied permission to check out that same artifact until it is no longer required by the first team member. Figure 8 shows a scenario where a check-out is followed by a check-in, allowing the sequence of events to iterate.

Figure 8 Check-out and Check-in Scenario

This type of scenario may cause contention that is unacceptable for high traffic work items. The diagonal lines in Figure 9 indicate that a check-out cannot occur until the previous check-in process completes.

Figure 9 Checking Out an Artifact After it is Checked In

The problem illustrated in Figure 7 commonly occurs in strategies that do not use a version control system. Because previous versions of configuration items are always available to developers, the possibility of having this type of unintended change always exists. A developer may make changes to a private copy of an artifact without permission to do so. Subsequently, they may acquire the appropriate permission and check in the changes of the local copy that may not represent the latest version of the configuration item.

You can use a merge tool to apply a combined set of changes in situations when multiple team members have permissions to make changes to a single artifact. Figure 10 shows how you can merge two changes made to the same artifact.

Figure 10 Merging Changes Prior to Check-In

It may be difficult to remove a set of changes that occurred in a previous version of an artifact. The situation in Figure 11 shows us three versions of an artifact. If you want to remove all changes applied to the second version (the changes occurring between the two diagonal lines), you may encounter difficulties.

Figure 11 Comparison Between Versions

For example, the changes between version 1 and version 2 must be compared to the changes between version 1 and version 3.

Obtaining adequate permission to modify artifacts helps to ensure that unintentional changes do not occur. Configuration management can choose to implement and enforce this type of policy.

Adding Dependency Issues

Modifying an artifact may cause a conflict with another change if it removes a dependency that one or more other artifacts rely on. Figure 12 shows how this type of problem can occur.

Figure 12 Removing Required Dependencies

Developer A and B individually check out artifacts A and B respectively, and have access to the shared version of artifact A and B respectively.

Developer A creates a new dependency in foo() by adding myBar-> bar().

Developer B makes changes to bar() in class A by changing the parameter signature to integer.

Changes to bar - from bar() to bar(int) - cause any references to this function to fail. The changes made by Developer B to artifact B that are referenced by foo from artifact A are not valid.

Note: Most merge tools are unable to identify a conflict here because they compare items of work individually, and not against all referenced work.

This type of change is common and may have serious implications. Often, when product maintenance is underway and feature development is concurrently managed, the maintenance person or developer may be unsure or unaware of all dependencies involved in a proposed change. Rather than research all the dependencies associated with the artifact, they do not modify the original item. Instead, they create a new item with the proposed changes.

Changing Language Semantics


Managing Relationships Between Configuration Items

Team members must understand and use the dependencies between configuration items to reduce or prevent unintended changes in the system.

Because most configuration items do not work in isolation from other configuration items, a set of particular versions of configuration items has a set of dependencies. When a set of versions of configuration items changes, the possibility exists that the dependencies also change. It is useful to compare the set of dependencies from one set of versions to a previous set to ensure that dependency changes are intentional.

A set of versions of configuration items is also known as a lineup. Figure 13 shows a generated dependency report for a lineup identified by the label called ALabel. Later, a comparison is made between ALabel and another dependency report generated for the lineup identified by BLabel. Although the dependency reports themselves may be too large to be of any use, a good differencing tool can make it easy to see dependencies modified since a previous stable lineup of the project artifacts.

Figure 13 Comparing Dependency Reports

Specific to Rational Rose, there are several levels of dependencies that must be understood and managed:


Managing and Delivering Configuration Items

A specific set of configuration items in their appropriate version (a lineup) must be accessible and reproducible. Protection of these version sets is important. Like most one-to-many relationships, a label is often stored many times; once with each configuration item.

Figure 14 Labelling Configuration Items

Figure 14 shows the following:

A fixed label is the first primary use of a label, forever identifying a version of a configuration item with a specific label. It is also useful to include in your naming convention details, such as the date and time in a label name.

The two types of floating labels (logical and explicit) become associated with different versions of a configuration item.

Over time, a logical floating label is arbitrarily associated with the latest version of a configuration item on a particular branch or stream. For example, "LatestDevelopment" or "JanesLatest".

An explicit floating label is explicitly assigned to different versions over time, and it is almost always based on the associations of another label and not with the latest versions on a branch or development stream. This means that it is not necessary to "freeze" the configuration items to associate a label with versions already assigned to another label; only the state of the base model must be frozen. For example, Figure 15 shows that the SYSTEMTEST label is associated with version 3 of this particular configuration item.

Figure 15 Example of Labelling Items

When the test team for the system is ready, they can associate the label with all the versions associated with FUNCTIONALTEST. No changes should occur to the FUNCTIONALTEST label until the SYSTEMTEST label change is complete. However, assigning LATESTSTABLE with the current versions of all the files on the main branch of development requires that no new main branch versions are added to any of the configuration items until the LATESTSTABLE label change has completed the operation. Since labels can be moved, it is good practice to produce and keep a dated report on the versions associated with important labels for milestones.

Creating and comparing label reports of different dates on a regular basis can reveal trends and areas that require additional testing to ensure quality of volatile areas of the system. Figure 16 shows label reports for two consecutive weeks.

Figure 16 Comparing Reports

Teams looking at a particular lineup of configuration items should retrieve artifacts solely on the selection of configuration items associated with a specific label. Testing in this type of environment quickly identifies overlooked configuration items because of a missing association. It also ensures that all necessary configuration items are included as they are made available to other teams.


Improving Efficiency in Team Development

The implementation of some team development practices can hinder the implementation of other team development goals. Planned activities may be part of the strategy to deal with implementation issues in a team environment.

You can reduce unplanned activities by using an effective strategy that promotes handling conflicts up front. Your configuration management plan should implement a strategy that promotes team development goals with as little impact to team activities as possible. See Goals of Team Development for more information about specific team development goals.

The stakeholders of the configuration management plan are almost everyone, and their needs vary significantly. The description of the roles and tasks in this document is general and must be customized to suit your particular development organization.

Model Architect Role

The Model Architect establishes the overall structure of the model: the grouping of elements into packages, the separation of models into subsystems, and the interfaces between these major groupings. The Model Architect adapts the structure of the model to reflect the organization of the team.


Recommendations

Protection of configuration items and the ability to deliver a consistent set of configuration items are the main priorities of the configuration management plan. An implementation of a plan to achieve the other goals should support this ideal.

Use the source control operations supported through Rational Rose to facilitate the implementation of a greater configuration management plan. For complex projects, a large part of the configuration management strategy that deals with Rational Rose models, may be strict ownership of shared packages.

You may think of shared packages as the building blocks of the system. One Rational Rose model brings all the building blocks together in a coherent system. Many working models are used with the sole purpose of creating and testing those building blocks.

Source Control Fundamentals

In chapter 5, called Working with a Version Control System, specifies the source control operations supported from Rational Rose . It outlines some of the differences in view-based and file-based source control systems. There is also a discussion on versioning strategies.

The ability to associate labels and create a lineup exists in both types of source control systems. Using a parallel stream versioning strategy while maintaining a single stream versioning policy, provides the safety inherent in single stream versioning strategies, and also the ability to control parallel development of the same artifacts among different teams.

Any source control tool that allows branching is capable of supporting a parallel stream versioning strategy. An example of appropriate streams of development are:

Include a maintenance stream for every product version currently supported by your organization. When support for the specific product version is concluded, these streams should end.

Note: You can use merge tools, such as Model Integrator, for merging simple, non-conflicting changes. However, because of their limited semantic support, we do not recommend that you use automated merge tools when there are many conflicting changes.

Bugs and defects reported against a version of the product should be evaluated against the product under continued development in the new development stream. Other versions of the product that may be affected by the bug/defect are under continued support. Apply corrections to all affected versions through a manual merge, or through focused merges.

If you implement a parallel stream versioning strategy, maintain virtual single streams within the parallel streams. For example, Figure 17 shows a version tree history for a configuration item. A branching of development effort occurs at version 1.0, and version 2.0 of the configuration item

Figure 17 Parallel Stream Versioning Strategy.

Only one side of the branch is checked back into that integration stream. The Integrator uses the main streams of development and may be unaware of the details of individual changes. Therefore, from the perspective of these streams, they are a single stream of development only receiving updates from one source that has permission to modify the next version in the stream. If you require merging, perform it outside of these integration streams, and sanity test it before integrating it as a new version.

Do not associate product verification labels and packaging or deployment labels with versions outside these main integration streams of development. When working with files such as test scripts that are version controlled, consider these files as if they were in a separate project.

You may have separate streams for the development and maintenance of these scripts as well, but this should be thought of as a different project than the one it supports from a version control perspective. That supporting system may have logical ties or parallels with the product under development.

Preempting Conflicts

You want to minimize more than one concurrent check-out of a configuration item. If this strategy results in unacceptable contention for a configuration item, or a dead-lock occurs, put overrides in place to deal with the contention.

A dead-lock occurs when team member A requires a configuration item checked out to team member B to finish work, and team member B requires the configuration item that team member A currently has checked out. Because this is done up front, there is an awareness that changes are being concurrently made to the same configuration item, and these changes can be managed to minimize the likelihood of unintended change.

This type of concurrent work must occur outside the main development streams. When it occurs, resolve this type of situation as quickly as possible and provide adequate testing of the configuration item following the period of concurrent change, to ensure no unintended changes occurred as a result.

The Rational Rose shared package capability can implement an ownership strategy to limit the scope of implicit permissions to change configuration items.

Managing Dependencies

To effectively manage changes to the dependencies in your system, you must create and enforce your own team processes. For Rational Rose projects, you must identify the following dependencies:

If you do not have a formal reporting mechanism that automatically identifies these dependencies, every change must be addressed to ensure that dependencies are researched and assessed as a result of the change.

Labeling

When considering labelling, we recommend the following:

When Merging is Necessary

Merging is necessary when an awareness exists that concurrent development may result in conflicting changes. Perform the merge as often as possible. Each developer involved in a concurrent change must regularly work with a merged version of the ongoing work to identify adverse or unintended change.

The intention is to reduce the amount of lost work that can occur when conflicts arise. A conflict identified early reduces the amount of re-work necessary. This kind of concurrent work on the same artifacts must be done in isolation from other work.

The way ClearCase facilitates integration branches, it is wise to chose a special integration stream for the concurrent changes to a configuration item. This isolates the remaining artifacts in your system (which uses mutual exclusion) from these changes until the configuration item can go through extensive quality verification.

With other sandbox type systems, one developer merges other developer's work, and then provides the merged version to the other developer.

After every merge, assess changes to semantic relationships and other dependencies.


Advanced Concepts and Heuristics

This section includes additional information about advanced concepts and heuristics in the following areas:

Moving Controlled Units

When a model element moves from one package to another, and the element is under configuration management (CM) control, Rational ClearCase does not move the file corresponding to the model element into it's new directory.

Some CM systems do not support moving history when moving a file from one directory to another. Consequently, if the file is not moved to it's corresponding directory as the element in the model is, the operations that involve labeling will not be done correctly.

When a UML package is assigned a Rational ClearCase label, ClearCase performs an operation on the directory and all it's contents. However, if the controlled moved, its corresponding element will not be labeled correctly.

When the name of a package, diagram (one that can be a separate control unit), or classifier changes, and that element corresponds to a controlled unit, the source control element in Rational ClearCase should also change.

What are some use-cases that relate to moving controlled units? 

Some solutions for these use-cases may include:

Considerations

In ClearCase, the relationship between a file element and directory elements is such that an element may be in multiple directories at the same time, possibly even in the same view. This does not necessarily complicate things for the toolset, but requires careful consideration.

A Rational Rose model element may be saved as two distinctly named Rational ClearCase elements.

Heuristics

Use package-level granularity rather than class-level granularity. Class-level granularity helps reduce issues when moving classes, and issues with package ownership.

Parallel Development

Parallel Development is a term which sets high expectations regarding collaborative development, where there is a need for multiple users to work together on a common set of artifacts to achieve the same goals.

When collaborating on a common set of artifacts, consider the following approaches to collaborative development:

The development process and tool chain can have a significant impact on the opportunity to use and the effectiveness of the second approach. The second approach is characterized as Parallel Development. For the purpose of this discussion, the term Parallel Development refers specifically to this second approach to collaborative development.

It is unrealistic to expect employ parallel development without any constraint or guidance. Too often, this technique is used without coordination or planning. Sophisticated tools, such as Rational ClearCase, may not be properly used and can lead to this misperception. The design artifacts at the center of collaborative development have complex interrelationships within them, and between them. These higher level abstractions and concepts are not easily, and cannot arbitrarily be, merged without some experience. Fortunately, when team members are working within a well-defined process, and there is a clear definition of roles and responsibilities, most changes made in parallel are done in a complementary manner. A certain amount of conflicting changes are inevitable. You can resolve the changes by choosing one or the other. These conflicting changes must be expected and their frequency should be minimized. If they are unexpected, it may be counterproductive and time is being wasted by changes that will not be discarded.

The following guidelines will help maximize the efficiency and productivity of a process that employs parallel development:

Model Integrator

The Rational Rose Model Integrator is a powerful tool that manages the merging and differencing of models at the Rational Rose meta-model level. It is not a visual model or UML semantic-level merge tool, therefore it lacks a number of features that can make the merging of models more efficient and more accurate.

For every use-case of Model Integrator that fails to do what you may expect, there are many other use-cases that do add value or do what is expected, and will save time. When using Model Integrator, you must understand what it can do efficiently and properly, and what should be avoided.

When you plan for a graphical change (a layout change) to a diagram within a model, only one person should make this change. This ensures that during the merge process, all of the graphical changes are accepted by one contributor and merging at a lower level of detail is not allowed.

You can change most information associated with a model element as long as it is information not related to its identity. For example, the Action property or Documentation field.

Using Rational ClearCase Multi-Site

When a team follows best practices, for example, being careful about artifact ownership, they can use Rational ClearCase Multi-Site to work on separate branches.

Rational ClearCase Multi-Site is a powerful tool that can help you with the challenges of a distributed team development. When using Rational ClearCase Multi-Site, you must consider the following:

Additional Heuristics for Team Development


Rational Software Corporation  http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2001, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX