We present some recently results regarding the stability of periodic traveling wave solutions to equations of KdV type as well as the stability of front type solutions (on finite domains) to equations of Cahn-Hilliard type. While the dynamics of these problems is very different (the former is a Hamiltonian flow, while the latter is a gradient flow) the stability theory is remarkably similar. In both cases the stability problem involves a quadratic form subject to certain constraints: it is the constraints which play the important role in determining the stability.