The aim of this thesis is to design and optimise photonic devices in the non linear regime. In particular, two types of devices have been chosen according to the physical phenomena. The first one corresponds to optical fibres, designed so that the temporal dynamics associated to the wave-packets travelling along them generates spectra with the desired characteristics, in the context of supercontinuum. The second one exploits the spatial phenomenology associated to the electromagnetic waves at the surface of a metallic material. These waves make possible the design of photonic chips with dimensions well below the light wavelength and the generation of hybrid nonlinear states with very particular dynamics. All these effects are found in the frame provided by the macroscopic Maxwell equations, which have been solved numerically. In some cases, big theoretical approximations have been used to study systems of one dimension, whereas in some others they have been integrated in 3D straight away. In the case in which the device optimisation is non trivial, even possessing a deep theoretical knowledge about it, a recently developed numerical tool, combining genetic algorithms and Grid technology, has been used.