A long-term observation of students' usage of a dynamic geometry in a classroom at all grade levels has challenged to develop an approach for learning and understanding mathematics in an easier way for both students and teachers. The paper deals with the results of a study that investigates the process and outcomes of the implementation of abstract data types in dynamic sketches (by composing scripts) for learning geometry. Four abstract data types have been developed and defined using algebraic specifications. The development of a dynamic sketch scenario with the implementation of these abstract data types is presented in detail. An example of creating an interactive microworld, using abstract data types, is presented and discussed as well.