Superconducting circuits based on Josephson junctions are promising candidates for the implementation of solid-state qubits. In most of the recent experiments on these circuits, the qubits are controlled by a classical field containing a large number of photons. The possibility of coherently coupling these systems to a single photon has been recently suggested, opening the possibility to study analogs of quantum optics in condensed matter systems. I will review one of these proposals based on a superconducting charge qubit fabricated inside a high quality transmission line resonator and will describe its recent experimental realization. When the qubit is brought into resonance with the resonator, vacuum Rabi splitting is observed indicating that the regime of strong coupling has been reached. When the qubit is detuned from the cavity, I will explain how quantum non-demolition measurement can be realized. I will discuss how the measurement process can be quantitatively understood in this regime allowing us to explore the effect of measurement back-action on the qubit and to extract, for the first time in superconducting qubits, large visibility in Rabi oscillations.