Working in the category T of based spaces, we give the basic theory of diagram spaces, diagram spectra, and functors with smash product. For a small topological category D, a D-space is just a continuous functor D >--> T. There is an external smash product that takes a pair of D-spaces to a (D x D)-space. If D is symmetric monoidal, there is an internalization of this smash product that makes the category DT of D-spaces a symmetric monoidal category. This allows the definition of monoids R in DT, modules over monoids R, and, when R is commutative, monoids in the category of R-modules. These structures are defined in terms of the internal smash product, but they all have more elementary descriptions in terms of the external smash product. A monoid R is a symmetric monoidal functor D >--> T, and the external version of an R-module is a D-spectrum over R. We show that there is a new category D_R such that a D_R-space has the same structure as a D-spectrum over R. When R is commutative, the external version of a monoid in the category of R-modules is a D-FSP (functor with smash product) over R. We are especially interested in functors relating categories such as these as D varies. With R taken as a canonical sphere diagram space, examples include : (1) Symmetric spectra, as defined by Jeff Smith; (2) Orthogonal spectra, a coordinate free analogue of symmetric spectra with symmetric groups replaced by orthogonal groups in the domain category; (3) Gamma-spaces, as defined by Graeme Segal; and (4) W-spaces, an analogue of Gamma-spaces with finite sets replaced by finite CW complexes in the domain category.