This PhD thesis examines using the theory of affordances as a design tool to align pedagogy and educational technology. The author conducted design-based research involving iterations with students and teachers at a secondary school and higher education institution. Findings suggest affordances can explain how people derive meaning from digital environments if broadened beyond "action possibilities" to include the wider learning ecology. A framework uses affordances as a design tool and a methodology aims to align technologies with authentic learning scenarios. The design-based research approach provided valuable insights for both design and research of technology-enhanced learning.