The standard formalism to study dynamics is the Hamiltonian mechanics which is founded on a symplectic form (or Poisson bracket) and a dynamical funtion: the Hamiltonian. Such a formalism is powerful to study the dynamics of point objects and fluids in many physical situations and is well suited for numerial integration. However, Hamiltonian dynamics does not include dissipation and then can only study systems at the thermodynamic equilibrium. Yet, some dissipative models can be written in a Hamiltonian structure using non-standard formulations of the theory. This is, in particular, the case with b-symplectic geometry which allows singularities in the phase space. These situations are fascinating for numerical and mathematical studies of dynamics but lack generality. The metriplectic (or GENERIC) framework has been developed to adress these limitations. In this formalism the symplectic form is completed by a pseudo-Riemannian metric and the free energy is used as the dynamical function. Under reasonable assumptions, the two principles of thermodynamics arise from the geometric structure. Such a formalism is well-suited to study close-to-the-equilibrium systems where the thermodynamics is described by Onsager’s linear response. This applies in particular for the majority of models of fluid dynamics. In these models, the metric (or dissipative bracket) contains the microscopic physics and is the geometric realisation of the Onsager’s transport tensor. It can also be derived as a emerging property form grand deviation theory and kinetic theory. Another way to introduce dissipation in Hamiltonian dynamics is to work with singular symplectic manifolds. In particular, these exotic geometries are well-suited to treat simple systems including friction in a purely Hamiltonian formalism.