In this thesis we have performed quantum-electrodynamics experiments on quantum dots embedded in photonic-crystal cavities. We perform a quantitative comparison of the decay dynamics and emission spectra of quantum dots embedded in a micropillar cavity and a photonic-crystal cavity. The light-matter interaction in the micropiller caivty is so strong that we measure non-Markovian dynamics of the quantum dot, and we compare to the Jaynes-Cummings model with all parameters independently determined. We find an excellent agreement when comparing the dynamics, but the emission spectra show significant deviations. Similar measurements on a quantum dot in a photonic-crystal cavity sow a Rabi splitting on resonance, while time-resolved measurements prove that the system is in the weak coupling regime. Whle tuning the quantum dot through resonance of the high-Q mode we observe a strong and surprisingly broadband Purcell enhancement of the decay rate, which cannot be described by the Jaynes-Cummings model. The broadband Purcell enhancement occurs because the quantum dot emits or absorbs a longitudinal acoustic phonon with the energy corresponding to the detuning between the quantum dot and cavity. We Successfully model the decay rates with a microscopic model that allows us to for the first time extract the effective phonon density of states, which we can model with bulk phonons. Studies on a quantum dot detuned from a low-Q mode of a photonic-crystal cavity show a high collection efficiency at the first lens of (44.3±2.1)%, while emission exhibits a very strong anti-bunching. We demonstrate how the quantum dot can be efficiently and selectively excited through longitudinal optical and acoustic phonon-mediated excitation. Indistinguishability measurements of the emitted photons under these two excitation schemes reveal low dephasing rates of 0.82±0.41µeV and 0.42±0.18µeV respectively.