On a theory of the Casimir effect