  We analyze the 1D focusing nonlinear Schr\"{o}dinger equation in a finite
interval with homogeneous Dirichlet or Neumann boundary conditions. There are
two main dynamics, the collapse which is very fast and a slow cascade of
Fourier modes. For the cubic nonlinearity the calculations show no long term
energy exchange between Fourier modes as opposed to higher nonlinearities. This
slow dynamics is explained by fairly simple amplitude equations for the
resonant Fourier modes. Their solutions are well behaved so filtering high
frequencies prevents collapse. Finally these equations elucidate the unique
role of the zero mode for the Neumann boundary conditions.
