NetLogo Workshop Participants Design and Implement Fully Functioning iOS Clients

by Charlie Turner

IET-Academic Technology Services (ATS) and the School of Education hosted a weeklong workshop on the UC Davis campus in June. The goal of the workshop was to teach participants how to develop distributed, collaboration applications using iOS devices (i.e. iPhones, iPads, iPods) as clients and a system called NetLogo as the central collaboration and communication server.

Charlie Turner, from ATS, explains how WebSockets are used to connect iPhones to the NetLogo modeling and collaboration environment.

Led by Charlie Turner, a group of NetLogo enthusiasts from UC Davis and other universities explored mobile client development, distributed collaboration, and learning environments. Participants left the hands-on workshop with fully functioning iOS clients of their own design and implementation.

Corey Brady, a researcher from Northwestern University’s Center for Connected Learning demonstrates a collaborative graphing program, with clients running on an iPhone and an iPod touch, communicating over wireless with NetLogo.

The workshop focused on Professor Tobin White’s (School of Education) collaborative learning research projects. Students use iOS clients to participate in distributed, collaborative activities hosted on a single NetLogo server – typically a Mac laptop. Professor White’s research incorporates the NetLogo modeling environment and GeoGebra graphing system, and a variety of hand-held clients. Client applications are built using the Phonegap/Cordova platform, allowing developers to author native mobile applications using HTML5, CSS, and JavaScript. While the focus of the workshop was iOS clients, some participants chose to develop Android clients – a process Phonegap/Cordova makes easier.

Participants returned to this architectural diagram throughout the week as the various technologies were introduced, including HTML5, CSS, JavaScript, JQuery-mobile, WebSockets, NetLogo, XCode, PhoneGap/Cordova, and iTunes.
Simon Dvorak (right), a programmer from ATS, helps a visiting post-doctoral scholar, Juan Hidalgo (left) from Universidad de Granada, develop a client for the Android platform.

For additional details on the technology, see the Technology Details section below.

For additional information on iOS development or any of the related technology, contact Charlie Turner, For information about UC Davis’ Academic & Research Programming services, visit

Technology Details

UC Davis has developed an experimental software environment that allows researchers to seamlessly combine a number of powerful teaching and research tools: NetLogo; GeoGebra; inexpensive handheld, location-aware, mobile devices (e.g. iPhone and iPad); and web-based applications. We integrate and configure these technologies to quickly develop learning activities that can move seamless between the classroom and the outside world. The integrated system supports the needs of students, teachers, and educational researchers. In the figure below, teachers control activities from the NetLogo server on their laptop (A); students participate by way of applications on their mobile devices (B); researchers collect time-sequences data on either the server or the clients. Local connectivity is established using dedicated classroom wireless networks or globally using a device’s service provider to gain Internet access.

Activities originate from within the NetLogo server, a programmable modeling environment on the teacher’s laptop. NetLogo has been used for years to experiment with emergent behavior in large systems of independently operating software entities (agents). The HubNet system within NetLogo allows one to run participatory distributed activities in which individuals (students) act as agents, controlling parts of the activity or simulation from their own devices. NetLogo allows researchers to extend the core system with custom extensions, two of which are central to our work: the geographic information system (GIS) extension and the HubNetWeb extension. We use the GIS extension to develop activities that display the locations of students on top of publically available maps. The HubNetWeb extension, developed by researchers at Northwestern, extends the HubNet system to the emerging WebSocket technology, allowing us to connect low-cost, highly programmable clients (e.g. iPhones and iPads) into the NetLogo activity. The WebSocket protocol’s bi-directional nature, ability to tunnel through firewalls, and low per-message overhead, make it ideal for implementing highly responsive collaboration environments between groups of students.

Interest in web-based client applications, developed in HTML5, cascading style sheets (CSS3), and JavaScript continues to grow. Modern mobile devices (e.g. iPhones and iPads) with webkit-based browsers expose this functionality to native applications running on the devices. We have developed a NetLogo communication library based on WebSockets for iOS devices. It allows us to build lightweight, browser-based clients on the iPhone that can communicate with NetLogo activities running on the teacher’s computer. We use an accepted set of standards found in every modern web browser: HTML5, cascading style sheets (CSS), and the browser-oriented programming language JavaScript.

We produce native mobile device applications using a framework called PhoneGap. Our device-independent client software is combined with one of many device-specific libraries, thus enabling us to do rapid prototyping in productive desktop browser environments, yet deliver native apps through any one of the mainstream application distribution channels (e.g., the iTunes store). As native applications, our client programs have access to all the device’s native features (e.g., cameras, accelerometers, GPS, etc.) and custom mathematical libraries such as BLAS, LAPACK, and vDSP.  Working with standard browser technology on the phone provides other advantages, including immediate access to existing JavaScript applications like Google maps and the mobile version of GeoGebra. Google maps allows us to display maps and student (one or many) location data within our mobile clients. We use GeoGebraWeb to give our clients interactive graphic, algebraic, and spreadsheet capabilities.

Post Author: Mary Stewart

Leave a Reply

Your email address will not be published. Required fields are marked *