Living spaces - homes, offices, and retail locations - are undergoing a profound transformation driven by the proliferation of IoT devices. Given these trends, robust systems support is essential for building IoT applications. This dissertation addresses this need through three key contributions. First, it introduces control abstractions through the dSpace framework, enabling developers to program physical spaces - such as rooms and buildings - as composable entities rather than individual devices. This approach simplifies development by reducing complexity, enhancing modularity, and promoting code reuse. Second, it proposes a context-oriented data architecture, CoT, that provides data abstractions for dynamically integrating information from diverse IoT sources. By leveraging a novel data model that combines strong typing with self-describing schemas, CoT enables applications to ingest and process data opportunistically, adapting flexibly to changing contexts. Finally, it presents the Digibox prototyping environment, which introduces tooling and testing abstractions through a scene-centric approach that integrates device simulators and mock scenarios to evaluate how ensembles of devices behave under specified conditions, reducing the need for costly physical testbeds. Together, these contributions provide a unified framework that substantially simplifies IoT development, paving the way for smarter, more adaptable systems in living spaces.