We propose a variational formalism for dark solitons based on a nontri
vial modification of the standard Lagrangian of the nonlinear Schrodin
ger equation. Our approach allows to consider a variety of asymptotica
lly nonvanishing localised solutions for applying a variational techni
que together with the correct definition of momentum and energy. We de
monstrate, on several particular examples, how this variational approa
ch works, and we also point out its suitability for more general probl
ems, e.g. those involving the analysis of the dark soliton interaction
as well as the perturbation-induced dynamics of dark solitons and opt
ical vortex solitons.