Developing Adaptive and Context-aware Applications in Dynamic Networks