Emerging pervasive computing scenarios involve client applications that dynamically collect information directly from the local environment. The sophisticated distribution and dynamics involved in these applications place an increased burden on developers that create applications for these environments. The heightened desire for rapid deployment of a wide variety of pervasive computing applications demands a new approach to application development in which domain experts with minimal programming expertise are empowered to rapidly construct and deploy domain-specific applications. This chapter introduces the DAIS (Declarative Applications in Immersive Sensor networks) middleware that abstracts a heterogeneous and dynamic pervasive computing environment into intuitive and accessible programming constructs. At the programming interface level, this requires exposing some aspects of the physical world to the developer, and DAIS accomplishes this through a suite of novel programming abstractions that enable on-demand access to dynamic local data sources. A fundamental component of the model is a hierarchical view of pervasive computing middleware that allows devices with differing capabilities to support differing amounts of functionality. This chapter reports on our design of the DAIS middleware and highlights the abstractions, the programming interface, and the reification of the middleware on a heterogeneous combination of client devices and resource-constrained sensors.