The notion of semidirect
product of two transformation semigroups is introduced, and its space of almost
periodic functions is expressed as a tensor product. The general techniques developed
are applied to the special case of a semidirect product ST of two semigroups.
As a consequence new results are obtained on the characterization of the
almost periodic compactification of ST as a semidirect product of compact
semigroups. A related result is the splitting of the enveloping semigroup of a
semidirect product of certain flows into a semidirect product of enveloping
semigroups.