This monograph presents novel approaches for the structure-preserving discretization of distributed parameter port-Hamiltonian systems in space and time. Conservation of the structural power balance and consistent approximation of the constitutive equations lead to state space models, which are well suited for simulation and control of multiphysics systems. Finite-dimensional models for conservation laws under non-uniform boundary conditions are derived using discrete exterior calculus and a mixed Galerkin finite element scheme. Based on geometric integration, a new and general definition of discrete-time port-Hamiltonian systems is introduced. By the preservation of flatness, the numerical models are used for feedforward control design of parabolic and hyperbolic systems. The linear wave and heat equation and the nonlinear shallow water equations serve as examples throughout the book.