Reversibly switchable DNA nanocompartment on surfaces: Experiments, applications, and theory