In this Perspective, we will focus on the theoretical and on the algorithmic aspects of the exact factorization of the electron-nuclear wavefunction. The formulation of the theory will be briefly recalled in Section II and we will describe the coupled-trajectory algorithms derived from it to simulate nonadiabatic processes in Section III. Some applications of the exact factorization and of these algorithms is presented in Section IV. Section V presents a brief overview of recent work on the dynamics of photon-electron-nuclear systems employing the exact-factorization framework. Our conclusions are discussed in Section VI.