Ecologically based approach to coastal defence design and planning