In this paper we summarize the main features of vakonomic mechanics (or constrained variational calculus), both from continuous and discrete points of views. In the continuous case, we focus ourselves on Lagrangian systems defined by the following data: a Riemannian metric (kinetic term) and constraints linear on the velocities. We show that, for such kind of systems, it is possible to find an explicit Hamiltonian description. For the numerical setting, we describe two methods to design geometric integrators, first, applying discrete variational calculus to a discretization of the continuous vakonomic problem or, second, applying standard symplectic integration to the Hamiltonian description of the initial vakonomic system. We show that, in a particular case, both constructions match exactly.