The increasing popularity of portable devices and recent advances in wireless networking technologies facilitate the engineering of new classes of applications, which present challenging problems to designers. Mobile devices face temporary and unannounced loss of network connectivity when they are moved, they are likely to have scarce resources, and they are required to react to frequent changes in the environment. To accommodate these new requirements imposed by mobility, middleware platforms for mobile computing must be capable of both deployment-time configurability and run-time reconfigurability. We illustrate how reflective techniques can be exploited by middleware designers to address these requirements. We discuss two complementary approaches: CARISMA, where reflection is used to support dynamic adaptation of middleware behaviour to changes in context, and ReMMoC, which uses reflection to accommodate heterogeneity requirements imposed by both applications and underlying device platforms.