Radio frequency identification (RFID) is a promising technology for ubiquitous computing. When we embed RFID tags into environment-sensitive objects, RFID networks must be integrated with wireless sensor networks (WSNs). In this article, we first identify key requirements for designing an efficient and flexible integration framework. Based on the requirements, we propose a sensor and an RFID integration framework (SARIF). As middleware that operates on top of RFID networks and WSNs, SARIF enables the design of diverse applications flexibly and manages network resources efficiently. We also demonstrate the effectiveness of SARIF by implementing a prototype.