Software Engineering for Sensor Network Applications