The paper's contribution is a methodology that integrates two basic technologies (GLO and LEGO robot) to teach Computer Science (CS) topics at the school level. We present the methodology as a framework of 5 components (pedagogical activities, technology driven processes, tools, knowledge transfer actors, and pedagogical outcomes) and interactions among the components. GLOs are meta-programmed entities to generate LO instances on demand depending on the context of use and learning objectives. A GLO is a black-box entity, which is integrated in the framework through the generating process to source the teaching and learning process via robot-based visualization to demonstrate how programs and algorithms are transformed into real-world tasks and processes. The methodology is tested in the real e-learning setting. The pedagogical outcomes are evaluated by empirical data showing the increase of student engagement level, higher flexibility and reuse enhancement in learning.