Spatial computing is an emerging field that recognizes the importance of explicitly handling spatial relationships at three levels: computer architectures, programming languages and applications. In this context, we present MGS, an experimental programming language where data structures are fields on abstract spaces. In MGS, fields are transformed using rules. We show that this approach is able to unify, at least for programming purposes, several computational models like Lindenmayer systems and cellular automata. The MGS notions of topological collection and transformation are formalized using concepts developed in algebraic topology. We propose to use transformations in order to implement a discrete version of some differential operators. These transformations satisfy a Stokes-like theorem. This result constitutes a geometric view of programming where data are handled like fields in physics. The relevance of this approach for the design of autonomic software systems is discussed in the conclusion.